alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka Namespace Reference

The alpaka accelerator library. More...

Namespaces

 bt
 
 concepts
 
 core
 
 cpu
 
 cuda
 
 detail
 
 gb
 
 generic
 
 hierarchy
 Defines the parallelism hierarchy levels of alpaka.
 
 internal
 
 math
 
 memory_scope
 
 meta
 
 omp
 
 origin
 Defines the origins available for getting extent and indices of kernel executions.
 
 property
 Properties to define queue behavior.
 
 rand
 
 test
 The test specifics.
 
 trait
 The accelerator traits.
 
 uniform_cuda_hip
 
 unit
 Defines the units available for getting extent and indices of kernel executions.
 
 warp
 

Classes

class  AccCpuOmp2Blocks
 The CPU OpenMP 2.0 block accelerator. More...
 
class  AccCpuOmp2Threads
 The CPU OpenMP 2.0 thread accelerator. More...
 
class  AccCpuSerial
 The CPU serial accelerator. More...
 
class  AccCpuThreads
 The CPU threads accelerator. More...
 
struct  AccDevProps
 The acceleration properties on a device. More...
 
class  AccGpuUniformCudaHipRt
 The GPU CUDA accelerator. More...
 
class  AllocCpuAligned
 The CPU boost aligned allocator. More...
 
class  AllocCpuNew
 The CPU new allocator. More...
 
struct  ApiCudaRt
 
struct  AtomicAdd
 The addition function object. More...
 
struct  AtomicAnd
 The and function object. More...
 
class  AtomicAtomicRef
 The atomic ops based on atomic_ref for CPU accelerators. More...
 
struct  AtomicCas
 The compare and swap function object. More...
 
struct  AtomicDec
 The decrement function object. More...
 
struct  AtomicExch
 The exchange function object. More...
 
struct  AtomicInc
 The increment function object. More...
 
struct  AtomicMax
 The maximum function object. More...
 
struct  AtomicMin
 The minimum function object. More...
 
class  AtomicNoOp
 The NoOp atomic ops. More...
 
class  AtomicOmpBuiltIn
 The OpenMP accelerators atomic ops. More...
 
struct  AtomicOr
 The or function object. More...
 
struct  AtomicSub
 The subtraction function object. More...
 
class  AtomicUniformCudaHipBuiltIn
 The GPU CUDA/HIP accelerator atomic ops. More...
 
struct  AtomicXor
 The exclusive or function object. More...
 
struct  BlockAnd
 The logical and function object. More...
 
struct  BlockCount
 The counting function object. More...
 
struct  BlockOr
 The logical or function object. More...
 
class  BlockSharedMemDynMember
 Dynamic block shared memory provider using fixed-size member array to allocate memory on the stack or in shared memory. More...
 
class  BlockSharedMemDynUniformCudaHipBuiltIn
 The GPU CUDA/HIP block shared memory allocator. More...
 
class  BlockSharedMemStMember
 Static block shared memory provider using a pointer to externally allocated fixed-size memory, likely provided by BlockSharedMemDynMember. More...
 
class  BlockSharedMemStMemberMasterSync
 
class  BlockSharedMemStUniformCudaHipBuiltIn
 The GPU CUDA/HIP block shared memory allocator. More...
 
class  BlockSyncBarrierOmp
 The OpenMP barrier block synchronization. More...
 
class  BlockSyncBarrierThread
 The thread id map barrier block synchronization. More...
 
class  BlockSyncNoOp
 The no op block synchronization. More...
 
class  BlockSyncUniformCudaHipBuiltIn
 The GPU CUDA/HIP block synchronization. More...
 
class  BufCpu
 The CPU memory buffer. More...
 
struct  BufUniformCudaHipRt
 The CUDA/HIP memory buffer. More...
 
class  Complex
 Implementation of a complex number useable on host and device. More...
 
struct  ConceptAcc
 
struct  ConceptAtomicBlocks
 
struct  ConceptAtomicGrids
 
struct  ConceptAtomicThreads
 
struct  ConceptBlockSharedDyn
 
struct  ConceptBlockSharedSt
 
struct  ConceptBlockSync
 
struct  ConceptCurrentThreadWaitFor
 
struct  ConceptIdxBt
 
struct  ConceptIdxGb
 
struct  ConceptIntrinsic
 
struct  ConceptMemAlloc
 
struct  ConceptMemFence
 
struct  ConceptPlatform
 
struct  ConceptWorkDiv
 
class  DevCpu
 The CPU device handle. More...
 
class  DevUniformCudaHipRt
 The CUDA/HIP RT device handle. More...
 
class  EventGenericThreads
 The CPU device event. More...
 
class  EventUniformCudaHipRt
 The CUDA/HIP RT device event. More...
 
class  IGenericThreadsQueue
 The CPU queue interface. More...
 
class  IntrinsicCpu
 The CPU intrinsic. More...
 
class  IntrinsicFallback
 The Fallback intrinsic. More...
 
class  IntrinsicUniformCudaHipBuiltIn
 The GPU CUDA/HIP intrinsic. More...
 
struct  IsKernelArgumentTriviallyCopyable
 Check if a type used as kernel argument is trivially copyable. More...
 
class  MemFenceCpu
 The default CPU memory fence. More...
 
class  MemFenceCpuSerial
 The serial CPU memory fence. More...
 
class  MemFenceOmp2Blocks
 The CPU OpenMP 2.0 block memory fence. More...
 
class  MemFenceOmp2Threads
 The CPU OpenMP 2.0 block memory fence. More...
 
class  MemFenceUniformCudaHipBuiltIn
 The GPU CUDA/HIP memory fence. More...
 
class  MemSetKernel
 any device ND memory set kernel. More...
 
struct  PlatformCpu
 The CPU device platform. More...
 
struct  PlatformUniformCudaHipRt
 The CUDA/HIP RT platform. More...
 
struct  QueueCpuOmp2Collective
 The CPU collective device queue. More...
 
class  QueueGenericThreadsBlocking
 The CPU device queue. More...
 
class  QueueGenericThreadsNonBlocking
 The CPU device queue. More...
 
struct  remove_restrict
 Removes restrict from a type. More...
 
struct  remove_restrict< T *__restrict__ >
 
struct  TagCpuOmp2Blocks
 
struct  TagCpuOmp2Threads
 
struct  TagCpuSerial
 
struct  TagCpuSycl
 
struct  TagCpuTbbBlocks
 
struct  TagCpuThreads
 
struct  TagFpgaSyclIntel
 
struct  TagGenericSycl
 
struct  TagGpuCudaRt
 
struct  TagGpuHipRt
 
struct  TagGpuSyclIntel
 
class  TaskKernelCpuOmp2Blocks
 The CPU OpenMP 2.0 block accelerator execution task. More...
 
class  TaskKernelCpuOmp2Threads
 The CPU OpenMP 2.0 thread accelerator execution task. More...
 
class  TaskKernelCpuSerial
 The CPU serial execution task implementation. More...
 
class  TaskKernelCpuThreads
 The CPU threads execution task. More...
 
class  TaskKernelGpuUniformCudaHipRt
 The GPU CUDA/HIP accelerator execution task. More...
 
class  Vec
 A n-dimensional vector. More...
 
struct  ViewConst
 A non-modifiable wrapper around a view. This view acts as the wrapped view, but the underlying data is only exposed const-qualified. More...
 
struct  ViewPlainPtr
 The memory view to wrap plain pointers. More...
 
class  ViewSubView
 A sub-view to a view. More...
 
class  WorkDivMembers
 A basic class holding the work division as grid block extent, block thread and thread element extent. More...
 
class  WorkDivUniformCudaHipBuiltIn
 The GPU CUDA/HIP accelerator work division. More...
 

Typedefs

template<typename T >
using Acc = typename trait::AccType< T >::type
 The accelerator type trait alias template to remove the ::type. More...
 
template<typename TDim , typename TIdx >
using AccGpuCudaRt = AccGpuUniformCudaHipRt< ApiCudaRt, TDim, TIdx >
 
template<typename TAcc >
using AccToTag = typename trait::AccToTag< TAcc >::type
 maps an acc type to a tag type More...
 
using AtomicCpu = AtomicStdLibLock< 16 >
 
template<typename TGridAtomic , typename TBlockAtomic , typename TThreadAtomic >
using AtomicHierarchy = alpaka::meta::InheritFromList< alpaka::meta::Unique< std::tuple< TGridAtomic, TBlockAtomic, TThreadAtomic, concepts::Implements< ConceptAtomicGrids, TGridAtomic >, concepts::Implements< ConceptAtomicBlocks, TBlockAtomic >, concepts::Implements< ConceptAtomicThreads, TThreadAtomic > >> >
 build a single class to inherit from different atomic implementations More...
 
template<typename THierarchy >
using AtomicHierarchyConcept = typename detail::AtomicHierarchyConceptType< THierarchy >::type
 
template<typename TDev , typename TElem , typename TDim , typename TIdx >
using Buf = typename trait::BufType< alpaka::Dev< TDev >, TElem, TDim, TIdx >::type
 The memory buffer type trait alias template to remove the ::type. More...
 
template<typename TElem , typename TDim , typename TIdx >
using BufCudaRt = BufUniformCudaHipRt< ApiCudaRt, TElem, TDim, TIdx >
 
template<typename T >
using Dev = typename trait::DevType< T >::type
 The device type trait alias template to remove the ::type. More...
 
using DevCudaRt = DevUniformCudaHipRt< ApiCudaRt >
 The CUDA RT device handle. More...
 
template<typename TAcc , typename T >
using DevGlobal = typename detail::DevGlobalTrait< typename alpaka::trait::AccToTag< TAcc >::type, T >::Type
 
template<typename T >
using Dim = typename trait::DimType< T >::type
 The dimension type trait alias template to remove the ::type. More...
 
template<std::size_t N>
using DimInt = std::integral_constant< std::size_t, N >
 
template<typename TView >
using Elem = std::remove_volatile_t< typename trait::ElemType< TView >::type >
 The element type trait alias template to remove the ::type. More...
 
template<typename T >
using Event = typename trait::EventType< T >::type
 The event type trait alias template to remove the ::type. More...
 
using EventCpu = EventGenericThreads< DevCpu >
 
using EventCudaRt = EventUniformCudaHipRt< ApiCudaRt >
 The CUDA RT device event. More...
 
template<class TDim , class TIdx >
using ExampleDefaultAcc = alpaka::AccGpuCudaRt< TDim, TIdx >
 Alias for the default accelerator used by examples. From a list of all accelerators the first one which is enabled is chosen. AccCpuSerial is selected last. More...
 
template<typename T >
using Idx = typename trait::IdxType< T >::type
 
template<typename TImpl >
using NativeHandle = decltype(getNativeHandle(std::declval< TImpl >()))
 Alias to the type of the native handle. More...
 
template<typename T >
using Platform = typename trait::PlatformType< T >::type
 The platform type trait alias template to remove the ::type. More...
 
using PlatformCudaRt = PlatformUniformCudaHipRt< ApiCudaRt >
 The CUDA RT platform. More...
 
template<typename TEnv , typename TProperty >
using Queue = typename trait::QueueType< TEnv, TProperty >::type
 Queue based on the environment and a property. More...
 
using QueueCpuBlocking = QueueGenericThreadsBlocking< DevCpu >
 
using QueueCpuNonBlocking = QueueGenericThreadsNonBlocking< DevCpu >
 
using QueueCudaRtBlocking = QueueUniformCudaHipRtBlocking< ApiCudaRt >
 The CUDA RT blocking queue. More...
 
using QueueCudaRtNonBlocking = QueueUniformCudaHipRtNonBlocking< ApiCudaRt >
 The CUDA RT non-blocking queue. More...
 
template<typename TApi >
using QueueUniformCudaHipRtBlocking = uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, true >
 The CUDA/HIP RT blocking queue. More...
 
template<typename TApi >
using QueueUniformCudaHipRtNonBlocking = uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, false >
 The CUDA/HIP RT non-blocking queue. More...
 
template<typename T >
using remove_restrict_t = typename remove_restrict< T >::type
 Helper to remove restrict from a type. More...
 
template<typename TTag , typename TDim , typename TIdx >
using TagToAcc = typename trait::TagToAcc< TTag, TDim, TIdx >::type
 maps a tag type to an acc type More...
 
template<typename TAcc , typename TDim , typename TIdx , typename TKernelFnObj , typename... TArgs>
using TaskKernelGpuCudaRt = TaskKernelGpuUniformCudaHipRt< ApiCudaRt, TAcc, TDim, TIdx, TKernelFnObj, TArgs... >
 

Enumerations

enum class  GridBlockExtentSubDivRestrictions {
  EqualExtent ,
  CloseToEqualExtent ,
  Unrestricted
}
 The grid block extent subdivision restrictions. More...
 

Functions

template<typename TElem , typename TIdx , typename TExtent , typename TQueue >
ALPAKA_FN_HOST auto 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 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 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 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 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...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicAdd (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic add operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicAnd (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic and operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicCas (TAtomic const &atomic, T *const addr, T const &compare, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic compare-and-swap operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicDec (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic decrement operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicExch (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic exchange operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicInc (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic increment operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicMax (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic max operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicMin (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic min operation. More...
 
template<typename TOp , typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOp (TAtomic const &atomic, T *const addr, T const &compare, T const &value, THierarchy const &=THierarchy()) -> T
 Executes the given operation atomically. More...
 
template<typename TOp , typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOp (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &=THierarchy()) -> T
 Executes the given operation atomically. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOr (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic or operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicSub (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic sub operation. More...
 
template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicXor (TAtomic const &atomic, T *const addr, T const &value, THierarchy const &hier=THierarchy()) -> T
 Executes an atomic xor operation. More...
 
template<typename TVal , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto castVec (TVec const &vec)
 
template<typename TVecL , typename TVecR >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto concatVec (TVecL const &vecL, TVecR const &vecR)
 
template<typename TView , typename TExtent , typename TOffsets >
auto createSubView (TView &view, TExtent const &extent, TOffsets const &offset=TExtent())
 Creates a sub view to an existing view. More...
 
template<typename TAcc , typename TWorkDiv , typename TKernelFnObj , typename... TArgs>
ALPAKA_FN_HOST auto createTaskKernel (TWorkDiv const &workDiv, TKernelFnObj const &kernelFnObj, TArgs &&... args)
 Creates a kernel execution task. More...
 
template<typename TExtent , typename TViewSrc , typename TViewDstFwd >
ALPAKA_FN_HOST auto createTaskMemcpy (TViewDstFwd &&viewDst, TViewSrc const &viewSrc, TExtent const &extent)
 Creates a memory copy task. More...
 
template<typename TExtent , typename TViewFwd >
ALPAKA_FN_HOST auto createTaskMemset (TViewFwd &&view, std::uint8_t const &byte, TExtent const &extent)
 Create a memory set task. More...
 
template<typename TDev , typename TContainer >
auto createView (TDev const &dev, TContainer &con)
 Creates a view to a contiguous container of device-accessible memory. More...
 
template<typename TDev , typename TContainer , typename TExtent >
auto createView (TDev const &dev, TContainer &con, TExtent const &extent)
 Creates a view to a contiguous container of device-accessible memory. More...
 
template<typename TDev , typename TElem , typename TExtent >
auto createView (TDev const &dev, TElem *pMem, TExtent const &extent)
 Creates a view to a device pointer. More...
 
template<typename TDev , typename TElem , typename TExtent , typename TPitch >
auto createView (TDev const &dev, TElem *pMem, TExtent const &extent, TPitch pitch)
 Creates a view to a device pointer. More...
 
template<typename T , std::size_t TuniqueId, typename TBlockSharedMemSt >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto declareSharedVar (TBlockSharedMemSt const &blockSharedMemSt) -> T &
 Declare a block shared variable. More...
 
template<typename TDim , typename TVal , typename... Vecs, typename = std::enable_if_t<(std::is_same_v<Vec<TDim, TVal>, Vecs> && ...)>>
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto elementwise_max (Vec< TDim, TVal > const &p, Vecs const &... qs) -> Vec< TDim, TVal >
 
template<typename TDim , typename TVal , typename... Vecs, typename = std::enable_if_t<(std::is_same_v<Vec<TDim, TVal>, Vecs> && ...)>>
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto elementwise_min (Vec< TDim, TVal > const &p, Vecs const &... qs) -> Vec< TDim, TVal >
 
template<typename TQueue >
ALPAKA_FN_HOST auto empty (TQueue const &queue) -> bool
 Tests if the queue is empty (all ops in the given queue have been completed). More...
 
template<typename TQueue , typename TTask >
ALPAKA_FN_HOST auto enqueue (TQueue &queue, TTask &&task) -> void
 Queues the given task in the given queue. More...
 
template<typename TAcc , typename TQueue , typename TWorkDiv , typename TKernelFnObj , typename... TArgs>
ALPAKA_FN_HOST auto exec (TQueue &queue, TWorkDiv const &workDiv, TKernelFnObj const &kernelFnObj, TArgs &&... args) -> void
 Executes the given kernel in the given queue. More...
 
template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto ffs (TIntrinsic const &intrinsic, std::int32_t value) -> std::int32_t
 Returns the 1-based position of the least significant bit set to 1 in the given 32-bit value. Returns 0 for input value 0. More...
 
template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto ffs (TIntrinsic const &intrinsic, std::int64_t value) -> std::int32_t
 Returns the 1-based position of the least significant bit set to 1 in the given 64-bit value. Returns 0 for input value 0. More...
 
template<typename TAlloc , typename T >
ALPAKA_FN_HOST auto free (TAlloc const &alloc, T const *const ptr) -> void
 Frees the memory identified by the given pointer. More...
 
template<typename TBlockSharedMemSt >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto freeSharedVars (TBlockSharedMemSt &blockSharedMemSt) -> void
 Frees all memory used by block shared variables. More...
 
template<typename TAcc , typename TDev >
ALPAKA_FN_HOST auto getAccDevProps (TDev const &dev) -> AccDevProps< Dim< TAcc >, Idx< TAcc >>
 
template<typename TAcc >
ALPAKA_FN_HOST auto getAccName () -> std::string
 
template<typename TAcc , typename TKernelFnObj , typename TDim , typename... TArgs>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getBlockSharedMemDynSizeBytes (TKernelFnObj const &kernelFnObj, Vec< TDim, Idx< TAcc >> const &blockThreadExtent, Vec< TDim, Idx< TAcc >> const &threadElemExtent, TArgs const &... args) -> std::size_t
 
template<typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getDepth (TExtent const &extent=TExtent()) -> Idx< TExtent >
 
template<typename T >
ALPAKA_FN_HOST auto getDev (T const &t)
 
template<typename TPlatform >
ALPAKA_FN_HOST auto getDevByIdx (TPlatform const &platform, std::size_t const &devIdx) -> Dev< TPlatform >
 
template<typename TPlatform >
ALPAKA_FN_HOST auto getDevCount (TPlatform const &platform)
 
template<typename TPlatform >
ALPAKA_FN_HOST auto getDevs (TPlatform const &platform) -> std::vector< Dev< TPlatform >>
 
template<typename T , typename TBlockSharedMemDyn >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto getDynSharedMem (TBlockSharedMemDyn const &blockSharedMemDyn) -> T *
 Get block shared dynamic memory. More...
 
template<std::size_t Tidx, typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getExtent (TExtent const &extent=TExtent()) -> Idx< TExtent >
 
template<typename T >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getExtentProduct (T const &object) -> Idx< T >
 
template<typename T >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getExtents (T const &object) -> Vec< Dim< T >, Idx< T >>
 
template<typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto getExtentVec (T const &object={}) -> Vec< Dim< T >, Idx< T >>
 
template<typename TDim , typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto getExtentVecEnd (T const &object={}) -> Vec< TDim, Idx< T >>
 
template<typename TDev >
ALPAKA_FN_HOST auto getFreeMemBytes (TDev const &dev) -> std::size_t
 
template<typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getHeight (TExtent const &extent=TExtent()) -> Idx< TExtent >
 
template<typename TOrigin , typename TUnit , typename TIdx , typename TWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdx (TIdx const &idx, TWorkDiv const &workDiv) -> Vec< Dim< TWorkDiv >, Idx< TIdx >>
 Get the indices requested. More...
 
template<typename TOrigin , typename TUnit , typename TIdxWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdx (TIdxWorkDiv const &idxWorkDiv) -> Vec< Dim< TIdxWorkDiv >, Idx< TIdxWorkDiv >>
 Get the indices requested. More...
 
template<typename TIdxWorkDiv , typename TGridThreadIdx , typename TThreadElemExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdxThreadFirstElem ([[maybe_unused]] TIdxWorkDiv const &idxWorkDiv, TGridThreadIdx const &gridThreadIdx, TThreadElemExtent const &threadElemExtent) -> Vec< Dim< TIdxWorkDiv >, Idx< TIdxWorkDiv >>
 Get the index of the first element this thread computes. More...
 
template<typename TIdxWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdxThreadFirstElem (TIdxWorkDiv const &idxWorkDiv) -> Vec< Dim< TIdxWorkDiv >, Idx< TIdxWorkDiv >>
 Get the index of the first element this thread computes. More...
 
template<typename TIdxWorkDiv , typename TGridThreadIdx >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdxThreadFirstElem (TIdxWorkDiv const &idxWorkDiv, TGridThreadIdx const &gridThreadIdx) -> Vec< Dim< TIdxWorkDiv >, Idx< TIdxWorkDiv >>
 Get the index of the first element this thread computes. More...
 
template<typename TDev >
ALPAKA_FN_HOST auto getMemBytes (TDev const &dev) -> std::size_t
 
template<typename TDev >
ALPAKA_FN_HOST auto getName (TDev const &dev) -> std::string
 
template<typename TImpl >
ALPAKA_FN_HOST auto getNativeHandle (TImpl const &impl)
 Get the native handle of the alpaka object. It will return the alpaka object handle if there is any, otherwise it generates a compile time error. More...
 
template<std::size_t Tidx, typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffset (TOffsets const &offsets) -> Idx< TOffsets >
 
template<typename T >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsets (T const &object) -> Vec< Dim< T >, Idx< T >>
 
template<typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto getOffsetVec (T const &object={}) -> Vec< Dim< T >, Idx< T >>
 
template<typename TDim , typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto getOffsetVecEnd (T const &object={}) -> Vec< TDim, Idx< T >>
 
template<typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsetX (TOffsets const &offsets=TOffsets()) -> Idx< TOffsets >
 
template<typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsetY (TOffsets const &offsets=TOffsets()) -> Idx< TOffsets >
 
template<typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsetZ (TOffsets const &offsets=TOffsets()) -> Idx< TOffsets >
 
template<typename TAcc , typename TKernelFnObj , typename TDim , typename... TArgs>
ALPAKA_FN_HOST auto getOmpSchedule (TKernelFnObj const &kernelFnObj, Vec< TDim, Idx< TAcc >> const &blockThreadExtent, Vec< TDim, Idx< TAcc >> const &threadElemExtent, TArgs const &... args)
 
template<std::size_t Tidx, typename TView >
ALPAKA_FN_HOST auto getPitchBytes (TView const &view) -> Idx< TView >
 
template<typename TView >
auto getPitchBytesVec (TView const &view) -> Vec< Dim< TView >, Idx< TView >>
 
template<typename TDim , typename TView >
ALPAKA_FN_HOST auto getPitchBytesVecEnd (TView const &view=TView()) -> Vec< TDim, Idx< TView >>
 
template<typename TView >
ALPAKA_FN_HOST auto getPitchesInBytes (TView const &view) -> Vec< Dim< TView >, Idx< TView >>
 
template<typename TDev >
constexpr ALPAKA_FN_HOST auto getPreferredWarpSize (TDev const &dev) -> std::size_t
 
template<typename TView , typename TDev >
ALPAKA_FN_HOST auto getPtrDev (TView &view, TDev const &dev) -> Elem< TView > *
 Gets the pointer to the view on the given device. More...
 
template<typename TView , typename TDev >
ALPAKA_FN_HOST auto getPtrDev (TView const &view, TDev const &dev) -> Elem< TView > const *
 Gets the pointer to the view on the given device. More...
 
template<typename TView >
ALPAKA_FN_HOST auto getPtrNative (TView &view) -> Elem< TView > *
 Gets the native pointer of the memory view. More...
 
template<typename TView >
ALPAKA_FN_HOST auto getPtrNative (TView const &view) -> Elem< TView > const *
 Gets the native pointer of the memory view. More...
 
template<typename TAcc , typename TDev , typename TGridElemExtent = Vec<Dim<TAcc>, Idx<TAcc>>, typename TThreadElemExtent = Vec<Dim<TAcc>, Idx<TAcc>>>
ALPAKA_FN_HOST auto getValidWorkDiv ([[maybe_unused]] TDev const &dev, [[maybe_unused]] TGridElemExtent const &gridElemExtent=Vec< Dim< TAcc >, Idx< TAcc >>::ones(), [[maybe_unused]] TThreadElemExtent const &threadElemExtents=Vec< Dim< TAcc >, Idx< TAcc >>::ones(), [[maybe_unused]] bool blockThreadMustDivideGridThreadExtent=true, [[maybe_unused]] GridBlockExtentSubDivRestrictions gridBlockExtentSubDivRestrictions=GridBlockExtentSubDivRestrictions::Unrestricted) -> WorkDivMembers< Dim< TGridElemExtent >, Idx< TGridElemExtent >>
 
template<typename TDev >
ALPAKA_FN_HOST auto getWarpSizes (TDev const &dev) -> std::vector< std::size_t >
 
template<typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getWidth (TExtent const &extent=TExtent()) -> Idx< TExtent >
 
template<typename TOrigin , typename TUnit , typename TWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getWorkDiv (TWorkDiv const &workDiv) -> Vec< Dim< TWorkDiv >, Idx< TWorkDiv >>
 Get the extent requested. More...
 
template<typename TEvent >
ALPAKA_FN_HOST auto isComplete (TEvent const &event) -> bool
 Tests if the given event has already been completed. More...
 
template<typename T >
void isSupportedByAtomicAtomicRef ()
 
template<typename TDim , typename TIdx >
ALPAKA_FN_HOST auto isValidAccDevProps (AccDevProps< TDim, TIdx > const &accDevProps) -> bool
 
template<typename TDim , typename TIdx , typename TWorkDiv >
ALPAKA_FN_HOST auto isValidWorkDiv (AccDevProps< TDim, TIdx > const &accDevProps, TWorkDiv const &workDiv) -> bool
 
template<typename TAcc , typename TDev , typename TWorkDiv >
ALPAKA_FN_HOST auto isValidWorkDiv (TDev const &dev, TWorkDiv const &workDiv) -> bool
 
template<typename T , typename TAlloc >
ALPAKA_FN_HOST auto malloc (TAlloc const &alloc, std::size_t const &sizeElems) -> T *
 
template<std::size_t TDimOut, std::size_t TDimIn, std::size_t TDimExtents, typename TElem >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto mapIdx (Vec< DimInt< TDimIn >, TElem > const &in, Vec< DimInt< TDimExtents >, TElem > const &extent) -> Vec< DimInt< TDimOut >, TElem >
 Maps an N-dimensional index to an N-dimensional position. At least one dimension must always be 1 or zero. More...
 
template<std::size_t TDimOut, std::size_t TDimIn, std::size_t TidxDimPitch, typename TElem >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto mapIdxPitchBytes (Vec< DimInt< TDimIn >, TElem > const &in, Vec< DimInt< TidxDimPitch >, TElem > const &pitches) -> Vec< DimInt< TDimOut >, TElem >
 Maps an N dimensional index to a N dimensional position based on the pitches of a view without padding or a byte view. At least one dimension must always be 1 or zero. More...
 
template<typename TMemFence , typename TMemScope >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto mem_fence (TMemFence const &fence, TMemScope const &scope) -> void
 Issues memory fence instructions. More...
 
template<typename TTag , typename TViewSrc , typename TTypeDst , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto memcpy (TQueue &queue, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &viewDst, TViewSrc const &viewSrc) -> void
 
template<typename TTag , typename TExtent , typename TViewSrc , typename TTypeDst , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto memcpy (TQueue &queue, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &viewDst, TViewSrc const &viewSrc, TExtent const &extent) -> void
 
template<typename TTag , typename TTypeSrc , typename TViewDstFwd , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto memcpy (TQueue &queue, TViewDstFwd &&viewDst, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &viewSrc) -> void
 
template<typename TTag , typename TExtent , typename TTypeSrc , typename TViewDstFwd , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto memcpy (TQueue &queue, TViewDstFwd &&viewDst, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &viewSrc, TExtent const &extent) -> void
 
template<typename TViewSrc , typename TViewDstFwd , typename TQueue >
ALPAKA_FN_HOST auto memcpy (TQueue &queue, TViewDstFwd &&viewDst, TViewSrc const &viewSrc) -> void
 Copies the entire memory of viewSrc to viewDst. Possibly copies between different memory spaces. More...
 
template<typename TExtent , typename TViewSrc , typename TViewDstFwd , typename TQueue >
ALPAKA_FN_HOST auto memcpy (TQueue &queue, TViewDstFwd &&viewDst, TViewSrc const &viewSrc, TExtent const &extent) -> void
 Copies memory from a part of viewSrc to viewDst, described by extent. Possibly copies between different memory spaces. More...
 
template<typename TTag , typename TApi , bool TBlocking, typename TTypeDst , typename TViewSrc , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto memcpy (uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &queue, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &viewDst, TViewSrc const &viewSrc)
 
template<typename TTag , typename TApi , bool TBlocking, typename TTypeDst , typename TViewSrc , typename TExtent , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto memcpy (uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &queue, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &viewDst, TViewSrc const &viewSrc, TExtent extent)
 
template<typename TTag , typename TApi , bool TBlocking, typename TViewDst , typename TTypeSrc , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto memcpy (uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &queue, TViewDst &viewDst, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &viewSrc)
 
template<typename TTag , typename TApi , bool TBlocking, typename TViewDst , typename TTypeSrc , typename TExtent , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto memcpy (uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &queue, TViewDst &viewDst, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &viewSrc, TExtent extent)
 
template<typename TViewFwd , typename TQueue >
ALPAKA_FN_HOST auto memset (TQueue &queue, TViewFwd &&view, std::uint8_t const &byte) -> void
 Sets each byte of the memory of the entire view to the given value. More...
 
template<typename TExtent , typename TViewFwd , typename TQueue >
ALPAKA_FN_HOST auto memset (TQueue &queue, TViewFwd &&view, std::uint8_t const &byte, TExtent const &extent) -> void
 Sets the bytes of the memory of view, described by extent, to the given value. More...
 
template<typename T , typename TChar , typename TTraits >
std::basic_ostream< TChar, TTraits > & operator<< (std::basic_ostream< TChar, TTraits > &os, Complex< T > const &x)
 Host-only output of a complex number. More...
 
template<typename T , typename TChar , typename TTraits >
std::basic_istream< TChar, TTraits > & operator>> (std::basic_istream< TChar, TTraits > &is, Complex< T > const &x)
 Host-only input of a complex number. More...
 
template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto popcount (TIntrinsic const &intrinsic, std::uint32_t value) -> std::int32_t
 Returns the number of 1 bits in the given 32-bit value. More...
 
template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto popcount (TIntrinsic const &intrinsic, std::uint64_t value) -> std::int32_t
 Returns the number of 1 bits in the given 64-bit value. More...
 
template<typename TView >
ALPAKA_FN_HOST auto print (TView const &view, std::ostream &os, std::string const &elementSeparator=", ", std::string const &rowSeparator="\n", std::string const &rowPrefix="[", std::string const &rowSuffix="]") -> void
 Prints the content of the view to the given queue. More...
 
template<typename TDev >
ALPAKA_FN_HOST auto reset (TDev const &dev) -> void
 Resets the device. What this method does is dependent on the accelerator. More...
 
template<typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto reverseVec (TVec const &vec)
 
template<typename TDim , typename TIdx >
ALPAKA_FN_HOST auto subDivideGridElems (Vec< TDim, TIdx > const &gridElemExtent, Vec< TDim, TIdx > const &threadElemExtent, AccDevProps< TDim, TIdx > const &accDevProps, bool blockThreadMustDivideGridThreadExtent=true, GridBlockExtentSubDivRestrictions gridBlockExtentSubDivRestrictions=GridBlockExtentSubDivRestrictions::Unrestricted) -> WorkDivMembers< TDim, TIdx >
 Subdivides the given grid thread extent into blocks restricted by the maxima allowed. More...
 
template<typename TSubDim , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto subVecBegin (TVec const &vec)
 
template<typename TSubDim , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto subVecEnd (TVec const &vec)
 
template<typename TIndexSequence , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto subVecFromIndices (TVec const &vec)
 Builds a new vector by selecting the elements of the source vector in the given order. Repeating and swizzling elements is allowed. More...
 
template<typename TBlockSync >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto syncBlockThreads (TBlockSync const &blockSync) -> void
 Synchronizes all threads within the current block (independently for all blocks). More...
 
template<typename TOp , typename TBlockSync >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto syncBlockThreadsPredicate (TBlockSync const &blockSync, int predicate) -> int
 Synchronizes all threads within the current block (independently for all blocks), evaluates the predicate for all threads and returns the combination of all the results computed via TOp. More...
 
template<typename TDim , typename TVal >
constexpr ALPAKA_FN_HOST_ACC auto toArray (Vec< TDim, TVal > const &v) -> std::array< TVal, TDim::value >
 Converts a Vec to a std::array. More...
 
template<typename TFirstIndex , typename... TRestIndices>
 Vec (TFirstIndex &&, TRestIndices &&...) -> Vec< DimInt< 1+sizeof...(TRestIndices)>, std::decay_t< TFirstIndex >>
 
template<typename TView >
 ViewConst (TView) -> ViewConst< std::decay_t< TView >>
 
template<typename TAwaited >
ALPAKA_FN_HOST auto wait (TAwaited const &awaited) -> void
 Waits the thread for the completion of the given awaited action to complete. More...
 
template<typename TWaiter , typename TAwaited >
ALPAKA_FN_HOST auto wait (TWaiter &waiter, TAwaited const &awaited) -> void
 The waiter waits for the given awaited action to complete. More...
 
template<typename TDim , typename TIdx >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC WorkDivMembers (alpaka::Vec< TDim, TIdx > const &gridBlockExtent, alpaka::Vec< TDim, TIdx > const &blockThreadExtent, alpaka::Vec< TDim, TIdx > const &elemExtent) -> WorkDivMembers< TDim, TIdx >
 Deduction guide for the constructor which can be called without explicit template type parameters. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator+ (Complex< T > const &val)
 Host-device arithmetic operations matching std::complex<T>. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator- (Complex< T > const &val)
 Unary minus. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator+ (Complex< T > const &lhs, Complex< T > const &rhs)
 Addition of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator+ (Complex< T > const &lhs, T const &rhs)
 Addition of a complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator+ (T const &lhs, Complex< T > const &rhs)
 Addition of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator- (Complex< T > const &lhs, Complex< T > const &rhs)
 Subtraction of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator- (Complex< T > const &lhs, T const &rhs)
 Subtraction of a complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator- (T const &lhs, Complex< T > const &rhs)
 Subtraction of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator* (Complex< T > const &lhs, Complex< T > const &rhs)
 Muptiplication of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator* (Complex< T > const &lhs, T const &rhs)
 Muptiplication of a complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator* (T const &lhs, Complex< T > const &rhs)
 Muptiplication of a real and a complex number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator/ (Complex< T > const &lhs, Complex< T > const &rhs)
 Division of two complex numbers. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator/ (Complex< T > const &lhs, T const &rhs)
 Division of complex and a real number. More...
 
template<typename T >
ALPAKA_FN_HOST_ACC Complex< T > operator/ (T const &lhs, Complex< T > const &rhs)
 Division of a real and a complex number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool operator== (Complex< T > const &lhs, Complex< T > const &rhs)
 Equality of two complex numbers. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool operator== (Complex< T > const &lhs, T const &rhs)
 Equality of a complex and a real number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool operator== (T const &lhs, Complex< T > const &rhs)
 Equality of a real and a complex number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool operator!= (Complex< T > const &lhs, Complex< T > const &rhs)
 Inequality of two complex numbers. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool operator!= (Complex< T > const &lhs, T const &rhs)
 Inequality of a complex and a real number. More...
 
template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool operator!= (T const &lhs, Complex< T > const &rhs)
 Inequality of a real and a complex number. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACCabs (Complex< T > const &x)
 Host-only math functions matching std::complex<T>. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > acos (Complex< T > const &x)
 Arc cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > acosh (Complex< T > const &x)
 Arc hyperbolic cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACCarg (Complex< T > const &x)
 Argument. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > asin (Complex< T > const &x)
 Arc sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > asinh (Complex< T > const &x)
 Arc hyperbolic sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > atan (Complex< T > const &x)
 Arc tangent. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > atanh (Complex< T > const &x)
 Arc hyperbolic tangent. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > conj (Complex< T > const &x)
 Complex conjugate. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > cos (Complex< T > const &x)
 Cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > cosh (Complex< T > const &x)
 Hyperbolic cosine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > exp (Complex< T > const &x)
 Exponential. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > log (Complex< T > const &x)
 Natural logarithm. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > log10 (Complex< T > const &x)
 Base 10 logarithm. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACCnorm (Complex< T > const &x)
 Squared magnitude. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > polar (T const &r, T const &theta=T())
 Get a complex number with given magnitude and phase angle. More...
 
template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto pow (Complex< T > const &x, Complex< U > const &y)
 Complex power of a complex number. More...
 
template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto pow (Complex< T > const &x, U const &y)
 Real power of a complex number. More...
 
template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto pow (T const &x, Complex< U > const &y)
 Complex power of a real number. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > proj (Complex< T > const &x)
 Projection onto the Riemann sphere. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > sin (Complex< T > const &x)
 Sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > sinh (Complex< T > const &x)
 Hyperbolic sine. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > sqrt (Complex< T > const &x)
 Square root. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > tan (Complex< T > const &x)
 Tangent. More...
 
template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex< T > tanh (Complex< T > const &x)
 Hyperbolic tangent. More...
 

Variables

template<typename TAcc , typename... TTag>
constexpr bool accMatchesTags = (std::is_same_v<alpaka::AccToTag<TAcc>, TTag> || ...)
 
constexpr std::uint32_t BlockSharedDynMemberAllocKiB = 47u
 
template<typename TDev , typename TDim >
constexpr bool 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 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...
 
template<typename T , typename U >
constexpr auto is_decayed_v = std::is_same_v<std::decay_t<T>, std::decay_t<U>>
 Provides a decaying wrapper around std::is_same. Example: is_decayed_v<volatile float, float> returns true. More...
 
template<typename TAcc >
constexpr bool isAccelerator = concepts::ImplementsConcept<ConceptAcc, TAcc>::value
 True if TAcc is an accelerator, i.e. if it implements the ConceptAcc concept. More...
 
template<typename TDev >
constexpr bool isDevice = concepts::ImplementsConcept<ConceptDev, TDev>::value
 True if TDev is a device, i.e. if it implements the ConceptDev concept. More...
 
template<typename TPlatform >
constexpr bool isPlatform = concepts::ImplementsConcept<ConceptPlatform, TPlatform>::value
 True if TPlatform is a platform, i.e. if it implements the ConceptPlatform concept. More...
 
template<typename TQueue >
constexpr bool isQueue = concepts::ImplementsConcept<ConceptQueue, TQueue>::value
 True if TQueue is a queue, i.e. if it implements the ConceptQueue concept. More...
 
template<typename T >
constexpr bool isVec = false
 
template<typename TDim , typename TVal >
constexpr bool isVec< Vec< TDim, TVal > > = true
 
template<typename T >
constexpr bool isKernelArgumentTriviallyCopyable = IsKernelArgumentTriviallyCopyable<T>::value
 

Detailed Description

The alpaka accelerator library.

The alpaka library.

Typedef Documentation

◆ Acc

template<typename T >
using alpaka::Acc = typedef typename trait::AccType<T>::type

The accelerator type trait alias template to remove the ::type.

Definition at line 58 of file Traits.hpp.

◆ AccGpuCudaRt

template<typename TDim , typename TIdx >
using alpaka::AccGpuCudaRt = typedef AccGpuUniformCudaHipRt<ApiCudaRt, TDim, TIdx>

Definition at line 16 of file AccGpuCudaRt.hpp.

◆ AccToTag

template<typename TAcc >
using alpaka::AccToTag = typedef typename trait::AccToTag<TAcc>::type

maps an acc type to a tag type

Template Parameters
TAccalpaka acc type

Definition at line 47 of file Tag.hpp.

◆ AtomicCpu

using alpaka::AtomicCpu = typedef AtomicStdLibLock<16>

Definition at line 21 of file AtomicCpu.hpp.

◆ AtomicHierarchy

template<typename TGridAtomic , typename TBlockAtomic , typename TThreadAtomic >
using alpaka::AtomicHierarchy = typedef alpaka::meta::InheritFromList<alpaka::meta::Unique<std::tuple< TGridAtomic, TBlockAtomic, TThreadAtomic, concepts::Implements<ConceptAtomicGrids, TGridAtomic>, concepts::Implements<ConceptAtomicBlocks, TBlockAtomic>, concepts::Implements<ConceptAtomicThreads, TThreadAtomic> >> >

build a single class to inherit from different atomic implementations

Definition at line 27 of file AtomicHierarchy.hpp.

◆ AtomicHierarchyConcept

template<typename THierarchy >
using alpaka::AtomicHierarchyConcept = typedef typename detail::AtomicHierarchyConceptType<THierarchy>::type

Definition at line 53 of file Traits.hpp.

◆ Buf

template<typename TDev , typename TElem , typename TDim , typename TIdx >
using alpaka::Buf = typedef typename trait::BufType<alpaka::Dev<TDev>, TElem, TDim, TIdx>::type

The memory buffer type trait alias template to remove the ::type.

Definition at line 52 of file Traits.hpp.

◆ BufCudaRt

template<typename TElem , typename TDim , typename TIdx >
using alpaka::BufCudaRt = typedef BufUniformCudaHipRt<ApiCudaRt, TElem, TDim, TIdx>

Definition at line 15 of file BufCudaRt.hpp.

◆ Dev

template<typename T >
using alpaka::Dev = typedef typename trait::DevType<T>::type

The device type trait alias template to remove the ::type.

Definition at line 56 of file Traits.hpp.

◆ DevCudaRt

The CUDA RT device handle.

Definition at line 15 of file DevCudaRt.hpp.

◆ DevGlobal

template<typename TAcc , typename T >
using alpaka::DevGlobal = typedef typename detail::DevGlobalTrait<typename alpaka::trait::AccToTag<TAcc>::type, T>::Type

Definition at line 44 of file Traits.hpp.

◆ Dim

template<typename T >
using alpaka::Dim = typedef typename trait::DimType<T>::type

The dimension type trait alias template to remove the ::type.

Definition at line 19 of file Traits.hpp.

◆ DimInt

template<std::size_t N>
using alpaka::DimInt = typedef std::integral_constant<std::size_t, N>

Definition at line 15 of file DimIntegralConst.hpp.

◆ Elem

template<typename TView >
using alpaka::Elem = typedef std::remove_volatile_t<typename trait::ElemType<TView>::type>

The element type trait alias template to remove the ::type.

Definition at line 21 of file Traits.hpp.

◆ Event

template<typename T >
using alpaka::Event = typedef typename trait::EventType<T>::type

The event type trait alias template to remove the ::type.

Definition at line 26 of file Traits.hpp.

◆ EventCpu

Definition at line 12 of file EventCpu.hpp.

◆ EventCudaRt

The CUDA RT device event.

Definition at line 15 of file EventCudaRt.hpp.

◆ ExampleDefaultAcc

template<class TDim , class TIdx >
using alpaka::ExampleDefaultAcc = typedef alpaka::AccGpuCudaRt<TDim, TIdx>

Alias for the default accelerator used by examples. From a list of all accelerators the first one which is enabled is chosen. AccCpuSerial is selected last.

Definition at line 16 of file ExampleDefaultAcc.hpp.

◆ Idx

template<typename T >
using alpaka::Idx = typedef typename trait::IdxType<T>::type

Definition at line 29 of file Traits.hpp.

◆ NativeHandle

template<typename TImpl >
using alpaka::NativeHandle = typedef decltype(getNativeHandle(std::declval<TImpl>()))

Alias to the type of the native handle.

Definition at line 36 of file Traits.hpp.

◆ Platform

template<typename T >
using alpaka::Platform = typedef typename trait::PlatformType<T>::type

The platform type trait alias template to remove the ::type.

Definition at line 51 of file Traits.hpp.

◆ PlatformCudaRt

The CUDA RT platform.

Definition at line 15 of file PlatformCudaRt.hpp.

◆ Queue

template<typename TEnv , typename TProperty >
using alpaka::Queue = typedef typename trait::QueueType<TEnv, TProperty>::type

Queue based on the environment and a property.

Template Parameters
TEnvEnvironment type, e.g. accelerator, device or a platform. trait::QueueType must be specialized for TEnv
TPropertyProperty to define the behavior of TEnv.

Definition at line 70 of file Traits.hpp.

◆ QueueCpuBlocking

◆ QueueCpuNonBlocking

◆ QueueCudaRtBlocking

The CUDA RT blocking queue.

Definition at line 15 of file QueueCudaRtBlocking.hpp.

◆ QueueCudaRtNonBlocking

The CUDA RT non-blocking queue.

Definition at line 15 of file QueueCudaRtNonBlocking.hpp.

◆ QueueUniformCudaHipRtBlocking

template<typename TApi >
using alpaka::QueueUniformCudaHipRtBlocking = typedef uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, true>

The CUDA/HIP RT blocking queue.

Definition at line 43 of file DevUniformCudaHipRt.hpp.

◆ QueueUniformCudaHipRtNonBlocking

The CUDA/HIP RT non-blocking queue.

Definition at line 46 of file DevUniformCudaHipRt.hpp.

◆ remove_restrict_t

template<typename T >
using alpaka::remove_restrict_t = typedef typename remove_restrict<T>::type

Helper to remove restrict from a type.

Definition at line 34 of file RemoveRestrict.hpp.

◆ TagToAcc

template<typename TTag , typename TDim , typename TIdx >
using alpaka::TagToAcc = typedef typename trait::TagToAcc<TTag, TDim, TIdx>::type

maps a tag type to an acc type

Template Parameters
TTagalpaka tag type
TDimdimension of the mapped acc type
TIdxindex type of the mapped acc type

Definition at line 54 of file Tag.hpp.

◆ TaskKernelGpuCudaRt

template<typename TAcc , typename TDim , typename TIdx , typename TKernelFnObj , typename... TArgs>
using alpaka::TaskKernelGpuCudaRt = typedef TaskKernelGpuUniformCudaHipRt<ApiCudaRt, TAcc, TDim, TIdx, TKernelFnObj, TArgs...>

Definition at line 15 of file TaskKernelGpuCudaRt.hpp.

Enumeration Type Documentation

◆ GridBlockExtentSubDivRestrictions

The grid block extent subdivision restrictions.

Enumerator
EqualExtent 

The block thread extent will be equal in all dimensions.

CloseToEqualExtent 

The block thread extent will be as close to equal as possible in all dimensions.

Unrestricted 

The block thread extent will not have any restrictions.

Definition at line 27 of file WorkDivHelpers.hpp.

Function Documentation

◆ abs()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T alpaka::abs ( Complex< T > const &  x)
constexpr

Host-only math functions matching std::complex<T>.

Due to issue #1688, these functions are technically marked host-device and suppress related warnings. However, they must be called for host only.

They take and return alpaka::Complex (or a real number when appropriate). Internally cast, fall back to std::complex implementation and cast back. These functions can be used directly on the host side. They are also picked up by ADL in math traits for CPU backends.

On the device side, alpaka math traits must be used instead. Note that the set of the traits is currently a bit smaller. Absolute value

Definition at line 371 of file Complex.hpp.

◆ acos()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::acos ( Complex< T > const &  x)
constexpr

Arc cosine.

Definition at line 379 of file Complex.hpp.

◆ acosh()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::acosh ( Complex< T > const &  x)
constexpr

Arc hyperbolic cosine.

Definition at line 387 of file Complex.hpp.

◆ allocAsyncBuf()

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.

Template Parameters
TElemThe element type of the returned buffer.
TIdxThe linear index type of the buffer.
TExtentThe extent type of the buffer.
TQueueThe type of queue used to order the buffer allocation.
Parameters
queueThe queue used to order the buffer allocation.
extentThe extent of the buffer.
Returns
The newly allocated buffer.

Definition at line 79 of file Traits.hpp.

◆ allocAsyncBufIfSupported()

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.

Template Parameters
TElemThe element type of the returned buffer.
TIdxThe linear index type of the buffer.
TExtentThe extent type of the buffer.
TQueueThe type of queue used to order the buffer allocation.
Parameters
queueThe queue used to order the buffer allocation.
extentThe extent of the buffer.
Returns
The newly allocated buffer.

Definition at line 114 of file Traits.hpp.

◆ allocBuf()

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.

Template Parameters
TElemThe element type of the returned buffer.
TIdxThe linear index type of the buffer.
TExtentThe extent type of the buffer.
TDevThe type of device the buffer is allocated on.
Parameters
devThe device to allocate the buffer on.
extentThe extent of the buffer.
Returns
The newly allocated buffer.

Definition at line 64 of file Traits.hpp.

◆ allocMappedBuf()

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.

Template Parameters
TPlatformThe platform from which the buffer is accessible.
TElemThe element type of the returned buffer.
TIdxThe linear index type of the buffer.
TExtentThe extent type of the buffer.
Parameters
hostThe host device to allocate the buffer on.
extentThe extent of the buffer.
Returns
The newly allocated buffer.

Definition at line 138 of file Traits.hpp.

◆ allocMappedBufIfSupported()

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.

Template Parameters
TElemThe element type of the returned buffer.
TIdxThe linear index type of the buffer.
TExtentThe extent type of the buffer.
TPlatformThe platform from which the buffer is accessible.
Parameters
hostThe host device to allocate the buffer on.
extentThe extent of the buffer.
Returns
The newly allocated buffer.

Definition at line 175 of file Traits.hpp.

◆ arg()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T alpaka::arg ( Complex< T > const &  x)
constexpr

Argument.

Definition at line 395 of file Complex.hpp.

◆ asin()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::asin ( Complex< T > const &  x)
constexpr

Arc sine.

Definition at line 403 of file Complex.hpp.

◆ asinh()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::asinh ( Complex< T > const &  x)
constexpr

Arc hyperbolic sine.

Definition at line 411 of file Complex.hpp.

◆ atan()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::atan ( Complex< T > const &  x)
constexpr

Arc tangent.

Definition at line 419 of file Complex.hpp.

◆ atanh()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::atanh ( Complex< T > const &  x)
constexpr

Arc hyperbolic tangent.

Definition at line 427 of file Complex.hpp.

◆ atomicAdd()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicAdd ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic add operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 114 of file Traits.hpp.

◆ atomicAnd()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicAnd ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic and operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 240 of file Traits.hpp.

◆ atomicCas()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicCas ( TAtomic const &  atomic,
T *const  addr,
T const &  compare,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic compare-and-swap operation.

Template Parameters
TAtomicThe atomic implementation type.
TThe value type.
Parameters
atomicThe atomic implementation.
addrThe value to change atomically.
compareThe comparison value used in the atomic operation.
valueThe value used in the atomic operation.

Definition at line 295 of file Traits.hpp.

◆ atomicDec()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicDec ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic decrement operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 222 of file Traits.hpp.

◆ atomicExch()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicExch ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic exchange operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 186 of file Traits.hpp.

◆ atomicInc()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicInc ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic increment operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 204 of file Traits.hpp.

◆ atomicMax()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicMax ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic max operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 168 of file Traits.hpp.

◆ atomicMin()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicMin ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic min operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 150 of file Traits.hpp.

◆ atomicOp() [1/2]

template<typename TOp , typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicOp ( TAtomic const &  atomic,
T *const  addr,
T const &  compare,
T const &  value,
THierarchy const &  = THierarchy() 
) -> T

Executes the given operation atomically.

Template Parameters
TOpThe operation type.
TAtomicThe atomic implementation type.
TThe value type.
Parameters
atomicThe atomic implementation.
addrThe value to change atomically.
compareThe comparison value used in the atomic operation.
valueThe value used in the atomic operation.

Definition at line 94 of file Traits.hpp.

◆ atomicOp() [2/2]

template<typename TOp , typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicOp ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  = THierarchy() 
) -> T

Executes the given operation atomically.

Template Parameters
TOpThe operation type.
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 73 of file Traits.hpp.

◆ atomicOr()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicOr ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic or operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 258 of file Traits.hpp.

◆ atomicSub()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicSub ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic sub operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 132 of file Traits.hpp.

◆ atomicXor()

template<typename TAtomic , typename T , typename THierarchy = hierarchy::Grids>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::atomicXor ( TAtomic const &  atomic,
T *const  addr,
T const &  value,
THierarchy const &  hier = THierarchy() 
) -> T

Executes an atomic xor operation.

Template Parameters
TThe value type.
TAtomicThe atomic implementation type.
Parameters
addrThe value to change atomically.
valueThe value used in the atomic operation.
atomicThe atomic implementation.

Definition at line 276 of file Traits.hpp.

◆ castVec()

template<typename TVal , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::castVec ( TVec const &  vec)
constexpr
Returns
The casted vector.

Definition at line 82 of file Traits.hpp.

◆ concatVec()

template<typename TVecL , typename TVecR >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::concatVec ( TVecL const &  vecL,
TVecR const &  vecR 
)
constexpr
Returns
The concatenated vector.

Definition at line 98 of file Traits.hpp.

◆ conj()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::conj ( Complex< T > const &  x)
constexpr

Complex conjugate.

Definition at line 435 of file Complex.hpp.

◆ cos()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::cos ( Complex< T > const &  x)
constexpr

Cosine.

Definition at line 443 of file Complex.hpp.

◆ cosh()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::cosh ( Complex< T > const &  x)
constexpr

Hyperbolic cosine.

Definition at line 451 of file Complex.hpp.

◆ createSubView()

template<typename TView , typename TExtent , typename TOffsets >
auto alpaka::createSubView ( TView &  view,
TExtent const &  extent,
TOffsets const &  offset = TExtent() 
)

Creates a sub view to an existing view.

Parameters
viewThe view this view is a sub-view of.
extentNumber of elements the resulting view holds.
offsetNumber of elements skipped in view for the new origin of the resulting view.
Returns
A sub view to a existing view.

Definition at line 494 of file Traits.hpp.

◆ createTaskKernel()

template<typename TAcc , typename TWorkDiv , typename TKernelFnObj , typename... TArgs>
ALPAKA_FN_HOST auto alpaka::createTaskKernel ( TWorkDiv const &  workDiv,
TKernelFnObj const &  kernelFnObj,
TArgs &&...  args 
)

Creates a kernel execution task.

Template Parameters
TAccThe accelerator type.
Parameters
workDivThe index domain work division.
kernelFnObjThe kernel function object which should be executed.
args,...The kernel invocation arguments.
Returns
The kernel execution task.

Definition at line 262 of file Traits.hpp.

◆ createTaskMemcpy()

template<typename TExtent , typename TViewSrc , typename TViewDstFwd >
ALPAKA_FN_HOST auto alpaka::createTaskMemcpy ( TViewDstFwd &&  viewDst,
TViewSrc const &  viewSrc,
TExtent const &  extent 
)

Creates a memory copy task.

Parameters
viewDstThe destination memory view.
viewSrcThe source memory view.
extentThe extent of the view to copy.

Definition at line 253 of file Traits.hpp.

◆ createTaskMemset()

template<typename TExtent , typename TViewFwd >
ALPAKA_FN_HOST auto alpaka::createTaskMemset ( TViewFwd &&  view,
std::uint8_t const &  byte,
TExtent const &  extent 
)

Create a memory set task.

Parameters
viewThe memory view to fill.
byteValue to set for each element of the specified view.
extentThe extent of the view to fill.

Definition at line 207 of file Traits.hpp.

◆ createView() [1/4]

template<typename TDev , typename TContainer >
auto alpaka::createView ( TDev const &  dev,
TContainer &  con 
)

Creates a view to a contiguous container of device-accessible memory.

Parameters
devDevice from which the container can be accessed.
conContiguous container. The container must provide a data() method. The data held by the container must be accessible from the given device. The GetExtent trait must be defined for the container.
Returns
A view to device memory.

Definition at line 468 of file Traits.hpp.

◆ createView() [2/4]

template<typename TDev , typename TContainer , typename TExtent >
auto alpaka::createView ( TDev const &  dev,
TContainer &  con,
TExtent const &  extent 
)

Creates a view to a contiguous container of device-accessible memory.

Parameters
devDevice from which the container can be accessed.
conContiguous container. The container must provide a data() method. The data held by the container must be accessible from the given device. The GetExtent trait must be defined for the container.
extentNumber of elements held by the container. Using a multi-dimensional extent will result in a multi-dimensional view to the memory represented by the container.
Returns
A view to device memory.

Definition at line 482 of file Traits.hpp.

◆ createView() [3/4]

template<typename TDev , typename TElem , typename TExtent >
auto alpaka::createView ( TDev const &  dev,
TElem *  pMem,
TExtent const &  extent 
)

Creates a view to a device pointer.

Parameters
devDevice from where pMem can be accessed.
pMemPointer to memory. The pointer must be accessible from the given device.
extentNumber of elements represented by the pMem. Using a multi dimensional extent will result in a multi dimension view to the memory represented by pMem.
Returns
A view to device memory.

Definition at line 434 of file Traits.hpp.

◆ createView() [4/4]

template<typename TDev , typename TElem , typename TExtent , typename TPitch >
auto alpaka::createView ( TDev const &  dev,
TElem *  pMem,
TExtent const &  extent,
TPitch  pitch 
)

Creates a view to a device pointer.

Parameters
devDevice from where pMem can be accessed.
pMemPointer to memory. The pointer must be accessible from the given device.
extentNumber of elements represented by the pMem. Using a multi dimensional extent will result in a multi dimension view to the memory represented by pMem.
pitchPitch in bytes for each dimension. Dimensionality must be equal to extent.
Returns
A view to device memory.

Definition at line 456 of file Traits.hpp.

◆ declareSharedVar()

template<typename T , std::size_t TuniqueId, typename TBlockSharedMemSt >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::declareSharedVar ( TBlockSharedMemSt const &  blockSharedMemSt) -> T&

Declare a block shared variable.

The variable is uninitialized and not default constructed! The variable can be accessed by all threads within a block. Access to the variable is not thread safe.

Template Parameters
TThe element type.
TuniqueIdid those is unique inside a kernel
TBlockSharedMemStThe block shared allocator implementation type.
Parameters
blockSharedMemStThe block shared allocator implementation.
Returns
Uninitialized variable stored in shared memory.

Definition at line 42 of file Traits.hpp.

◆ elementwise_max()

template<typename TDim , typename TVal , typename... Vecs, typename = std::enable_if_t<(std::is_same_v<Vec<TDim, TVal>, Vecs> && ...)>>
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::elementwise_max ( Vec< TDim, TVal > const &  p,
Vecs const &...  qs 
) -> Vec<TDim, TVal>
constexpr
Returns
The element-wise maximum of one or more vectors.

Definition at line 649 of file Vec.hpp.

◆ elementwise_min()

template<typename TDim , typename TVal , typename... Vecs, typename = std::enable_if_t<(std::is_same_v<Vec<TDim, TVal>, Vecs> && ...)>>
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::elementwise_min ( Vec< TDim, TVal > const &  p,
Vecs const &...  qs 
) -> Vec<TDim, TVal>
constexpr
Returns
The element-wise minimum of one or more vectors.

Definition at line 627 of file Vec.hpp.

◆ empty()

template<typename TQueue >
ALPAKA_FN_HOST auto alpaka::empty ( TQueue const &  queue) -> bool

Tests if the queue is empty (all ops in the given queue have been completed).

Warning
This function is allowed to return false negatives. An empty queue can reported as non empty because the status information are not fully propagated by the used alpaka backend.
Returns
true queue is empty else false.

Definition at line 58 of file Traits.hpp.

◆ enqueue()

template<typename TQueue , typename TTask >
ALPAKA_FN_HOST auto alpaka::enqueue ( TQueue &  queue,
TTask &&  task 
) -> void

Queues the given task in the given queue.

Special Handling for events: If the event has previously been queued, then this call will overwrite any existing state of the event. Any subsequent calls which examine the status of event will only examine the completion of this most recent call to enqueue. If a queue is waiting for an event the latter's event state at the time of the API call to wait() will be used to release the queue.

Definition at line 47 of file Traits.hpp.

◆ exec()

template<typename TAcc , typename TQueue , typename TWorkDiv , typename TKernelFnObj , typename... TArgs>
ALPAKA_FN_HOST auto alpaka::exec ( TQueue &  queue,
TWorkDiv const &  workDiv,
TKernelFnObj const &  kernelFnObj,
TArgs &&...  args 
) -> void

Executes the given kernel in the given queue.

Template Parameters
TAccThe accelerator type.
Parameters
queueThe queue to enqueue the view copy task into.
workDivThe index domain work division.
kernelFnObjThe kernel function object which should be executed.
args,...The kernel invocation arguments.

Definition at line 309 of file Traits.hpp.

◆ exp()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::exp ( Complex< T > const &  x)
constexpr

Exponential.

Definition at line 459 of file Complex.hpp.

◆ ffs() [1/2]

template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::ffs ( TIntrinsic const &  intrinsic,
std::int32_t  value 
) -> std::int32_t

Returns the 1-based position of the least significant bit set to 1 in the given 32-bit value. Returns 0 for input value 0.

Template Parameters
TIntrinsicThe intrinsic implementation type.
Parameters
intrinsicThe intrinsic implementation.
valueThe input value.

Definition at line 65 of file Traits.hpp.

◆ ffs() [2/2]

template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::ffs ( TIntrinsic const &  intrinsic,
std::int64_t  value 
) -> std::int32_t

Returns the 1-based position of the least significant bit set to 1 in the given 64-bit value. Returns 0 for input value 0.

Template Parameters
TIntrinsicThe intrinsic implementation type.
Parameters
intrinsicThe intrinsic implementation.
valueThe input value.

Definition at line 79 of file Traits.hpp.

◆ free()

template<typename TAlloc , typename T >
ALPAKA_FN_HOST auto alpaka::free ( TAlloc const &  alloc,
T const *const  ptr 
) -> void

Frees the memory identified by the given pointer.

Definition at line 41 of file Traits.hpp.

◆ freeSharedVars()

template<typename TBlockSharedMemSt >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::freeSharedVars ( TBlockSharedMemSt &  blockSharedMemSt) -> void

Frees all memory used by block shared variables.

Template Parameters
TBlockSharedMemStThe block shared allocator implementation type.
Parameters
blockSharedMemStThe block shared allocator implementation.

Definition at line 54 of file Traits.hpp.

◆ getAccDevProps()

template<typename TAcc , typename TDev >
ALPAKA_FN_HOST auto alpaka::getAccDevProps ( TDev const &  dev) -> AccDevProps<Dim<TAcc>, Idx<TAcc>>
Returns
The acceleration properties on the given device.

Definition at line 62 of file Traits.hpp.

◆ getAccName()

template<typename TAcc >
ALPAKA_FN_HOST auto alpaka::getAccName ( ) -> std::string
Returns
The accelerator name
Template Parameters
TAccThe accelerator type.

Definition at line 72 of file Traits.hpp.

◆ getBlockSharedMemDynSizeBytes()

template<typename TAcc , typename TKernelFnObj , typename TDim , typename... TArgs>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getBlockSharedMemDynSizeBytes ( TKernelFnObj const &  kernelFnObj,
Vec< TDim, Idx< TAcc >> const &  blockThreadExtent,
Vec< TDim, Idx< TAcc >> const &  threadElemExtent,
TArgs const &...  args 
) -> std::size_t
Template Parameters
TAccThe accelerator type.
Parameters
kernelFnObjThe kernel object for which the block shared memory size should be calculated.
blockThreadExtentThe block thread extent.
threadElemExtentThe thread element extent.
args,...The kernel invocation arguments.
Returns
The size of the shared memory allocated for a block in bytes. The default implementation always returns zero.

Definition at line 157 of file Traits.hpp.

◆ getDepth()

template<typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getDepth ( TExtent const &  extent = TExtent()) -> Idx<TExtent>
Returns
The depth.

Definition at line 121 of file Traits.hpp.

◆ getDev()

template<typename T >
ALPAKA_FN_HOST auto alpaka::getDev ( T const &  t)
Returns
The device this object is bound to.

Definition at line 68 of file Traits.hpp.

◆ getDevByIdx()

template<typename TPlatform >
ALPAKA_FN_HOST auto alpaka::getDevByIdx ( TPlatform const &  platform,
std::size_t const &  devIdx 
) -> Dev<TPlatform>
Returns
The device identified by its index.

Definition at line 62 of file Traits.hpp.

◆ getDevCount()

template<typename TPlatform >
ALPAKA_FN_HOST auto alpaka::getDevCount ( TPlatform const &  platform)
Returns
The device identified by its index.

Definition at line 55 of file Traits.hpp.

◆ getDevs()

template<typename TPlatform >
ALPAKA_FN_HOST auto alpaka::getDevs ( TPlatform const &  platform) -> std::vector<Dev<TPlatform>>
Returns
All the devices available on this accelerator.

Definition at line 69 of file Traits.hpp.

◆ getDynSharedMem()

template<typename T , typename TBlockSharedMemDyn >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::getDynSharedMem ( TBlockSharedMemDyn const &  blockSharedMemDyn) -> T*

Get block shared dynamic memory.

The available size of the memory can be defined by specializing the trait BlockSharedMemDynSizeBytes for a kernel. The Memory can be accessed by all threads within a block. Access to the memory is not thread safe.

Template Parameters
TThe element type.
TBlockSharedMemDynThe block shared dynamic memory implementation type.
Parameters
blockSharedMemDynThe block shared dynamic memory implementation.
Returns
Pointer to pre-allocated contiguous memory.

Definition at line 39 of file Traits.hpp.

◆ getExtent()

template<std::size_t Tidx, typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getExtent ( TExtent const &  extent = TExtent()) -> Idx<TExtent>
Returns
The extent in the given dimension.

Definition at line 43 of file Traits.hpp.

◆ getExtentProduct()

template<typename T >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getExtentProduct ( T const &  object) -> Idx<T>
Returns
The product of the extents of the given object.

Definition at line 134 of file Traits.hpp.

◆ getExtents()

template<typename T >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getExtents ( T const &  object) -> Vec<Dim<T>, Idx<T>>
Returns
The extents of the given object.

Definition at line 59 of file Traits.hpp.

◆ getExtentVec()

template<typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::getExtentVec ( T const &  object = {}) -> Vec<Dim<T>, Idx<T>>
constexpr
Template Parameters
Thas to specialize GetExtent.
Returns
The extents of the given object.

Definition at line 68 of file Traits.hpp.

◆ getExtentVecEnd()

template<typename TDim , typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::getExtentVecEnd ( T const &  object = {}) -> Vec<TDim, Idx<T>>
constexpr
Template Parameters
Thas to specialize GetExtent.
Returns
The extent but only the last TDim elements.

Definition at line 78 of file Traits.hpp.

◆ getFreeMemBytes()

template<typename TDev >
ALPAKA_FN_HOST auto alpaka::getFreeMemBytes ( TDev const &  dev) -> std::size_t
Returns
The free memory on the device in Bytes.
Note
Do not use this query if getMemBytes returned 0.

Definition at line 104 of file Traits.hpp.

◆ getHeight()

template<typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getHeight ( TExtent const &  extent = TExtent()) -> Idx<TExtent>
Returns
The height.

Definition at line 108 of file Traits.hpp.

◆ getIdx() [1/2]

template<typename TOrigin , typename TUnit , typename TIdx , typename TWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getIdx ( TIdx const &  idx,
TWorkDiv const &  workDiv 
) -> Vec<Dim<TWorkDiv>, Idx<TIdx>>

Get the indices requested.

Definition at line 23 of file Accessors.hpp.

◆ getIdx() [2/2]

template<typename TOrigin , typename TUnit , typename TIdxWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getIdx ( TIdxWorkDiv const &  idxWorkDiv) -> Vec<Dim<TIdxWorkDiv>, Idx<TIdxWorkDiv>>

Get the indices requested.

Definition at line 31 of file Accessors.hpp.

◆ getIdxThreadFirstElem() [1/3]

template<typename TIdxWorkDiv , typename TGridThreadIdx , typename TThreadElemExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getIdxThreadFirstElem ( [[maybe_unused] ] TIdxWorkDiv const &  idxWorkDiv,
TGridThreadIdx const &  gridThreadIdx,
TThreadElemExtent const &  threadElemExtent 
) -> Vec<Dim<TIdxWorkDiv>, Idx<TIdxWorkDiv>>

Get the index of the first element this thread computes.

Definition at line 89 of file Accessors.hpp.

◆ getIdxThreadFirstElem() [2/3]

template<typename TIdxWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getIdxThreadFirstElem ( TIdxWorkDiv const &  idxWorkDiv) -> Vec<Dim<TIdxWorkDiv>, Idx<TIdxWorkDiv>>

Get the index of the first element this thread computes.

Definition at line 110 of file Accessors.hpp.

◆ getIdxThreadFirstElem() [3/3]

template<typename TIdxWorkDiv , typename TGridThreadIdx >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getIdxThreadFirstElem ( TIdxWorkDiv const &  idxWorkDiv,
TGridThreadIdx const &  gridThreadIdx 
) -> Vec<Dim<TIdxWorkDiv>, Idx<TIdxWorkDiv>>

Get the index of the first element this thread computes.

Definition at line 100 of file Accessors.hpp.

◆ getMemBytes()

template<typename TDev >
ALPAKA_FN_HOST auto alpaka::getMemBytes ( TDev const &  dev) -> std::size_t
Returns
The memory on the device in Bytes. Returns 0 if querying memory is not supported.

Definition at line 95 of file Traits.hpp.

◆ getName()

template<typename TDev >
ALPAKA_FN_HOST auto alpaka::getName ( TDev const &  dev) -> std::string
Returns
The device name with leading/trailing space characters trimmed off.

Definition at line 87 of file Traits.hpp.

◆ getNativeHandle()

template<typename TImpl >
ALPAKA_FN_HOST auto alpaka::getNativeHandle ( TImpl const &  impl)

Get the native handle of the alpaka object. It will return the alpaka object handle if there is any, otherwise it generates a compile time error.

Definition at line 29 of file Traits.hpp.

◆ getOffset()

template<std::size_t Tidx, typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getOffset ( TOffsets const &  offsets) -> Idx<TOffsets>
Returns
The offset in the given dimension.

Definition at line 39 of file Traits.hpp.

◆ getOffsets()

template<typename T >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getOffsets ( T const &  object) -> Vec<Dim<T>, Idx<T>>
Returns
The extents of the given object.

Definition at line 55 of file Traits.hpp.

◆ getOffsetVec()

template<typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::getOffsetVec ( T const &  object = {}) -> Vec<Dim<T>, Idx<T>>
constexpr
Template Parameters
Thas to specialize GetOffsets.
Returns
The offset vector.

Definition at line 64 of file Traits.hpp.

◆ getOffsetVecEnd()

template<typename TDim , typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::getOffsetVecEnd ( T const &  object = {}) -> Vec<TDim, Idx<T>>
constexpr
Template Parameters
Thas to specialize GetOffsets.
Returns
The offset vector but only the last TDim elements.

Definition at line 73 of file Traits.hpp.

◆ getOffsetX()

template<typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getOffsetX ( TOffsets const &  offsets = TOffsets()) -> Idx<TOffsets>
Returns
The offset in x dimension.

Definition at line 87 of file Traits.hpp.

◆ getOffsetY()

template<typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getOffsetY ( TOffsets const &  offsets = TOffsets()) -> Idx<TOffsets>
Returns
The offset in y dimension.

Definition at line 95 of file Traits.hpp.

◆ getOffsetZ()

template<typename TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getOffsetZ ( TOffsets const &  offsets = TOffsets()) -> Idx<TOffsets>
Returns
The offset in z dimension.

Definition at line 103 of file Traits.hpp.

◆ getOmpSchedule()

template<typename TAcc , typename TKernelFnObj , typename TDim , typename... TArgs>
ALPAKA_FN_HOST auto alpaka::getOmpSchedule ( TKernelFnObj const &  kernelFnObj,
Vec< TDim, Idx< TAcc >> const &  blockThreadExtent,
Vec< TDim, Idx< TAcc >> const &  threadElemExtent,
TArgs const &...  args 
)
Template Parameters
TAccThe accelerator type.
Parameters
kernelFnObjThe kernel object for which the block shared memory size should be calculated.
blockThreadExtentThe block thread extent.
threadElemExtentThe thread element extent.
args,...The kernel invocation arguments.
Returns
The OpenMP schedule information as an alpaka::omp::Schedule object if the kernel specialized the OmpSchedule trait, an object of another type if the kernel didn't specialize the trait.

Definition at line 186 of file Traits.hpp.

◆ getPitchBytes()

template<std::size_t Tidx, typename TView >
ALPAKA_FN_HOST auto alpaka::getPitchBytes ( TView const &  view) -> Idx<TView>
Returns
The pitch in bytes. This is the distance in bytes between two consecutive elements in the given dimension.

Definition at line 176 of file Traits.hpp.

◆ getPitchBytesVec()

template<typename TView >
auto alpaka::getPitchBytesVec ( TView const &  view) -> Vec<Dim<TView>, Idx<TView>>
Returns
The pitch vector.

Definition at line 412 of file Traits.hpp.

◆ getPitchBytesVecEnd()

template<typename TDim , typename TView >
ALPAKA_FN_HOST auto alpaka::getPitchBytesVecEnd ( TView const &  view = TView()) -> Vec<TDim, Idx<TView>>
Returns
The pitch but only the last N elements.

Definition at line 420 of file Traits.hpp.

◆ getPitchesInBytes()

template<typename TView >
ALPAKA_FN_HOST auto alpaka::getPitchesInBytes ( TView const &  view) -> Vec<Dim<TView>, Idx<TView>>
Returns
The pitches in bytes as an alpaka::Vec. This is the distance in bytes between two consecutive elements in the given dimension. E.g. for a 3D view without padding, the 0-dim pitch is the distance in bytes to jump from one element to the next within the same row, the 1-dim pitch (aka. the row pitch) is the distance in bytes to jump from one element to the neighboring element on the next row. The 2-dim pitch (aka. the slice pitch) is the distance in bytes to jump from one element to the neighboring element on the next slice. E.g. a 3D view of floats without padding and the extents {42, 10, 2}, would have a pitch vector of {80, 8, 4}.

Definition at line 196 of file Traits.hpp.

◆ getPreferredWarpSize()

template<typename TDev >
constexpr ALPAKA_FN_HOST auto alpaka::getPreferredWarpSize ( TDev const &  dev) -> std::size_t
constexpr
Returns
The preferred warp size on the device in number of threads.

Definition at line 118 of file Traits.hpp.

◆ getPtrDev() [1/2]

template<typename TView , typename TDev >
ALPAKA_FN_HOST auto alpaka::getPtrDev ( TView &  view,
TDev const &  dev 
) -> Elem<TView>*

Gets the pointer to the view on the given device.

Parameters
viewThe memory view.
devThe device.
Returns
The pointer on the device.

Definition at line 168 of file Traits.hpp.

◆ getPtrDev() [2/2]

template<typename TView , typename TDev >
ALPAKA_FN_HOST auto alpaka::getPtrDev ( TView const &  view,
TDev const &  dev 
) -> Elem<TView> const*

Gets the pointer to the view on the given device.

Parameters
viewThe memory view.
devThe device.
Returns
The pointer on the device.

Definition at line 157 of file Traits.hpp.

◆ getPtrNative() [1/2]

template<typename TView >
ALPAKA_FN_HOST auto alpaka::getPtrNative ( TView &  view) -> Elem<TView>*

Gets the native pointer of the memory view.

Parameters
viewThe memory view.
Returns
The native pointer.

Definition at line 146 of file Traits.hpp.

◆ getPtrNative() [2/2]

template<typename TView >
ALPAKA_FN_HOST auto alpaka::getPtrNative ( TView const &  view) -> Elem<TView> const*

Gets the native pointer of the memory view.

Parameters
viewThe memory view.
Returns
The native pointer.

Definition at line 136 of file Traits.hpp.

◆ getValidWorkDiv()

template<typename TAcc , typename TDev , typename TGridElemExtent = Vec<Dim<TAcc>, Idx<TAcc>>, typename TThreadElemExtent = Vec<Dim<TAcc>, Idx<TAcc>>>
ALPAKA_FN_HOST auto alpaka::getValidWorkDiv ( [[maybe_unused] ] TDev const &  dev,
[[maybe_unused] ] TGridElemExtent const &  gridElemExtent = Vec<Dim<TAcc>, Idx<TAcc>>::ones(),
[[maybe_unused] ] TThreadElemExtent const &  threadElemExtents = Vec<Dim<TAcc>, Idx<TAcc>>::ones(),
[[maybe_unused] ] bool  blockThreadMustDivideGridThreadExtent = true,
[[maybe_unused] ] GridBlockExtentSubDivRestrictions  gridBlockExtentSubDivRestrictions = GridBlockExtentSubDivRestrictions::Unrestricted 
) -> WorkDivMembers<Dim<TGridElemExtent>, Idx<TGridElemExtent>>
Template Parameters
TAccThe accelerator for which this work division has to be valid.
TGridElemExtentThe type of the grid element extent.
TThreadElemExtentThe type of the thread element extent.
TDevThe type of the device.
Parameters
devThe device the work division should be valid for.
gridElemExtentThe full extent of elements in the grid.
threadElemExtentsthe number of elements computed per thread.
blockThreadMustDivideGridThreadExtentIf this is true, the grid thread extent will be multiples of the corresponding block thread extent. NOTE: If this is true and gridThreadExtent is prime (or otherwise bad chosen) in a dimension, the block thread extent will be one in this dimension.
gridBlockExtentSubDivRestrictionsThe grid block extent subdivision restrictions.
Returns
The work division.

Definition at line 284 of file WorkDivHelpers.hpp.

◆ getWarpSizes()

template<typename TDev >
ALPAKA_FN_HOST auto alpaka::getWarpSizes ( TDev const &  dev) -> std::vector<std::size_t>
Returns
The supported warp sizes on the device in number of threads.

Definition at line 111 of file Traits.hpp.

◆ getWidth()

template<typename TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getWidth ( TExtent const &  extent = TExtent()) -> Idx<TExtent>
Returns
The width.

Definition at line 95 of file Traits.hpp.

◆ getWorkDiv()

template<typename TOrigin , typename TUnit , typename TWorkDiv >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::getWorkDiv ( TWorkDiv const &  workDiv) -> Vec<Dim<TWorkDiv>, Idx<TWorkDiv>>

Get the extent requested.

Definition at line 33 of file Traits.hpp.

◆ isComplete()

template<typename TEvent >
ALPAKA_FN_HOST auto alpaka::isComplete ( TEvent const &  event) -> bool

Tests if the given event has already been completed.

Warning
This function is allowed to return false negatives. An already completed event can reported as uncompleted because the status information are not fully propagated by the used alpaka backend.
Returns
true event is finished/complete else false.

Definition at line 34 of file Traits.hpp.

◆ isSupportedByAtomicAtomicRef()

template<typename T >
void alpaka::isSupportedByAtomicAtomicRef ( )

Definition at line 42 of file AtomicAtomicRef.hpp.

◆ isValidAccDevProps()

template<typename TDim , typename TIdx >
ALPAKA_FN_HOST auto alpaka::isValidAccDevProps ( AccDevProps< TDim, TIdx > const &  accDevProps) -> bool
Template Parameters
TDimThe dimensionality of the accelerator device properties.
TIdxThe idx type of the accelerator device properties.
Parameters
accDevPropsThe maxima for the work division.
Returns
If the accelerator device properties are valid.

Definition at line 84 of file WorkDivHelpers.hpp.

◆ isValidWorkDiv() [1/2]

template<typename TDim , typename TIdx , typename TWorkDiv >
ALPAKA_FN_HOST auto alpaka::isValidWorkDiv ( AccDevProps< TDim, TIdx > const &  accDevProps,
TWorkDiv const &  workDiv 
) -> bool
Template Parameters
TDimThe dimensionality of the accelerator device properties.
TIdxThe idx type of the accelerator device properties.
TWorkDivThe type of the work division.
Parameters
accDevPropsThe maxima for the work division.
workDivThe work division to test for validity.
Returns
If the work division is valid for the given accelerator device properties.

Definition at line 331 of file WorkDivHelpers.hpp.

◆ isValidWorkDiv() [2/2]

template<typename TAcc , typename TDev , typename TWorkDiv >
ALPAKA_FN_HOST auto alpaka::isValidWorkDiv ( TDev const &  dev,
TWorkDiv const &  workDiv 
) -> bool
Template Parameters
TAccThe accelerator to test the validity on.
Parameters
devThe device to test the work division for validity on.
workDivThe work division to test for validity.
Returns
If the work division is valid on this accelerator.

Definition at line 380 of file WorkDivHelpers.hpp.

◆ log()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::log ( Complex< T > const &  x)
constexpr

Natural logarithm.

Definition at line 467 of file Complex.hpp.

◆ log10()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::log10 ( Complex< T > const &  x)
constexpr

Base 10 logarithm.

Definition at line 475 of file Complex.hpp.

◆ malloc()

template<typename T , typename TAlloc >
ALPAKA_FN_HOST auto alpaka::malloc ( TAlloc const &  alloc,
std::size_t const &  sizeElems 
) -> T*
Returns
The pointer to the allocated memory.

Definition at line 33 of file Traits.hpp.

◆ mapIdx()

template<std::size_t TDimOut, std::size_t TDimIn, std::size_t TDimExtents, typename TElem >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::mapIdx ( Vec< DimInt< TDimIn >, TElem > const &  in,
Vec< DimInt< TDimExtents >, TElem > const &  extent 
) -> Vec<DimInt<TDimOut>, TElem>

Maps an N-dimensional index to an N-dimensional position. At least one dimension must always be 1 or zero.

Template Parameters
TDimOutDimension of the index vector to map to.
Parameters
inThe index vector to map from.
extentThe extents of the input or output space, whichever has more than 1 dimensions.

Definition at line 26 of file MapIdx.hpp.

◆ mapIdxPitchBytes()

template<std::size_t TDimOut, std::size_t TDimIn, std::size_t TidxDimPitch, typename TElem >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::mapIdxPitchBytes ( Vec< DimInt< TDimIn >, TElem > const &  in,
Vec< DimInt< TidxDimPitch >, TElem > const &  pitches 
) -> Vec<DimInt<TDimOut>, TElem>

Maps an N dimensional index to a N dimensional position based on the pitches of a view without padding or a byte view. At least one dimension must always be 1 or zero.

Template Parameters
TDimOutDimension of the index vector to map to.
Parameters
inThe index vector to map from.
pitchesThe pitches of the input or output space, whichever has more than 1 dimensions.

Definition at line 66 of file MapIdx.hpp.

◆ mem_fence()

template<typename TMemFence , typename TMemScope >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::mem_fence ( TMemFence const &  fence,
TMemScope const &  scope 
) -> void

Issues memory fence instructions.

Template Parameters
TMemFenceThe memory fence implementation type.
TMemScopeThe memory scope type.
Parameters
fenceThe memory fence implementation.
scopeThe memory scope.

Definition at line 61 of file Traits.hpp.

◆ memcpy() [1/10]

template<typename TTag , typename TViewSrc , typename TTypeDst , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( TQueue &  queue,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &  viewDst,
TViewSrc const &  viewSrc 
) -> void

Definition at line 61 of file DeviceGlobalCpu.hpp.

◆ memcpy() [2/10]

template<typename TTag , typename TExtent , typename TViewSrc , typename TTypeDst , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( TQueue &  queue,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &  viewDst,
TViewSrc const &  viewSrc,
TExtent const &  extent 
) -> void

Definition at line 112 of file DeviceGlobalCpu.hpp.

◆ memcpy() [3/10]

template<typename TTag , typename TTypeSrc , typename TViewDstFwd , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( TQueue &  queue,
TViewDstFwd &&  viewDst,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &  viewSrc 
) -> void

Definition at line 86 of file DeviceGlobalCpu.hpp.

◆ memcpy() [4/10]

template<typename TTag , typename TExtent , typename TTypeSrc , typename TViewDstFwd , typename TQueue , typename std::enable_if_t< std::is_same_v< TTag, TagCpuOmp2Blocks >||std::is_same_v< TTag, TagCpuOmp2Threads >||std::is_same_v< TTag, TagCpuSerial >||std::is_same_v< TTag, TagCpuTbbBlocks >||std::is_same_v< TTag, TagCpuThreads >, int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( TQueue &  queue,
TViewDstFwd &&  viewDst,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &  viewSrc,
TExtent const &  extent 
) -> void

Definition at line 138 of file DeviceGlobalCpu.hpp.

◆ memcpy() [5/10]

template<typename TViewSrc , typename TViewDstFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memcpy ( TQueue &  queue,
TViewDstFwd &&  viewDst,
TViewSrc const &  viewSrc 
) -> void

Copies the entire memory of viewSrc to viewDst. Possibly copies between different memory spaces.

Parameters
queueThe queue to enqueue the view copy task into.
[in,out]viewDstThe destination memory view. May be a temporary object.
viewSrcThe source memory view. May be a temporary object.

Definition at line 307 of file Traits.hpp.

◆ memcpy() [6/10]

template<typename TExtent , typename TViewSrc , typename TViewDstFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memcpy ( TQueue &  queue,
TViewDstFwd &&  viewDst,
TViewSrc const &  viewSrc,
TExtent const &  extent 
) -> void

Copies memory from a part of viewSrc to viewDst, described by extent. Possibly copies between different memory spaces.

Parameters
queueThe queue to enqueue the view copy task into.
[in,out]viewDstThe destination memory view. May be a temporary object.
viewSrcThe source memory view. May be a temporary object.
extentThe extent of the view to copy.

Definition at line 294 of file Traits.hpp.

◆ memcpy() [7/10]

template<typename TTag , typename TApi , bool TBlocking, typename TTypeDst , typename TViewSrc , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &  queue,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &  viewDst,
TViewSrc const &  viewSrc 
)

Definition at line 86 of file DeviceGlobalUniformCudaHipBuiltIn.hpp.

◆ memcpy() [8/10]

template<typename TTag , typename TApi , bool TBlocking, typename TTypeDst , typename TViewSrc , typename TExtent , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &  queue,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &  viewDst,
TViewSrc const &  viewSrc,
TExtent  extent 
)

Definition at line 159 of file DeviceGlobalUniformCudaHipBuiltIn.hpp.

◆ memcpy() [9/10]

template<typename TTag , typename TApi , bool TBlocking, typename TViewDst , typename TTypeSrc , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &  queue,
TViewDst &  viewDst,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &  viewSrc 
)

Definition at line 50 of file DeviceGlobalUniformCudaHipBuiltIn.hpp.

◆ memcpy() [10/10]

template<typename TTag , typename TApi , bool TBlocking, typename TViewDst , typename TTypeSrc , typename TExtent , typename std::enable_if_t<(std::is_same_v< TTag, TagGpuCudaRt > &&std::is_same_v< TApi, ApiCudaRt >), int > = 0>
ALPAKA_FN_HOST auto alpaka::memcpy ( uniform_cuda_hip::detail::QueueUniformCudaHipRt< TApi, TBlocking > &  queue,
TViewDst &  viewDst,
alpaka::detail::DevGlobalImplGeneric< TTag, TTypeSrc > &  viewSrc,
TExtent  extent 
)

Definition at line 123 of file DeviceGlobalUniformCudaHipBuiltIn.hpp.

◆ memset() [1/2]

template<typename TViewFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memset ( TQueue &  queue,
TViewFwd &&  view,
std::uint8_t const &  byte 
) -> void

Sets each byte of the memory of the entire view to the given value.

Parameters
queueThe queue to enqueue the view fill task into.
[in,out]viewThe memory view to fill. May be a temporary object.
byteValue to set for each element of the specified view.

Definition at line 242 of file Traits.hpp.

◆ memset() [2/2]

template<typename TExtent , typename TViewFwd , typename TQueue >
ALPAKA_FN_HOST auto alpaka::memset ( TQueue &  queue,
TViewFwd &&  view,
std::uint8_t const &  byte,
TExtent const &  extent 
) -> void

Sets the bytes of the memory of view, described by extent, to the given value.

Parameters
queueThe queue to enqueue the view fill task into.
[in,out]viewThe memory view to fill. May be a temporary object.
byteValue to set for each element of the specified view.
extentThe extent of the view to fill.

Definition at line 231 of file Traits.hpp.

◆ norm()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T alpaka::norm ( Complex< T > const &  x)
constexpr

Squared magnitude.

Definition at line 483 of file Complex.hpp.

◆ operator!=() [1/3]

template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::operator!= ( Complex< T > const &  lhs,
Complex< T > const &  rhs 
)
constexpr

Inequality of two complex numbers.

Note
this and other versions of operator != should be removed since C++20, as so does std::complex

Definition at line 311 of file Complex.hpp.

◆ operator!=() [2/3]

template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::operator!= ( Complex< T > const &  lhs,
T const &  rhs 
)
constexpr

Inequality of a complex and a real number.

Definition at line 318 of file Complex.hpp.

◆ operator!=() [3/3]

template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::operator!= ( T const &  lhs,
Complex< T > const &  rhs 
)
constexpr

Inequality of a real and a complex number.

Definition at line 326 of file Complex.hpp.

◆ operator*() [1/3]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator* ( Complex< T > const &  lhs,
Complex< T > const &  rhs 
)

Muptiplication of two complex numbers.

Definition at line 237 of file Complex.hpp.

◆ operator*() [2/3]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator* ( Complex< T > const &  lhs,
T const &  rhs 
)

Muptiplication of a complex and a real number.

Definition at line 246 of file Complex.hpp.

◆ operator*() [3/3]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator* ( T const &  lhs,
Complex< T > const &  rhs 
)

Muptiplication of a real and a complex number.

Definition at line 253 of file Complex.hpp.

◆ operator+() [1/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator+ ( Complex< T > const &  lhs,
Complex< T > const &  rhs 
)

Addition of two complex numbers.

Definition at line 195 of file Complex.hpp.

◆ operator+() [2/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator+ ( Complex< T > const &  lhs,
T const &  rhs 
)

Addition of a complex and a real number.

Definition at line 202 of file Complex.hpp.

◆ operator+() [3/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator+ ( Complex< T > const &  val)

Host-device arithmetic operations matching std::complex<T>.

They take and return alpaka::Complex. Unary plus (added for compatibility with std::complex)

Definition at line 181 of file Complex.hpp.

◆ operator+() [4/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator+ ( T const &  lhs,
Complex< T > const &  rhs 
)

Addition of a real and a complex number.

Definition at line 209 of file Complex.hpp.

◆ operator-() [1/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator- ( Complex< T > const &  lhs,
Complex< T > const &  rhs 
)

Subtraction of two complex numbers.

Definition at line 216 of file Complex.hpp.

◆ operator-() [2/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator- ( Complex< T > const &  lhs,
T const &  rhs 
)

Subtraction of a complex and a real number.

Definition at line 223 of file Complex.hpp.

◆ operator-() [3/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator- ( Complex< T > const &  val)

Unary minus.

Definition at line 188 of file Complex.hpp.

◆ operator-() [4/4]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator- ( T const &  lhs,
Complex< T > const &  rhs 
)

Subtraction of a real and a complex number.

Definition at line 230 of file Complex.hpp.

◆ operator/() [1/3]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator/ ( Complex< T > const &  lhs,
Complex< T > const &  rhs 
)

Division of two complex numbers.

Definition at line 260 of file Complex.hpp.

◆ operator/() [2/3]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator/ ( Complex< T > const &  lhs,
T const &  rhs 
)

Division of complex and a real number.

Definition at line 269 of file Complex.hpp.

◆ operator/() [3/3]

template<typename T >
ALPAKA_FN_HOST_ACC Complex<T> alpaka::operator/ ( T const &  lhs,
Complex< T > const &  rhs 
)

Division of a real and a complex number.

Definition at line 276 of file Complex.hpp.

◆ operator<<()

template<typename T , typename TChar , typename TTraits >
std::basic_ostream<TChar, TTraits>& alpaka::operator<< ( std::basic_ostream< TChar, TTraits > &  os,
Complex< T > const &  x 
)

Host-only output of a complex number.

Definition at line 326 of file Complex.hpp.

◆ operator==() [1/3]

template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::operator== ( Complex< T > const &  lhs,
Complex< T > const &  rhs 
)
constexpr

Equality of two complex numbers.

Definition at line 285 of file Complex.hpp.

◆ operator==() [2/3]

template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::operator== ( Complex< T > const &  lhs,
T const &  rhs 
)
constexpr

Equality of a complex and a real number.

Definition at line 293 of file Complex.hpp.

◆ operator==() [3/3]

template<typename T >
constexpr ALPAKA_FN_HOST_ACC bool alpaka::operator== ( T const &  lhs,
Complex< T > const &  rhs 
)
constexpr

Equality of a real and a complex number.

Definition at line 301 of file Complex.hpp.

◆ operator>>()

template<typename T , typename TChar , typename TTraits >
std::basic_istream<TChar, TTraits>& alpaka::operator>> ( std::basic_istream< TChar, TTraits > &  is,
Complex< T > const &  x 
)

Host-only input of a complex number.

Definition at line 344 of file Complex.hpp.

◆ polar()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::polar ( T const &  r,
T const &  theta = T() 
)
constexpr

Get a complex number with given magnitude and phase angle.

Definition at line 491 of file Complex.hpp.

◆ popcount() [1/2]

template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::popcount ( TIntrinsic const &  intrinsic,
std::uint32_t  value 
) -> std::int32_t

Returns the number of 1 bits in the given 32-bit value.

Template Parameters
TIntrinsicThe intrinsic implementation type.
Parameters
intrinsicThe intrinsic implementation.
valueThe input value.

Definition at line 38 of file Traits.hpp.

◆ popcount() [2/2]

template<typename TIntrinsic >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::popcount ( TIntrinsic const &  intrinsic,
std::uint64_t  value 
) -> std::int32_t

Returns the number of 1 bits in the given 64-bit value.

Template Parameters
TIntrinsicThe intrinsic implementation type.
Parameters
intrinsicThe intrinsic implementation.
valueThe input value.

Definition at line 51 of file Traits.hpp.

◆ pow() [1/3]

template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::pow ( Complex< T > const &  x,
Complex< U > const &  y 
)
constexpr

Complex power of a complex number.

Definition at line 499 of file Complex.hpp.

◆ pow() [2/3]

template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::pow ( Complex< T > const &  x,
U const &  y 
)
constexpr

Real power of a complex number.

Definition at line 510 of file Complex.hpp.

◆ pow() [3/3]

template<typename T , typename U >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::pow ( T const &  x,
Complex< U > const &  y 
)
constexpr

Complex power of a real number.

Definition at line 518 of file Complex.hpp.

◆ print()

template<typename TView >
ALPAKA_FN_HOST auto alpaka::print ( TView const &  view,
std::ostream &  os,
std::string const &  elementSeparator = ", ",
std::string const &  rowSeparator = "\n",
std::string const &  rowPrefix = "[",
std::string const &  rowSuffix = "]" 
) -> void

Prints the content of the view to the given queue.

Definition at line 391 of file Traits.hpp.

◆ proj()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::proj ( Complex< T > const &  x)
constexpr

Projection onto the Riemann sphere.

Definition at line 526 of file Complex.hpp.

◆ reset()

template<typename TDev >
ALPAKA_FN_HOST auto alpaka::reset ( TDev const &  dev) -> void

Resets the device. What this method does is dependent on the accelerator.

Definition at line 126 of file Traits.hpp.

◆ reverseVec()

template<typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::reverseVec ( TVec const &  vec)
constexpr
Returns
The reverseVec vector.

Definition at line 90 of file Traits.hpp.

◆ sin()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::sin ( Complex< T > const &  x)
constexpr

Sine.

Definition at line 534 of file Complex.hpp.

◆ sinh()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::sinh ( Complex< T > const &  x)
constexpr

Hyperbolic sine.

Definition at line 542 of file Complex.hpp.

◆ sqrt()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::sqrt ( Complex< T > const &  x)
constexpr

Square root.

Definition at line 550 of file Complex.hpp.

◆ subDivideGridElems()

template<typename TDim , typename TIdx >
ALPAKA_FN_HOST auto alpaka::subDivideGridElems ( Vec< TDim, TIdx > const &  gridElemExtent,
Vec< TDim, TIdx > const &  threadElemExtent,
AccDevProps< TDim, TIdx > const &  accDevProps,
bool  blockThreadMustDivideGridThreadExtent = true,
GridBlockExtentSubDivRestrictions  gridBlockExtentSubDivRestrictions = GridBlockExtentSubDivRestrictions::Unrestricted 
) -> WorkDivMembers<TDim, TIdx>

Subdivides the given grid thread extent into blocks restricted by the maxima allowed.

  1. The the maxima block, thread and element extent and counts
  2. The requirement of the block thread extent to divide the grid thread extent without remainder
  3. The requirement of the block extent.
Parameters
gridElemExtentThe full extent of elements in the grid.
threadElemExtentthe number of elements computed per thread.
accDevPropsThe maxima for the work division.
blockThreadMustDivideGridThreadExtentIf this is true, the grid thread extent will be multiples of the corresponding block thread extent. NOTE: If this is true and gridThreadExtent is prime (or otherwise bad chosen) in a dimension, the block thread extent will be one in this dimension.
gridBlockExtentSubDivRestrictionsThe grid block extent subdivision restrictions.
Todo:
why omit the last element?

Definition at line 129 of file WorkDivHelpers.hpp.

◆ subVecBegin()

template<typename TSubDim , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::subVecBegin ( TVec const &  vec)
constexpr
Template Parameters
TVechas to specialize SubVecFromIndices.
Returns
The sub-vector consisting of the first N elements of the source vector.

A sequence of integers from 0 to dim-1.

Definition at line 51 of file Traits.hpp.

◆ subVecEnd()

template<typename TSubDim , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::subVecEnd ( TVec const &  vec)
constexpr
Template Parameters
TVechas to specialize SubVecFromIndices.
Returns
The sub-vector consisting of the last N elements of the source vector.

A sequence of integers from 0 to dim-1.

Definition at line 66 of file Traits.hpp.

◆ subVecFromIndices()

template<typename TIndexSequence , typename TVec >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::subVecFromIndices ( TVec const &  vec)
constexpr

Builds a new vector by selecting the elements of the source vector in the given order. Repeating and swizzling elements is allowed.

Returns
The sub-vector consisting of the elements specified by the indices.

Definition at line 42 of file Traits.hpp.

◆ syncBlockThreads()

template<typename TBlockSync >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::syncBlockThreads ( TBlockSync const &  blockSync) -> void

Synchronizes all threads within the current block (independently for all blocks).

Template Parameters
TBlockSyncThe block synchronization implementation type.
Parameters
blockSyncThe block synchronization implementation.

Definition at line 36 of file Traits.hpp.

◆ syncBlockThreadsPredicate()

template<typename TOp , typename TBlockSync >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto alpaka::syncBlockThreadsPredicate ( TBlockSync const &  blockSync,
int  predicate 
) -> int

Synchronizes all threads within the current block (independently for all blocks), evaluates the predicate for all threads and returns the combination of all the results computed via TOp.

Template Parameters
TOpThe operation used to combine the predicate values of all threads.
TBlockSyncThe block synchronization implementation type.
Parameters
blockSyncThe block synchronization implementation.
predicateThe predicate value of the current thread.

Definition at line 100 of file Traits.hpp.

◆ tan()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::tan ( Complex< T > const &  x)
constexpr

Tangent.

Definition at line 558 of file Complex.hpp.

◆ tanh()

template<typename T >
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC Complex<T> alpaka::tanh ( Complex< T > const &  x)
constexpr

Hyperbolic tangent.

Definition at line 566 of file Complex.hpp.

◆ toArray()

template<typename TDim , typename TVal >
constexpr ALPAKA_FN_HOST_ACC auto alpaka::toArray ( Vec< TDim, TVal > const &  v) -> std::array<TVal, TDim::value>
constexpr

Converts a Vec to a std::array.

Definition at line 605 of file Vec.hpp.

◆ Vec()

template<typename TFirstIndex , typename... TRestIndices>
alpaka::Vec ( TFirstIndex &&  ,
TRestIndices &&  ... 
) -> Vec< DimInt< 1+sizeof...(TRestIndices)>, std::decay_t< TFirstIndex >>

◆ ViewConst()

template<typename TView >
alpaka::ViewConst ( TView  ) -> ViewConst< std::decay_t< TView >>

◆ wait() [1/2]

template<typename TAwaited >
ALPAKA_FN_HOST auto alpaka::wait ( TAwaited const &  awaited) -> void

Waits the thread for the completion of the given awaited action to complete.

Special Handling for events: If the event is re-enqueued wait() will terminate when the re-enqueued event will be ready and previously enqueued states of the event will be ignored.

Definition at line 34 of file Traits.hpp.

◆ wait() [2/2]

template<typename TWaiter , typename TAwaited >
ALPAKA_FN_HOST auto alpaka::wait ( TWaiter &  waiter,
TAwaited const &  awaited 
) -> void

The waiter waits for the given awaited action to complete.

Special Handling if waiter is a queue and awaited an event: The waiter waits for the event state to become ready based on the recently captured event state at the time of the API call even if the event is being re-enqueued later.

Definition at line 46 of file Traits.hpp.

◆ WorkDivMembers()

template<typename TDim , typename TIdx >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC alpaka::WorkDivMembers ( alpaka::Vec< TDim, TIdx > const &  gridBlockExtent,
alpaka::Vec< TDim, TIdx > const &  blockThreadExtent,
alpaka::Vec< TDim, TIdx > const &  elemExtent 
) -> WorkDivMembers< TDim, TIdx >

Deduction guide for the constructor which can be called without explicit template type parameters.

Variable Documentation

◆ accMatchesTags

template<typename TAcc , typename... TTag>
constexpr bool alpaka::accMatchesTags = (std::is_same_v<alpaka::AccToTag<TAcc>, TTag> || ...)
inlineconstexpr

Definition at line 57 of file Tag.hpp.

◆ BlockSharedDynMemberAllocKiB

constexpr std::uint32_t alpaka::BlockSharedDynMemberAllocKiB = 47u
constexpr

Definition at line 14 of file BlockSharedDynMemberAllocKiB.hpp.

◆ hasAsyncBufSupport

template<typename TDev , typename TDim >
constexpr bool alpaka::hasAsyncBufSupport = trait::HasAsyncBufSupport<TDim, TDev>::value
inlineconstexpr

Checks if the given device can allocate a stream-ordered memory buffer of the given dimensionality.

Template Parameters
TDevThe type of device to allocate the buffer on.
TDimThe dimensionality of the buffer to allocate.

Definition at line 95 of file Traits.hpp.

◆ hasMappedBufSupport

template<typename TPlatform >
constexpr bool alpaka::hasMappedBufSupport = trait::HasMappedBufSupport<TPlatform>::value
inlineconstexpr

Checks if the host can allocate a pinned/mapped host memory, accessible by all devices in the given platform.

Template Parameters
TPlatformThe platform from which the buffer is accessible.

Definition at line 156 of file Traits.hpp.

◆ is_decayed_v

template<typename T , typename U >
constexpr auto alpaka::is_decayed_v = std::is_same_v<std::decay_t<T>, std::decay_t<U>>
inlineconstexpr

Provides a decaying wrapper around std::is_same. Example: is_decayed_v<volatile float, float> returns true.

Definition at line 15 of file Decay.hpp.

◆ isAccelerator

template<typename TAcc >
constexpr bool alpaka::isAccelerator = concepts::ImplementsConcept<ConceptAcc, TAcc>::value
inlineconstexpr

True if TAcc is an accelerator, i.e. if it implements the ConceptAcc concept.

Definition at line 30 of file Traits.hpp.

◆ isDevice

template<typename TDev >
constexpr bool alpaka::isDevice = concepts::ImplementsConcept<ConceptDev, TDev>::value
inlineconstexpr

True if TDev is a device, i.e. if it implements the ConceptDev concept.

Definition at line 64 of file Traits.hpp.

◆ isKernelArgumentTriviallyCopyable

template<typename T >
constexpr bool alpaka::isKernelArgumentTriviallyCopyable = IsKernelArgumentTriviallyCopyable<T>::value
inlineconstexpr

Definition at line 224 of file Traits.hpp.

◆ isPlatform

template<typename TPlatform >
constexpr bool alpaka::isPlatform = concepts::ImplementsConcept<ConceptPlatform, TPlatform>::value
inlineconstexpr

True if TPlatform is a platform, i.e. if it implements the ConceptPlatform concept.

Definition at line 23 of file Traits.hpp.

◆ isQueue

template<typename TQueue >
constexpr bool alpaka::isQueue = concepts::ImplementsConcept<ConceptQueue, TQueue>::value
inlineconstexpr

True if TQueue is a queue, i.e. if it implements the ConceptQueue concept.

Definition at line 20 of file Traits.hpp.

◆ isVec

template<typename T >
constexpr bool alpaka::isVec = false
inlineconstexpr

Definition at line 598 of file Vec.hpp.

◆ isVec< Vec< TDim, TVal > >

template<typename TDim , typename TVal >
constexpr bool alpaka::isVec< Vec< TDim, TVal > > = true
inlineconstexpr

Definition at line 601 of file Vec.hpp.