Browse Source

Fix missing endif and rearrange for non-Linux OpenMP

pull/3437/head
Martin Kroeker GitHub 4 years ago
parent
commit
0e6639d0fa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 7 deletions
  1. +12
    -7
      driver/others/memory.c

+ 12
- 7
driver/others/memory.c View File

@@ -246,16 +246,18 @@ int get_num_procs(void) {
#endif

if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF);
#if !defined(OS_LINUX)
return nums;
#endif

#if defined(USE_OPENMP)
/* if (omp_get_proc_bind() != omp_proc_bind_false)*/
#if _OPENMP >= 201307
nums = omp_get_num_places();
#endif
return nums;
#endif
#endif

#if !defined(OS_LINUX)
return nums;
#endif

#if !defined(__GLIBC_PREREQ)
return nums;
@@ -1813,9 +1815,7 @@ int get_num_procs(void) {
#endif

if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF);
#if !defined(OS_LINUX)
return nums;
#endif

#if defined(USE_OPENMP)
/* if (omp_get_proc_bind() != omp_proc_bind_false) */
#if_OPENMP >= 201307
@@ -1823,7 +1823,12 @@ int get_num_procs(void) {
#endif
return nums;
#endif
#endif

#if !defined(OS_LINUX)
return nums;
#endif
#if !defined(__GLIBC_PREREQ)
return nums;
#else


Loading…
Cancel
Save