Skip to content

Commit

Permalink
Add missing static_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Jul 25, 2024
1 parent f64390d commit c7ac2eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ddc/create_mirror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ auto create_mirror_and_copy(
Space const& space,
ChunkSpan<ElementType, Support, Layout, MemorySpace> const& src)
{
static_assert(
Kokkos::is_memory_space_v<Space> || Kokkos::is_execution_space_v<Space>,
"DDC: parameter \"Space\" must be either a Kokkos execution space or a memory space");
static_assert(
std::is_same_v<Layout, std::experimental::layout_right>,
"DDC: parameter \"Layout\" must be a `layout_right`");
Chunk chunk = create_mirror(space, src);
parallel_deepcopy(chunk, src);
return chunk;
Expand Down

0 comments on commit c7ac2eb

Please sign in to comment.