alpaka
Abstraction Library for Parallel Kernel Acceleration
Traits.hpp File Reference

Go to the source code of this file.

Classes

struct  alpaka::trait::HasAsyncBufSupport< TDim, TDev >
 The stream-ordered memory allocation capability trait. More...
 
struct  alpaka::trait::HasMappedBufSupport< TPlatform >
 The pinned/mapped memory allocation capability trait. More...
 

Namespaces

 alpaka
 The alpaka accelerator library.
 
 alpaka::trait
 The accelerator traits.
 

Typedefs

template<typename TDev , typename TElem , typename TDim , typename TIdx >
using alpaka::Buf = typename trait::BufType< alpaka::Dev< TDev >, TElem, TDim, TIdx >::type
 The memory buffer type trait alias template to remove the ::type. More...
 

Functions

template<typename TElem , typename TIdx , typename TExtent , typename TQueue >
ALPAKA_FN_HOST auto alpaka::allocAsyncBuf (TQueue queue, TExtent const &extent=TExtent())
 Allocates stream-ordered memory on the given device. More...
 
template<typename TElem , typename TIdx , typename TExtent , typename TQueue >
ALPAKA_FN_HOST auto alpaka::allocAsyncBufIfSupported (TQueue queue, TExtent const &extent=TExtent())
 If supported, allocates stream-ordered memory on the given queue and the associated device. Otherwise, allocates regular memory on the device associated to the queue. Please note that stream-ordered and regular memory have different semantics: this function is provided for convenience in the cases where the difference is not relevant, and the stream-ordered memory is only used as a performance optimisation. More...
 
template<typename TElem , typename TIdx , typename TExtent , typename TDev >
ALPAKA_FN_HOST auto alpaka::allocBuf (TDev const &dev, TExtent const &extent=TExtent())
 Allocates memory on the given device. More...
 
template<typename TPlatform , typename TElem , typename TIdx , typename TExtent >
ALPAKA_FN_HOST auto alpaka::allocMappedBuf (DevCpu const &host, TPlatform const &platform, TExtent const &extent=TExtent())
 Allocates pinned/mapped host memory, accessible by all devices in the given platform. More...
 
template<typename TElem , typename TIdx , typename TExtent , typename TPlatform >
ALPAKA_FN_HOST auto alpaka::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. Otherwise, allocates regular host memory. Please note that pinned/mapped and regular memory may have different semantics: this function is provided for convenience in the cases where the difference is not relevant, and the pinned/mapped memory is only used as a performance optimisation. More...
 

Variables

template<typename TDev , typename TDim >
constexpr bool alpaka::hasAsyncBufSupport = trait::HasAsyncBufSupport<TDim, TDev>::value
 Checks if the given device can allocate a stream-ordered memory buffer of the given dimensionality. More...
 
template<typename TPlatform >
constexpr bool alpaka::hasMappedBufSupport = trait::HasMappedBufSupport<TPlatform>::value
 Checks if the host can allocate a pinned/mapped host memory, accessible by all devices in the given platform. More...