Skip to content

Commit

Permalink
Bugfix: Add missing include guards to header files (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts authored Mar 31, 2024
1 parent 6ce388b commit 61e5e89
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/arkode/CXX_parallel/ark_brusselator1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef _ARK_BRUSSELATOR1D_H
#define _ARK_BRUSSELATOR1D_H

#include <cmath>
#include <cstdio>
#include <cstdlib>
Expand Down Expand Up @@ -266,3 +269,5 @@ static int check_retval(void* returnvalue, const char* funcname, int opt);
static void gpuAssert(GPU_PREFIX(Error_t) code, const char* file, int line,
int abort);
#endif

#endif
5 changes: 5 additions & 0 deletions examples/nvector/test_nvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* test an NVECTOR module implementation.
* -----------------------------------------------------------------*/

#ifndef _TEST_NVECTOR_H
#define _TEST_NVECTOR_H

#include <math.h>
#include <sundials/sundials_types.h>

Expand Down Expand Up @@ -146,3 +149,5 @@ void SetTiming(int onoff, int myid);
#ifdef __cplusplus
}
#endif

#endif
5 changes: 5 additions & 0 deletions examples/utilities/custom_memory_helper_gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* unmanaged memory only and synchronous copies.
* -----------------------------------------------------------------*/

#ifndef _CUSTOM_MEMORY_HELPER_GPU_H
#define _CUSTOM_MEMORY_HELPER_GPU_H

#include <assert.h>
#include <string.h>
#if defined(__NVCC__)
Expand Down Expand Up @@ -157,3 +160,5 @@ SUNMemoryHelper MyMemoryHelper(SUNContext sunctx)

return helper;
}

#endif
5 changes: 5 additions & 0 deletions examples/utilities/custom_memory_helper_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* unmanaged memory only and synchronous copies.
* -----------------------------------------------------------------*/

#ifndef _CUSTOM_MEMORY_HELPER_SYCL_H
#define _CUSTOM_MEMORY_HELPER_SYCL_H

#include <cstdlib>
#include <sundials/sundials_memory.h>
#include <sycl/sycl.hpp>
Expand Down Expand Up @@ -116,3 +119,5 @@ SUNMemoryHelper MyMemoryHelper(SUNContext sunctx)

return helper;
}

#endif
5 changes: 5 additions & 0 deletions src/sundials/sundials_adiak_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
* SUNDIALS Copyright End
* ----------------------------------------------------------------*/

#ifndef _SUNDIALS_ADIAK_METADATA_H
#define _SUNDIALS_ADIAK_METADATA_H

#ifdef SUNDIALS_ADIAK_ENABLED
#include <adiak.h>

Expand Down Expand Up @@ -142,3 +145,5 @@ static void sunAdiakCollectMetadata()
#endif
}
#endif

#endif
5 changes: 5 additions & 0 deletions src/sundials/sundials_iterative_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* different iterative solvers.
* ---------------------------------------------------------------------------*/

#ifndef _SUNDIALS_ITERATIVE_IMPL_H
#define _SUNDIALS_ITERATIVE_IMPL_H

#include <sundials/sundials_iterative.h>

/* -----------------------------------------------------------------------------
Expand All @@ -33,3 +36,5 @@ struct _SUNQRData
N_Vector vtemp2;
sunrealtype* temp_array;
};

#endif

0 comments on commit 61e5e89

Please sign in to comment.