Esempio n. 1
0
void omp_set_num_threads (int p1)
{
#if defined(DEBUG)
	fprintf (stderr, PACKAGE_NAME": omp_set_num_threads is at %p\n", omp_set_num_threads_real);
	fprintf (stderr, PACKAGE_NAME": omp_set_num_threads params %d\n", p1);
#endif

	if (omp_set_num_threads_real != NULL && EXTRAE_INITIALIZED())
	{
		Backend_ChangeNumberOfThreads (p1);

		Backend_Enter_Instrumentation (2);
		Probe_OpenMP_SetNumThreads_Entry (p1);
		omp_set_num_threads_real (p1);
		Probe_OpenMP_SetNumThreads_Exit ();
		Backend_Leave_Instrumentation ();
	}
	else if (omp_set_num_threads_real != NULL)
	{
		omp_set_num_threads_real (p1);
	}
	else
	{
		fprintf (stderr, PACKAGE_NAME": omp_set_num_threads is not hooked! exiting!!\n");
		exit (0);
	}
}
void Extrae_OpenMP_SetNumThreads_Exit (void)
{
	Probe_OpenMP_SetNumThreads_Exit ();
	Backend_Leave_Instrumentation ();
}