Skip to content

Commit

Permalink
fix(sycl): Replaces pragma once with include guards
Browse files Browse the repository at this point in the history
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
<ceed/types.h>?
  • Loading branch information
jrwrigh authored and jedbrown committed Oct 27, 2024
1 parent bef6543 commit 7f836c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion include/ceed/jit-source/sycl/sycl-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

/// @file
/// Internal header for SYCL type definitions
#pragma once
#ifndef CEED_SYCL_TYPES_H
#define CEED_SYCL_TYPES_H

#include <ceed/types.h>

Expand All @@ -34,3 +35,5 @@ typedef struct {
CeedInt *outputs[CEED_SYCL_NUMBER_FIELDS];
} FieldsInt_Sycl;
#endif

#endif // CEED_SYCL_TYPES_H
5 changes: 4 additions & 1 deletion include/ceed/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stddef.h>
Expand Down Expand Up @@ -252,3 +253,5 @@ typedef enum {
/// Boolean value
CEED_CONTEXT_FIELD_BOOL = 3,
} CeedContextFieldType;

#endif // CEED_QFUNCTION_DEFS_H

0 comments on commit 7f836c3

Please sign in to comment.