Skip to content

Commit

Permalink
Add sycl header compatibility file, borrowed from Umpire.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornung67 committed Jul 17, 2024
1 parent 346bd66 commit f3db1b7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/RAJA/policy/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if defined(RAJA_SYCL_ACTIVE)

#include <CL/sycl.hpp>
#include "RAJA/util/sycl_compat.hpp"

#include "RAJA/policy/sycl/forall.hpp"
#include "RAJA/policy/sycl/policy.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/RAJA/policy/sycl/MemUtils_SYCL.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#if defined(RAJA_ENABLE_SYCL)

#include <sycl/sycl.hpp>
#include "RAJA/util/sycl_compat.hpp"

#include <cassert>
#include <cstddef>
Expand Down
3 changes: 2 additions & 1 deletion include/RAJA/policy/sycl/forall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@

#if defined(RAJA_ENABLE_SYCL)

#include <sycl/sycl.hpp>
#include <algorithm>
#include <chrono>

#include "RAJA/util/sycl_compat.hpp"

#include "RAJA/pattern/forall.hpp"

#include "RAJA/pattern/params/forall.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/RAJA/policy/sycl/policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#if defined(RAJA_SYCL_ACTIVE)

#include <sycl/sycl.hpp>
#include "RAJA/util/sycl_compat.hpp"

#include "RAJA/policy/PolicyBase.hpp"
#include "RAJA/policy/sequential/policy.hpp"
Expand Down
7 changes: 7 additions & 0 deletions include/RAJA/util/sycl_compat.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#if (__INTEL_CLANG_COMPILER && __INTEL_CLANG_COMPILER < 20230000)
// older version, use legacy header locations
#include <CL/sycl.hpp>
#else
// SYCL 2020 standard header
#include <sycl/sycl.hpp>
#endif

0 comments on commit f3db1b7

Please sign in to comment.