Commit 331cf1a0 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added function cdo_omp_set_num_threads().

parent f387a137
......@@ -257,4 +257,3 @@ int main(int argc, char **argv)
return 0;
}
#endif
......@@ -182,6 +182,14 @@ int cdo_omp_get_thread_num(void)
}
void cdo_omp_set_num_threads(int nthreads)
{
#if defined(_OPENMP)
if ( omp_get_max_threads() != nthreads ) omp_set_num_threads(nthreads);
#endif
}
char *getProgname(char *string)
{
#if defined(_WIN32)
......
......@@ -220,6 +220,7 @@ int zaxisFromName(const char *zaxisname);
/* refactor: moved here from cdo.h */
int cdo_omp_get_thread_num(void);
void cdo_omp_set_num_threads(int nthreads);
void strtolower(char *str);
void strtoupper(char *str);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment