From 7f836c3130692982ef72689a0598b6a4d81ae7d4 Mon Sep 17 00:00:00 2001 From: James Wright Date: Sun, 27 Oct 2024 00:20:11 +0000 Subject: [PATCH] fix(sycl): Replaces pragma once with include guards OpenCL doesn't really like pragma once evidently. I think we've been 'getting away' with it previously as the JIT processing automatically doesn't allow for nested includes, but the same is not done for ? --- include/ceed/jit-source/sycl/sycl-types.h | 5 ++++- include/ceed/types.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/ceed/jit-source/sycl/sycl-types.h b/include/ceed/jit-source/sycl/sycl-types.h index b42ad10385..58938a4b2a 100644 --- a/include/ceed/jit-source/sycl/sycl-types.h +++ b/include/ceed/jit-source/sycl/sycl-types.h @@ -7,7 +7,8 @@ /// @file /// Internal header for SYCL type definitions -#pragma once +#ifndef CEED_SYCL_TYPES_H +#define CEED_SYCL_TYPES_H #include @@ -34,3 +35,5 @@ typedef struct { CeedInt *outputs[CEED_SYCL_NUMBER_FIELDS]; } FieldsInt_Sycl; #endif + +#endif // CEED_SYCL_TYPES_H diff --git a/include/ceed/types.h b/include/ceed/types.h index 3f858a7ca4..6c6d126548 100644 --- a/include/ceed/types.h +++ b/include/ceed/types.h @@ -7,7 +7,8 @@ /// @file /// Public header for types and macros used in user QFunction source code -#pragma once +#ifndef CEED_QFUNCTION_DEFS_H +#define CEED_QFUNCTION_DEFS_H #ifndef CEED_RUNNING_JIT_PASS #include @@ -252,3 +253,5 @@ typedef enum { /// Boolean value CEED_CONTEXT_FIELD_BOOL = 3, } CeedContextFieldType; + +#endif // CEED_QFUNCTION_DEFS_H