File indexing completed on 2024-04-06 12:15:39
0001 #ifndef HeterogeneousCore_AlpakaInterface_interface_AssertDeviceMatchesHostCollection_h
0002 #define HeterogeneousCore_AlpakaInterface_interface_AssertDeviceMatchesHostCollection_h
0003
0004 #include <type_traits>
0005
0006 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0007
0008 #if defined ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
0009
0010
0011 #define ASSERT_DEVICE_MATCHES_HOST_COLLECTION(DEVICE_COLLECTION, HOST_COLLECTION) \
0012 static_assert(std::is_same_v<alpaka_serial_sync::DEVICE_COLLECTION, HOST_COLLECTION>, \
0013 "The device collection for the host device and the host collection must be the same type!");
0014
0015 #else
0016
0017
0018 #define ASSERT_DEVICE_MATCHES_HOST_COLLECTION(DEVICE_COLLECTION, HOST_COLLECTION)
0019
0020 #endif
0021
0022 #endif