Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ typedef Kokkos::TeamPolicy<>::member_type member_type;

// Check if the user requested a specific loop unrolling strategy
#if defined(LOOP_PATTERN_SIMD)
// Check that Idefix Arrays can be assigned from SIMD loop
static_assert(
Kokkos::SpaceAccessibility<Kokkos::DefaultHostExecutionSpace::execution_space,
Kokkos::DefaultExecutionSpace::memory_space>::accessible,
"Idefix Arrays cannot be accessed from SIMD loop. You should try another loop pattern."
);
constexpr LoopPattern defaultLoop = LoopPattern::SIMDFOR;
#elif defined(LOOP_PATTERN_1DRANGE)
constexpr LoopPattern defaultLoop = LoopPattern::RANGE;
Expand All @@ -51,7 +57,16 @@ typedef Kokkos::TeamPolicy<>::member_type member_type;
constexpr LoopPattern defaultLoop = LoopPattern::RANGE;
#elif defined(KOKKOS_ENABLE_HIP)
constexpr LoopPattern defaultLoop = LoopPattern::RANGE;
#elif defined(KOKKOS_ENABLE_SYCL)
constexpr LoopPattern defaultLoop = LoopPattern::RANGE;
#elif defined(KOKKOS_ENABLE_SERIAL)
// Check that Idefix Arrays can be assigned from SIMD loop
static_assert(
Kokkos::SpaceAccessibility<Kokkos::DefaultHostExecutionSpace::execution_space,
Kokkos::DefaultExecutionSpace::memory_space>::accessible,
"Idefix Arrays cannot be accessed from Host, but Device is unknown/untested. "
"Ask the developers to add support."
);
constexpr LoopPattern defaultLoop = LoopPattern::SIMDFOR;
#else
#warning "Unknown target architeture: default to MDrange"
Expand Down