#include <iostream>
#include <chrono>
#include <omp.h>
#include <math.h>

int main()
{
	std::cout << "\nOMP: \n";
	double start_time = omp_get_wtime();//start time

    int total = 0;//shared

#pragma omp parallel //10 painters re-paint the entire room, again and again
    {
        for (int i = 0; i < 100; ++i)//the room is sub-divided into 100 parts
            total++;//to paint
    }
    std::cerr << "\nTotal Parallel Region: " << total;

    total = 0;
    for (int i = 0; i < 100; ++i)
    {
        total++;
    }
    std::cerr << "\nTotal Serial-for: " << total;

    total = 0;
#pragma omp parallel
#pragma omp for 
    for (int i = 0; i < 100; ++i) //10 painters will sub-divide the 100 parts of the room amongst themselves
    {
        total++;
    }
    std::cerr << "\nTotal Parallel-for: " << total;

}