// bsp3a.cpp : main project file.

#include "stdafx.h"

#ifdef _OPENMP
  #include <omp.h>
#endif

using namespace System;

int main(array<System::String ^> ^args)  {
	Console::WriteLine("Max Threads: {0}  Anz CPU {1}",
	 	omp_get_max_threads(),    omp_get_num_procs() );

	omp_set_num_threads(4);

	Console::WriteLine("Max Threads: {0}  Anz CPU {1}",
		omp_get_max_threads(), omp_get_num_procs() );

	#pragma omp parallel for 
		for (int i = 0; i < 10; ++i)	
		{
			int id = omp_get_thread_num();
			Console::WriteLine("Thread {0}  lokales i: {1}", id, i );
		}

	Console::ReadLine();	
	
	return 0;
}
