22 template<
typename TDev,
typename TElem,
typename TDim,
typename TIdx,
typename TSfinae =
void>
26 template<
typename TElem,
typename TDim,
typename TIdx,
typename TDev,
typename TSfinae =
void>
30 template<
typename TElem,
typename TDim,
typename TIdx,
typename TDev,
typename TSfinae =
void>
34 template<
typename TDim,
typename TDev>
40 template<
typename TPlatform,
typename TElem,
typename TDim,
typename TIdx>
44 template<
typename TPlatform>
51 template<
typename TDev,
typename TElem,
typename TDim,
typename TIdx>
63 template<
typename TElem,
typename TIdx,
typename TExtent,
typename TDev>
78 template<
typename TElem,
typename TIdx,
typename TExtent,
typename TQueue>
87 # pragma clang diagnostic push
88 # pragma clang diagnostic ignored "-Wdocumentation"
94 template<
typename TDev,
typename TDim>
97 # pragma clang diagnostic pop
113 template<
typename TElem,
typename TIdx,
typename TExtent,
typename TQueue>
118 return allocAsyncBuf<TElem, TIdx>(queue, extent);
122 return allocBuf<TElem, TIdx>(
getDev(queue), extent);
137 template<
typename TElem,
typename TIdx,
typename TExtent,
typename TPlatform>
140 TPlatform
const& platform,
141 TExtent
const& extent = TExtent())
149 # pragma clang diagnostic push
150 # pragma clang diagnostic ignored "-Wdocumentation"
155 template<
typename TPlatform>
158 # pragma clang diagnostic pop
174 template<
typename TElem,
typename TIdx,
typename TExtent,
typename TPlatform>
177 TPlatform
const& platform,
178 TExtent
const& extent = TExtent())
181 if constexpr(hasMappedBufSupport<Platform>)
183 return allocMappedBuf<TElem, TIdx>(host, platform, extent);
187 return allocBuf<TElem, TIdx>(host, extent);
#define ALPAKA_UNREACHABLE(...)
Before CUDA 11.5 nvcc is unable to correctly identify return statements in 'if constexpr' branches....
The alpaka accelerator library.
constexpr bool hasMappedBufSupport
Checks if the host can allocate a pinned/mapped host memory, accessible by all devices in the given p...
ALPAKA_FN_HOST auto allocAsyncBufIfSupported(TQueue queue, TExtent const &extent=TExtent())
If supported, allocates stream-ordered memory on the given queue and the associated device....
typename trait::DevType< T >::type Dev
The device type trait alias template to remove the ::type.
ALPAKA_FN_HOST auto allocMappedBuf(DevCpu const &host, TPlatform const &platform, TExtent const &extent=TExtent())
Allocates pinned/mapped host memory, accessible by all devices in the given platform.
ALPAKA_FN_HOST auto allocBuf(TDev const &dev, TExtent const &extent=TExtent())
Allocates memory on the given device.
constexpr bool hasAsyncBufSupport
Checks if the given device can allocate a stream-ordered memory buffer of the given dimensionality.
ALPAKA_FN_HOST auto getDev(T const &t)
ALPAKA_FN_HOST auto allocMappedBufIfSupported(DevCpu const &host, TPlatform const &platform, TExtent const &extent=TExtent())
If supported, allocates pinned/mapped host memory, accessible by all devices in the given platform....
typename trait::BufType< alpaka::Dev< TDev >, TElem, TDim, TIdx >::type Buf
The memory buffer type trait alias template to remove the ::type.
ALPAKA_FN_HOST auto allocAsyncBuf(TQueue queue, TExtent const &extent=TExtent())
Allocates stream-ordered memory on the given device.
typename trait::PlatformType< T >::type Platform
The platform type trait alias template to remove the ::type.
typename trait::DimType< T >::type Dim
The dimension type trait alias template to remove the ::type.
The stream-ordered memory allocator trait.
The pinned/mapped memory allocator trait.
The memory allocator trait.
The memory buffer type trait.
The stream-ordered memory allocation capability trait.
The pinned/mapped memory allocation capability trait.