Skip to content

Commit 60cadef

Browse files
committed
remove omp.h header in the serial execution
1 parent b48b852 commit 60cadef

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

simwave/kernel/backend/c_code/forward/constant_density/2d/wave.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#include <stdlib.h>
33
#include <time.h>
44
#include <sys/time.h>
5-
#include <omp.h>
5+
6+
#if defined(CPU_OPENMP) || defined(GPU_OPENMP)
7+
#include <omp.h>
8+
#endif
69

710
// use single (float) or double precision
811
// according to the value passed in the compilation cmd

simwave/kernel/backend/c_code/forward/constant_density/3d/wave.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#include <stdlib.h>
33
#include <time.h>
44
#include <sys/time.h>
5-
#include <omp.h>
5+
6+
#if defined(CPU_OPENMP) || defined(GPU_OPENMP)
7+
#include <omp.h>
8+
#endif
69

710
// use single (float) or double precision
811
// according to the value passed in the compilation cmd

simwave/kernel/backend/c_code/forward/variable_density/2d/wave.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#include <stdlib.h>
33
#include <time.h>
44
#include <sys/time.h>
5-
#include <omp.h>
5+
6+
#if defined(CPU_OPENMP) || defined(GPU_OPENMP)
7+
#include <omp.h>
8+
#endif
69

710
// use single (float) or double precision
811
// according to the value passed in the compilation cmd

simwave/kernel/backend/c_code/forward/variable_density/3d/wave.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
#include <stdlib.h>
33
#include <time.h>
44
#include <sys/time.h>
5-
#include <omp.h>
5+
6+
#if defined(CPU_OPENMP) || defined(GPU_OPENMP)
7+
#include <omp.h>
8+
#endif
69

710
// use single (float) or double precision
811
// according to the value passed in the compilation cmd

0 commit comments

Comments
 (0)