/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
HeterogeneousCore/AlpakaInterface/interface/AssertDeviceMatchesHostCollection.h
22 строки
1 KB
Andrea Bocci
Move ASSERT_DEVICE_MATCHES_HOST_COLLECTION to a separate file
17 окт 2023, 19:59
Не верифицирован
17 окт 2023, 19:59
f0cc419
Код
Авторство
О чём код?
#ifndef HeterogeneousCore_AlpakaInterface_interface_AssertDeviceMatchesHostCollection_h #define HeterogeneousCore_AlpakaInterface_interface_AssertDeviceMatchesHostCollection_h #include <type_traits> #include "HeterogeneousCore/AlpakaInterface/interface/config.h" #if defined ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED // check that the portable device collection for the host device is the same as the portable host collection #define ASSERT_DEVICE_MATCHES_HOST_COLLECTION(DEVICE_COLLECTION, HOST_COLLECTION) \ static_assert(std::is_same_v<alpaka_serial_sync::DEVICE_COLLECTION, HOST_COLLECTION>, \ "The device collection for the host device and the host collection must be the same type!"); #else // the portable device collections for the non-host devices do not require any checks #define ASSERT_DEVICE_MATCHES_HOST_COLLECTION(DEVICE_COLLECTION, HOST_COLLECTION) #endif // ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED #endif // HeterogeneousCore_AlpakaInterface_interface_AssertDeviceMatchesHostCollection_h