Skip to content

Commit

Permalink
Make omp.h optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanradanov committed Jul 2, 2024
1 parent c60e7a0 commit 1275b41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion common/my_timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <omp.h>
#include <errno.h>


#ifdef _MY_IS_OPENMP
#include <omp.h>
#define CUDA_DEVICE_SYNCHRONIZE do { } while(0)
#elif defined _MY_IS_HIP
#define CUDA_DEVICE_SYNCHRONIZE hipDeviceSynchronize()
Expand Down Expand Up @@ -55,7 +55,11 @@ static inline void MY_WRITE_TIME_TO_FILE(const char *app_id, const char *clock_i
if (!hostname)
hostname = empty;

#ifdef _MY_IS_OPENMP
int omp_threads = omp_get_max_threads();
#else
int omp_threads = 1;
#endif

#ifdef _MY_COMPILER_NAME_
const char *compilername = _MY_COMPILER_NAME_;
Expand Down
1 change: 0 additions & 1 deletion common/my_verification.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <omp.h>
#include <errno.h>
#include <float.h>
#include <sys/stat.h>
Expand Down

0 comments on commit 1275b41

Please sign in to comment.