Skip to content

Commit

Permalink
add Andrea Bocci's latest commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GNiendorf committed Aug 7, 2023
1 parent 5da452f commit 6ea9524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/alpaka_interface/CachingAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ namespace lst::alpakatools {
* - the `Queue` type can be either `Sync` _or_ `Async` on any allocation.
*/

template <typename TDev,
typename TQueue,
typename = std::enable_if_t<alpaka::isDevice<TDev> and alpaka::isQueue<TQueue>>>
template <typename TDev, typename TQueue>
class CachingAllocator {
public:
#ifdef ALPAKA_ACC_GPU_CUDA_ENABLED
Expand All @@ -106,6 +104,8 @@ namespace lst::alpakatools {
using Buffer = alpaka::Buf<Device, std::byte, alpaka::DimInt<1u>, size_t>;

// The "memory device" type can either be the same as the "synchronisation device" type, or be the host CPU.
static_assert(alpaka::isDevice<Device>, "TDev should be an alpaka Device type.");
static_assert(alpaka::isQueue<Queue>, "TQueue should be an alpaka Queue type.");
static_assert(std::is_same_v<Device, alpaka::Dev<Queue>> or std::is_same_v<Device, alpaka::DevCpu>,
"The \"memory device\" type can either be the same as the \"synchronisation device\" type, or be the "
"host CPU.");
Expand Down

0 comments on commit 6ea9524

Please sign in to comment.