![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Functionality which is usable on the host CPU controller thread. More...
Namespaces | |
| namespace | concepts |
| namespace | cpu |
| namespace | example |
| namespace | internal |
| namespace | logger |
| namespace | trait |
| namespace | unifiedCudaHip |
Classes | |
| struct | Demangled |
| struct | Device |
| Description of a specific device that one can schedule kernels on. More... | |
| struct | DeviceProperties |
| Properties of a device. More... | |
| struct | DeviceSelector |
| struct | DeviceSpec |
| Concept for a combination of an API and device kind. More... | |
| struct | Event |
| struct | Event< Device< T_Api, T_DeviceKind > > |
| struct | FrameSpec |
| Device/Api-agnostic description of the logical parallelism exposed to a kernel. More... | |
| struct | MakeAccessibleOnAcc |
| Provides an instance of an object which can be used within the compute kernel. More... | |
| struct | Queue |
| struct | Queue< Device< T_Api, T_DeviceKind >, T_QueueKind > |
| struct | SharedBuffer |
| Life time managed buffer with contiguous data. More... | |
| struct | ThreadSpec |
| Backend-specific description of the actual block and thread launch shape. More... | |
Typedefs | |
| template<typename T> | |
| using | Handle = std::shared_ptr<T> |
Functions | |
| template<alpaka::concepts::Api... T_Apis> | |
| consteval auto | allBackends (std::tuple< T_Apis... > const &usedApis, auto const listOfExecutors) |
| Generate the full set of backend dictionaries for a set of APIs. | |
| template<alpaka::concepts::DeviceSpec... T_DevicesSpecs> | |
| consteval auto | allBackends (std::tuple< T_DevicesSpecs... > const &usedDeviceSpecs, auto const &listOfExecutors) |
| Generate the full set of backend dictionaries for a set of device kinds. | |
| auto | cpuid (std::uint32_t, std::uint32_t, std::uint32_t ex[4]) -> void |
| constexpr auto | createBackendList (auto const devSpecList, auto const listOfExecutors) |
| Create the complete backend list for all device specifications and executors. | |
| constexpr auto | createBackendsFor (auto const deviceSpec, auto const listOfExecutors) |
| Build a tuple of backends for a single device specification. | |
| constexpr auto | defaultExecutor (internal::concepts::DeviceHandle auto deviceHandle) |
| Select a default executor for the given device. | |
| template<typename T> | |
| constexpr auto | demangledName () |
| template<typename T> | |
| constexpr auto | demangledName (T const &) |
| template<typename T_Device> | |
| Device (Handle< T_Device > &&) -> Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Device >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Device >()))> | |
| template<alpaka::concepts::DeviceSpec T_DeviceSpec> | |
| DeviceSelector (T_DeviceSpec const &deviceSpec) -> DeviceSelector< ALPAKA_TYPEOF(getApi(deviceSpec)), ALPAKA_TYPEOF(getDeviceKind(deviceSpec))> | |
| template<alpaka::concepts::DeviceSpec T_DeviceSpec> | |
| DeviceSpec (T_DeviceSpec const &deviceSpec) -> DeviceSpec< ALPAKA_TYPEOF(getApi(deviceSpec)), ALPAKA_TYPEOF(getDeviceKind(deviceSpec))> | |
| template<typename T> | |
| constexpr auto | EmbedTypeIntoSignature () |
| template<typename T_Event> | |
| Event (Handle< T_Event > &&) -> Event< Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Event >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Event >()))> > | |
| template<template< typename... > class T_TupleLike, typename... T_Entries> | |
| int | executeForEach (auto &&callable, T_TupleLike< T_Entries... > const &tuple) |
| ! | |
| template<alpaka::concepts::DeviceSpec... T_DeviceSpecs> | |
| int | executeForEachIfHasDevice (auto &&callable, std::tuple< T_DeviceSpecs... > const &tupleOfDeviceSpecs) |
| ! | |
| template<alpaka::concepts::VectorOrScalar T_NumFrames, alpaka::concepts::VectorOrScalar T_FrameExtents> | |
| FrameSpec (T_NumFrames const &, T_FrameExtents const &) -> FrameSpec< alpaka::trait::getVec_t< T_NumFrames >, alpaka::trait::getVec_t< T_FrameExtents >, alpaka::exec::AnyExecutor > | |
| template<alpaka::concepts::VectorOrScalar T_NumFrames, alpaka::concepts::VectorOrScalar T_FrameExtents, alpaka::concepts::Executor T_Executor> | |
| FrameSpec (T_NumFrames const &, T_FrameExtents const &, T_Executor) -> FrameSpec< alpaka::trait::getVec_t< T_NumFrames >, alpaka::trait::getVec_t< T_FrameExtents >, T_Executor > | |
| auto | getCpuName () -> std::string |
| constexpr auto | getDeviceSpecsFor (auto const api) |
| Create a tuple of device specifications for a single API. | |
| template<alpaka::concepts::Api... T_Apis> | |
| constexpr auto | getDeviceSpecsFor (std::tuple< T_Apis... > const apiList) |
| Create a flattened tuple of device specification objects for a list of APIs. | |
| template<onHost::concepts::ThreadSpec T_ThreadSpec, alpaka::concepts::KernelBundle T_KernelBundle> | |
| constexpr uint32_t | getDynSharedMemBytes (T_ThreadSpec spec, T_KernelBundle const &kernelBundle) |
| template<typename T_Api, alpaka::concepts::DeviceKind T_DeviceKind> | |
| constexpr concepts::FrameSpec auto | getFrameSpec (Device< T_Api, T_DeviceKind > const &device, alpaka::concepts::Executor auto executor, alpaka::concepts::VectorOrScalar auto const &extents) |
| Provides a frame specification to operate on a given index range. | |
| auto | getFreeGlobalMemBytes () -> std::size_t |
| auto | getGlobalMemCapacityBytes () -> std::size_t |
| template<alpaka::concepts::Api T_Api, alpaka::concepts::DeviceKind T_DeviceKind, alpaka::concepts::Executor T_Exec> | |
| consteval uint32_t | getMaxThreadsPerBlock (T_Api api, T_DeviceKind deviceKind, T_Exec exec) |
| A safe(ish) compile time lower bound on max threads per block for a given combination of API, device kind and executor. | |
| auto | getNativeHandle (auto const &handle) |
| Get the native handle of an handle. | |
| size_t | getPageSize () |
| template<typename T_Data> | |
| auto | getScanBufferSize (alpaka::concepts::VectorOrScalar auto const &extents) |
| For a scan of some size, this function returns the necessary buffer size in bytes. | |
| template<typename T_DataType, typename T_Api, alpaka::concepts::DeviceKind T_DeviceKind> | |
| constexpr concepts::FrameSpec auto | getSimdFrameSpec (Device< T_Api, T_DeviceKind > const &device, alpaka::concepts::Executor auto executor, alpaka::concepts::VectorOrScalar auto const &extents) |
| Provides a frame specification to operate on a given index range. | |
| template<onHost::concepts::ThreadSpec T_ThreadSpec, alpaka::concepts::KernelBundle T_KernelBundle> | |
| consteval bool | hasUserDefinedDynSharedMemBytes (T_ThreadSpec spec, T_KernelBundle const &kernelBundle) |
| bool | isDataAccessible (concepts::Device auto const &device, alpaka::concepts::IView auto const &view) |
| Check if the given view is accessible on the given device. | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| bool | isDataAccessible (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::IView auto const &view) |
| Check if the given view is accessible on the device of the given queue. | |
| consteval bool | isExecutorSupportedBy (auto executor, internal::concepts::DeviceHandle auto const &deviceHandle) |
| consteval bool | isPlatformAvaiable (alpaka::concepts::Api auto api) |
| template<typename T_Object, typename... T_Args> | |
| auto | make_sharedSingleton (T_Args &&... args) |
| auto | makeAcc (alpaka::onHost::concepts::ThreadSpec auto const &threadSpec, uint32_t numaIdx, bool setThreadAffinity) |
| decltype(auto) | makeAccessibleOnAcc (auto &&any) |
| Provides an instance of an object which can be used within the compute kernel. | |
| auto | makeDeviceSelector (alpaka::concepts::Api auto api, alpaka::concepts::DeviceKind auto deviceTag) |
| template<alpaka::concepts::DeviceSpec T_DeviceSpec> | |
| auto | makeDeviceSelector (T_DeviceSpec deviceSpec) |
| create an object to get access to devices | |
| template<alpaka::concepts::DeviceSpec T_DeviceSpec> | |
| auto | makeDeviceSpec (T_DeviceSpec any) |
| Create a device specification object. | |
| template<typename deferEvaluation = void> | |
| auto | makeHostDevice () |
| std::ostream & | operator<< (std::ostream &s, concepts::FrameSpec auto const &d) |
| std::ostream & | operator<< (std::ostream &s, concepts::ThreadSpec auto const &t) |
| std::ostream & | operator<< (std::ostream &s, DeviceProperties const &p) |
| template<alpaka::concepts::Api T_Api, typename T_Type, alpaka::concepts::Vector T_Extents, alpaka::concepts::Alignment T_MemAlignment> | |
| std::ostream & | operator<< (std::ostream &s, SharedBuffer< T_Api, T_Type, T_Extents, T_MemAlignment > const &buff) |
| template<typename T_Queue, alpaka::concepts::QueueKind T_QueueKind> | |
| Queue (Handle< T_Queue > &&, T_QueueKind) -> Queue< Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Queue >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Queue >()))>, T_QueueKind > | |
| template<alpaka::concepts::HasApi T_Any, typename T_Type, alpaka::concepts::Vector T_UserExtents, alpaka::concepts::Vector T_UserPitches> | |
| SharedBuffer (T_Any const &, T_Type *, T_UserExtents const &, T_UserPitches const &, std::invocable<> auto) -> SharedBuffer< ALPAKA_TYPEOF(getApi(std::declval< T_Any >())), T_Type, typename T_UserPitches::UniVec, Alignment<> > | |
| template<alpaka::concepts::HasApi T_Any, typename T_Type, alpaka::concepts::Vector T_UserExtents, alpaka::concepts::Vector T_UserPitches, alpaka::concepts::Alignment T_MemAlignment> | |
| SharedBuffer (T_Any const &, T_Type *, T_UserExtents const &, T_UserPitches const &, std::invocable<> auto, T_MemAlignment const) -> SharedBuffer< ALPAKA_TYPEOF(getApi(std::declval< T_Any >())), T_Type, typename T_UserPitches::UniVec, T_MemAlignment > | |
| std::string | simplifyFunctionSignature (std::string const &deName) |
| Simplify the C++ signature of a function. | |
| constexpr auto | supportedDevices (auto const api) |
| constexpr auto | supportedExecutors (internal::concepts::DeviceHandle auto deviceHandle, auto const listOfExecutors) |
| template<alpaka::concepts::VectorOrScalar T_NumBlocks, alpaka::concepts::VectorOrScalar T_NumThreads> | |
| ThreadSpec (T_NumBlocks const &, T_NumThreads const &) -> ThreadSpec< alpaka::trait::getVec_t< T_NumBlocks >, alpaka::trait::getVec_t< T_NumThreads > > | |
| template<alpaka::concepts::VectorOrScalar T_NumBlocks, alpaka::concepts::VectorOrScalar T_NumThreads, alpaka::concepts::Executor T_Executor> | |
| ThreadSpec (T_NumBlocks const &, T_NumThreads const &, T_Executor) -> ThreadSpec< alpaka::trait::getVec_t< T_NumBlocks >, alpaka::trait::getVec_t< T_NumThreads >, T_Executor > | |
| void | wait (alpaka::concepts::HasGet auto &handle) |
| wait for all work to be finished | |
| template<typename T_DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | concurrent (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::Executor auto const exec, alpaka::concepts::VectorOrScalar auto const &extents, auto &&fn, alpaka::concepts::IDataSource auto &&... inOut) |
| Execute an n-nary function on each element of all input data. | |
| template<typename T_DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | concurrent (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::VectorOrScalar auto const &extents, auto &&fn, alpaka::concepts::IDataSource auto &&... inOut) |
| An available default executor will be selected automatically. | |
| template<typename T_DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires ( std::is_convertible_v<T_DataType, alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(out0)>> && std::conjunction_v< std::is_convertible<T_DataType, typename alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(outOther)>>...>) | |
| void | iota (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::Executor auto const exec, T_DataType const &initValue, alpaka::concepts::IMdSpan auto &&out0, alpaka::concepts::IMdSpan auto &&... outOther) |
| Fill data with sequentially increasing index (iota value). | |
| template<typename T_DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires ( std::is_convertible_v<T_DataType, alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(out0)>> && std::conjunction_v< std::is_convertible<T_DataType, typename alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(outOther)>>...>) | |
| void | iota (Queue< T_Device, T_QueueKind > const &queue, T_DataType const &initValue, alpaka::concepts::IMdSpan auto &&out0, alpaka::concepts::IMdSpan auto &&... outOther) |
| An available default executor will be selected automatically. | |
| template<typename DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires (std::same_as<DataType, alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(out)>>) | |
| void | reduce (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::Executor auto const exec, DataType const &neutralElement, alpaka::concepts::IMdSpan auto out, auto &&binaryReduceFn, auto &&in) |
| accumulate the results into a scalar value. | |
| template<typename DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires (std::same_as<DataType, alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(out)>>) | |
| void | reduce (Queue< T_Device, T_QueueKind > const &queue, DataType const &neutralElement, alpaka::concepts::IMdSpan auto out, auto &&binaryReduceFn, alpaka::concepts::IDataSource auto &&in) |
| An available default executor will be selected automatically. | |
| void | inclusiveScan (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &buffer, alpaka::concepts::IMdSpan auto &outputVec, alpaka::concepts::IDataSource auto const &inputVec) |
| Perform an inclusive scan on the input data and write the result to the output data. | |
| void | inclusiveScan (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &outputVec, alpaka::concepts::IDataSource auto const &inputVec) |
| Perform an inclusive scan on the input data and write the result to the output data. | |
| void | inclusiveScanInPlace (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &buffer, alpaka::concepts::IMdSpan auto &dataVec) |
| Perform an inclusive scan on data in-place. | |
| void | inclusiveScanInPlace (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &dataVec) |
| Perform an inclusive scan on data in-place. | |
| void | exclusiveScan (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &buffer, alpaka::concepts::IMdSpan auto &outputVec, alpaka::concepts::IDataSource auto const &inputVec) |
| Perform an exclusive scan on the input data and write the result to the output data. | |
| void | exclusiveScan (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &outputVec, alpaka::concepts::IDataSource auto const &inputVec) |
| Perform an exclusive scan on the input data and write the result to the output data. | |
| void | exclusiveScanInPlace (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &buffer, alpaka::concepts::IMdSpan auto &dataVec) |
| Perform an exclusive scan on data in-place. | |
| void | exclusiveScanInPlace (auto const &queue, alpaka::concepts::Executor auto exec, alpaka::concepts::IMdSpan auto &dataVec) |
| Perform an exclusive scan on data in-place. | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | transform (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::Executor auto const exec, alpaka::concepts::IMdSpan auto &&out, auto &&fn, alpaka::concepts::IDataSource auto &&... in) |
| Transform the input data with the given function and write the result to the output data. | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | transform (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::IMdSpan auto &&out, auto &&fn, alpaka::concepts::IDataSource auto &&... in) |
| An available default executor will be selected automatically. | |
| template<typename DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires (std::same_as<DataType, alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(out)>>) | |
| void | transformReduce (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::Executor auto const exec, DataType const &neutralElement, alpaka::concepts::IMdSpan auto out, auto &&binaryReduceFn, auto &&transformFn, alpaka::concepts::IDataSource auto &&... in) |
| Transform the input data with the given function and accumulate the results into a scalar value. | |
| template<typename DataType, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires (std::same_as<DataType, alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(out)>>) | |
| void | transformReduce (Queue< T_Device, T_QueueKind > const &queue, DataType const &neutralElement, alpaka::concepts::IMdSpan auto out, auto &&binaryReduceFn, auto &&transformFn, alpaka::concepts::IDataSource auto &&... in) |
| An available default executor will be selected automatically. | |
Device allocations | |
| template<typename T_Type> | |
| auto | alloc (concepts::Device auto const &device, alpaka::concepts::VectorOrScalar auto const &extents) |
| Allocate memory on the given device. | |
| template<typename T_Type> | |
| auto | allocUnified (concepts::Device auto const &device, alpaka::concepts::VectorOrScalar auto const &extents) |
| Allocate memory on the given device with unified virtual memory. | |
| template<typename T_Type, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| auto | allocUnified (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::VectorOrScalar auto const &extents) |
| Allocates unified memory on the device associated with the given queue. | |
| template<typename T_Type> | |
| auto | allocMapped (concepts::Device auto const &device, alpaka::concepts::VectorOrScalar auto const &extents) |
| Allocate pinned memory on the host which is mapped into the address space of the device. | |
| template<typename T_Type, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| auto | allocMapped (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::VectorOrScalar auto const &extents) |
| Allocate pinned memory on the host which is mapped into the address space of the device. | |
| auto | allocLike (concepts::Device auto const &device, auto const &view) |
| Allocate memory on the given device based on a view. | |
Query extents | |
| decltype(auto) | getExtents (auto &&any) |
| Object extents. | |
| decltype(auto) | getExtents (alpaka::concepts::HasGet auto &&handle) |
| Handle extents. | |
Query multi-dimensional pitches | |
| decltype(auto) | getPitches (auto &&any) |
| Object pitches. | |
| decltype(auto) | getPitches (alpaka::concepts::HasGet auto &&handle) |
| Handle pitches. | |
Query the name | |
| std::convertible_to< std::string > auto | getStaticName (auto const &any) |
| Compile-time available name for a given object. | |
| std::convertible_to< std::string > auto | getStaticName (concepts::StaticNameHandle auto const &handle) |
| Compile-time available name of an handle. | |
| std::convertible_to< std::string > auto | getName (auto &&any) |
| Runtime name for a given object. | |
| std::convertible_to< std::string > auto | getName (concepts::NameHandle auto const &handle) |
| Runtime name for a given handle. | |
Query raw pointer | |
| decltype(auto) | data (auto &&any) |
| pointer to data of an object | |
| decltype(auto) | data (alpaka::concepts::HasGet auto &&handle) |
| pointer to data of an handle | |
Host allocations | |
| template<typename T_ValueType> | |
| auto | allocHost (alpaka::concepts::VectorOrScalar auto const &extents) |
| Allocate host memory for a given element type and extents. | |
| auto | allocHostLike (auto const &view) |
| Allocate host memory with the same value type and extents as an existing view. | |
Device selection utilities | |
| constexpr auto | getExecutorsList (auto const deviceSpec, auto const listOfExecutors) |
| Resolve the list of executors supported for a device specification. | |
Memory modifiers | |
| |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | memcpy (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, auto const &source) |
| copy data byte wise from one to another container | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | memcpy (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, auto const &source, alpaka::concepts::VectorOrScalar auto const &extents) |
| copy data byte wise from one to another container | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind, typename T_Storage, typename T> | |
| void | memcpy (Queue< T_Device, T_QueueKind > const &queue, onAcc::internal::GlobalDeviceMemoryWrapper< T_Storage, T > dest, auto &&source) |
| copy data byte wise from a container or host pointer to global device memory | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind, typename T_Storage, typename T> | |
| void | memcpy (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, onAcc::internal::GlobalDeviceMemoryWrapper< T_Storage, T > source) |
| copy data byte wise from global device memory to a container or host pointer | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | memset (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, uint8_t byteValue) |
| fill memory byte wise | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| void | memset (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, uint8_t byteValue, alpaka::concepts::VectorOrScalar auto const &extents) |
| fill memory byte wise | |
| template<typename T_Value, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires ( std::same_as<alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(dest)>, T_Value> && std::same_as<ALPAKA_TYPEOF(alpaka::internal::getApi(queue)), ALPAKA_TYPEOF(alpaka::internal::getApi(dest))>) | |
| void | fill (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, T_Value elementValue) |
| fill memory element wise | |
| template<typename T_Value, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> requires ( std::same_as<alpaka::trait::GetValueType_t<ALPAKA_TYPEOF(dest)>, T_Value> && std:: same_as<ALPAKA_TYPEOF(alpaka::internal::getApi(queue)), ALPAKA_TYPEOF(alpaka::internal::getApi(dest))>) | |
| void | fill (Queue< T_Device, T_QueueKind > const &queue, auto &&dest, T_Value elementValue, alpaka::concepts::VectorOrScalar auto const &extents) |
| fill memory element wise | |
Deferred device allocations | |
| template<typename T_Type, typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| auto | allocDeferred (Queue< T_Device, T_QueueKind > const &queue, alpaka::concepts::VectorOrScalar auto const &extents) |
| allocate memory that is accessible after it is processed in the queue | |
| template<typename T_Device, alpaka::concepts::QueueKind T_QueueKind> | |
| auto | allocLikeDeferred (Queue< T_Device, T_QueueKind > const &queue, auto const &view) |
| allocate memory that is accessible after it is processed in the queue | |
Variables | |
| constexpr auto | apis = std::make_tuple(api::host, api::cuda, api::hip, api::oneApi) |
| constexpr auto | enabledApis = meta::filter([](auto api) constexpr { return isPlatformAvaiable(api); }, apis) |
| constexpr auto | enabledDeviceSpecs |
| list of enabled device specifications | |
| template<typename T> | |
| constexpr bool | isFrameSpec_v = trait::IsFrameSpec<T>::value |
| template<typename T> | |
| constexpr bool | isThreadSpec_v = trait::IsThreadSpec<T>::value |
| constexpr int | NO_CPUID = 0 |
| constexpr int | UNKNOWN_COMPILER = 1 |
| constexpr int | UNKNOWN_CPU = 0 |
Functionality which is usable on the host CPU controller thread.
| using alpaka::onHost::Handle = std::shared_ptr<T> |
Definition at line 30 of file Handle.hpp.
|
consteval |
Generate the full set of backend dictionaries for a set of APIs.
The result contains a backend entry for each combination of supported device specification for the APIs and executors.
| usedApis | tuple of alpaka APIs to consider |
| listOfExecutors | tuple of executor types |
Definition at line 320 of file interface.hpp.
|
consteval |
Generate the full set of backend dictionaries for a set of device kinds.
The result contains a backend entry for each combination of supported device specification and executors.
| usedDeviceSpecs | tuple of alpaka device kinds |
| listOfExecutors | tuple of executor types |
Definition at line 338 of file interface.hpp.
|
inline |
Allocate memory on the given device.
| T_Type | type of the data elements |
| device | device handle |
| extents | number of elements for each dimension |
Definition at line 180 of file Device.hpp.
|
inline |
allocate memory that is accessible after it is processed in the queue
Deferred allocation means that the pointer in the returned buffer is valid after the function is returning. It is allowed to slice the buffer or use the encapsulated pointer for address calculations. In any cases the pointer is not allowed to be dereferenced before the memory allocation is processed in the queue. All tasks performing any memory access must be executed after the memory allocation is processed in the queue. This can be achieved by waiting on the queue or describing queue dependencies via waitFor(). The memory is allowed to be used in other queues too. To avoid that a view to the memory is still in use during the deallocation you can use
| T_Type | type of the data elements |
| queue | queue handle |
| extents | number of elements for each dimension |
|
inline |
Allocate host memory for a given element type and extents.
The allocation is performed on the host controller device (api::host ans deviceKind::cpu). The returned view owns the allocated memory.
| T_ValueType | type of the data elements |
| extents | number of elements per dimension (vector or scalar) |
Definition at line 190 of file interface.hpp.
|
inline |
Allocate host memory with the same value type and extents as an existing view.
The content of the source view is not copied. The function deduces the element type and extents from view and creates a new shared buffer on the host controller device.
| view | a view (e.g. std::vector, std::array, or any compatible type) |
Definition at line 208 of file interface.hpp.
|
inline |
Allocate memory on the given device based on a view.
Derives type and extents of the memory from the view. The content of the memory is NOT copied to the created allocated memory.
| device | device handle | |
| [in] | view | memory where properties will be derived from |
Definition at line 281 of file Device.hpp.
|
inline |
allocate memory that is accessible after it is processed in the queue
In any cases the pointer is not allowed to be dereferenced before the memory allocation is processed in the queue. All tasks performing any memory access must be executed after the memory allocation is processed in the queue. This can be achieved by waiting on the queue or describing queue dependencies via waitFor(). The memory is allowed to be used in other queues too. To avoid that a view to the memory is still in use during the deallocation you can use
| queue | queue handle | |
| [in] | view | other memory where the extents will be derived from |
|
inline |
Allocate pinned memory on the host which is mapped into the address space of the device.
Mapped memory is located on the host and is transferred for each access via the PCIe/Nvlink bus. The performance on the device is mostly pure. Mapped memory should be used for host memory if you transfer memory between host and device via onHost::memcpy() because the transfer will be optimized for latency and performance.
| T_Type | type of the data elements |
| device | device handle |
| extents | number of elements for each dimension |
Definition at line 245 of file Device.hpp.
|
inline |
Allocate pinned memory on the host which is mapped into the address space of the device.
Mapped memory is located on the host and is transferred for each access via the PCIe/Nvlink bus. The performance on the device is mostly pure. Mapped memory should be used for host memory if you transfer memory between host and device via onHost::memcpy() because the transfer will be optimized for latency and performance.
| T_Type | type of the data elements |
| queue | queue handle |
| extents | number of elements for each dimension |
Definition at line 264 of file Device.hpp.
|
inline |
Allocate memory on the given device with unified virtual memory.
This memory can be accessed from all devices with the same Api and device kind. Depending on the backend e.g. OneApi memory can be accessed by other device kind devices if they are using the same native context. It is not allowed to access the data on two devices at the same time, this must be avoided by explicit synchronizations. Unified memory follows the rules of UVM memory of the device backend e.g. CUDA, HIP, ...
| T_Type | type of the data elements |
| device | device handle |
| extents | number of elements for each dimension |
Definition at line 201 of file Device.hpp.
|
inline |
Allocates unified memory on the device associated with the given queue.
This memory can be accessed from all devices with the same Api and device kind. Depending on the backend e.g. OneApi memory can be accessed by other device kind devices if they are using the same native context. It is not allowed to access the data on two devices at the same time, this must be avoided by explicit synchronizations. Unified memory follows the rules of UVM memory of the device backend e.g. CUDA, HIP, ...
| T_Type | type of the data elements |
| queue | queue handle |
| extents | number of elements for each dimension |
Definition at line 223 of file Device.hpp.
|
inline |
Execute an n-nary function on each element of all input data.
Concurrent is quite equal to a for-each algorithm with the difference that the functor is allowed to write to any argument. So it allows to implement a transform with a free number of output arguments.
| queue | The queue to execute the transformation. |
| exec | The executor to use for the kernel execution. |
| extents | multi dimensional or scalar number of elements |
| fn | The function to apply to each element of the input data. The functor should support |
| inOut | The input/output data, all data is passed to fn. |
examples for a unary add one functor:
Definition at line 45 of file concurrent.hpp.
|
inline |
An available default executor will be selected automatically.
The default executor is an executor with most parallelism/performance.
Definition at line 70 of file concurrent.hpp.
|
inline |
Definition at line 71 of file sysInfo.hpp.
|
constexpr |
Create the complete backend list for all device specifications and executors.
| devSpecList | tuple of device specifications |
| listOfExecutors | tuple of executor types |
Definition at line 302 of file interface.hpp.
|
constexpr |
Build a tuple of backends for a single device specification.
A backend is the combination of a device specification and an executor. Query its executor via alpaka::getExecutor(backend) and recover its device specification via alpaka::onHost::DeviceSpec{backend}.
| deviceSpec | the device specification to associate with the executors |
| listOfExecutors | tuple of executor types |
Definition at line 282 of file interface.hpp.
|
inline |
pointer to data of an handle
For multi-dimensional data the data is not required to be continuous.
| handle | handle providing data access (e.g. view) |
Definition at line 169 of file interface.hpp.
|
inline |
pointer to data of an object
For multi-dimensional data the data is not required to be continuous.
| any | object providing data access (e.g. std::vector) |
Definition at line 157 of file interface.hpp.
|
constexpr |
|
constexpr |
Definition at line 49 of file demangledName.hpp.
|
constexpr |
Definition at line 55 of file demangledName.hpp.
| alpaka::onHost::Device | ( | Handle< T_Device > && | ) | -> Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Device >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Device >()))> |
| alpaka::onHost::DeviceSelector | ( | T_DeviceSpec const & | deviceSpec | ) | -> DeviceSelector< ALPAKA_TYPEOF(getApi(deviceSpec)), ALPAKA_TYPEOF(getDeviceKind(deviceSpec))> |
| alpaka::onHost::DeviceSpec | ( | T_DeviceSpec const & | deviceSpec | ) | -> DeviceSpec< ALPAKA_TYPEOF(getApi(deviceSpec)), ALPAKA_TYPEOF(getDeviceKind(deviceSpec))> |
|
constexpr |
Definition at line 26 of file demangledName.hpp.
| alpaka::onHost::Event | ( | Handle< T_Event > && | ) | -> Event< Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Event >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Event >()))> > |
| void alpaka::onHost::exclusiveScan | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | buffer, | ||
| alpaka::concepts::IMdSpan auto & | outputVec, | ||
| alpaka::concepts::IDataSource auto const & | inputVec ) |
Perform an exclusive scan on the input data and write the result to the output data.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| outputVec | The output data. To perform an in-place scan, use the overload with only one data object. |
| inputVec | The input data. Can be const. |
| void alpaka::onHost::exclusiveScan | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | outputVec, | ||
| alpaka::concepts::IDataSource auto const & | inputVec ) |
Perform an exclusive scan on the input data and write the result to the output data.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| outputVec | The output data. To perform an in-place scan, use the overload with only one data object. |
| inputVec | The input data. Can be const. |
| void alpaka::onHost::exclusiveScanInPlace | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | buffer, | ||
| alpaka::concepts::IMdSpan auto & | dataVec ) |
Perform an exclusive scan on data in-place.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| dataVec | The vector to scan, will be overwritten with the result. |
| void alpaka::onHost::exclusiveScanInPlace | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | dataVec ) |
Perform an exclusive scan on data in-place.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| dataVec | The vector to scan, will be overwritten with the result. |
|
inline |
!
Execute a callable for each tuple entry.
| callable | Callable that can be invoked with each tuple entry and returns an execution status. A return value of zero (EXIT_SUCCESS) indicates success; any non-zero value indicates a failure. |
| tuple | Tuple like list of entries used to invoke the callable. |
Definition at line 28 of file executeForEach.hpp.
|
inline |
!
execute a callable for each device specification if there is a device available
The function contains a runtime check if at least one device is available, if there is no device the callable will not be executed. Not executed combinations will return EXIT_SUCCESS.
| callable | Callable that can be invoked with device specification and returns an execution status. A return value of zero (EXIT_SUCCESS) indicates success; any non-zero value indicates a failure. |
| tuple | Tuple like list of device specifications used to invoke the callable. otherwise, at least one failure occurred. |
Definition at line 61 of file executeForEach.hpp.
|
inline |
fill memory element wise
| [in,out] | dest | can be a container/view where the data should be written to The caller should ensure that the memory is valid until the operation is completed not until the execution handle is given back because alpaka is not extending the life-time until the operation is finished. |
| elementValue | value to be written to each element |
|
inline |
fill memory element wise
| [in,out] | dest | can be a container/view where the data should be written to The caller should ensure that the memory is valid until the operation is completed not until the execution handle is given back because alpaka is not extending the life-time until the operation is finished. |
| elementValue | value to be written to each element | |
| extents | M-dimensional data extents in elements, can be smaller than the container capacity |
| alpaka::onHost::FrameSpec | ( | T_NumFrames const & | , |
| T_FrameExtents const & | ) -> FrameSpec< alpaka::trait::getVec_t< T_NumFrames >, alpaka::trait::getVec_t< T_FrameExtents >, alpaka::exec::AnyExecutor > |
| alpaka::onHost::FrameSpec | ( | T_NumFrames const & | , |
| T_FrameExtents const & | , | ||
| T_Executor | ) -> FrameSpec< alpaka::trait::getVec_t< T_NumFrames >, alpaka::trait::getVec_t< T_FrameExtents >, T_Executor > |
|
inline |
Definition at line 78 of file sysInfo.hpp.
|
constexpr |
Create a tuple of device specifications for a single API.
Each device specifications combines the supplied API with one of the supported device types for that API.
Definition at line 254 of file interface.hpp.
|
constexpr |
Create a flattened tuple of device specification objects for a list of APIs.
| apiList | a std::tuple containing the APIs |
Definition at line 267 of file interface.hpp.
|
constexpr |
|
constexpr |
Resolve the list of executors supported for a device specification.
This helper is used internally to build backend dictionaries.
| deviceSpec | device specification to be used |
| listOfExecutors | tuple of executor types to be filtered |
Definition at line 229 of file interface.hpp.
|
inline |
Handle extents.
| handle | can be a view, a data |
Definition at line 35 of file interface.hpp.
|
inline |
Object extents.
| any | can be a std::vector, std::array, ... |
Definition at line 25 of file interface.hpp.
|
inlineconstexpr |
Provides a frame specification to operate on a given index range.
| extents | size of the index range |
Definition at line 330 of file Device.hpp.
|
inline |
| std::logic_error | if not implemented on the system and std::runtime_error on other errors. |
Definition at line 210 of file sysInfo.hpp.
|
inline |
Definition at line 147 of file sysInfo.hpp.
|
consteval |
A safe(ish) compile time lower bound on max threads per block for a given combination of API, device kind and executor.
Returns the minimum number of threads-per-block guaranteed to be supported across all devices of the executor's backend family. The actual device may support more; this is a conservative bound for compile-time clamping of block sizes.
|
inline |
Runtime name for a given object.
| any | object whose name shall be queried |
Definition at line 106 of file interface.hpp.
|
inline |
Runtime name for a given handle.
| handle | object whose name shall be queried |
Definition at line 116 of file interface.hpp.
|
inline |
Get the native handle of an handle.
The native handle can be passed to the underlying backend API (e.g. CUDA, HIP, OpenMP) for low-level operations.
| handle | object exposing a native handle |
Definition at line 131 of file interface.hpp.
|
inline |
Definition at line 125 of file sysInfo.hpp.
|
inline |
Handle pitches.
| handle | can be a view, a data |
Definition at line 70 of file interface.hpp.
|
inline |
Object pitches.
| any | can be a std::vector, std::array, ... |
Definition at line 55 of file interface.hpp.
| auto alpaka::onHost::getScanBufferSize | ( | alpaka::concepts::VectorOrScalar auto const & | extents | ) |
For a scan of some size, this function returns the necessary buffer size in bytes.
When multiple scans of the same extents are needed (for example in a loop), this function can be used to only allocate an intermediate buffer once, removing alloc/free overhead. For unique scan calls, the buffer can be omitted in the scan call, in which case it will be allocated and freed on the fly.
| T_Data | The type of the data to be scanned. |
| extents | The extents of the scan. |
|
inlineconstexpr |
Provides a frame specification to operate on a given index range.
The frame specification will be optimized for SIMD executions in the highest dimension for a flat non-hierarchical execution via onAcc::worker::threadsInGrid. Do not use this functions for kernel using hierarchical thread parallelism, in many cases the frame specification depends on the outer parallelism in the kernel.
| T_DataType | the data type for which you would like to SIMD optimize |
| extents | number of elements for each dimension of the type T_DataType |
Definition at line 356 of file Device.hpp.
|
inline |
Compile-time available name for a given object.
| any | object whose name shall be queried |
Definition at line 86 of file interface.hpp.
|
inline |
Compile-time available name of an handle.
| handle | object whose name shall be queried |
Definition at line 96 of file interface.hpp.
|
consteval |
| void alpaka::onHost::inclusiveScan | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | buffer, | ||
| alpaka::concepts::IMdSpan auto & | outputVec, | ||
| alpaka::concepts::IDataSource auto const & | inputVec ) |
Perform an inclusive scan on the input data and write the result to the output data.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| outputVec | The output data. To perform an in-place scan, use the overload with only one data object. |
| inputVec | The input data. Can be const. |
| void alpaka::onHost::inclusiveScan | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | outputVec, | ||
| alpaka::concepts::IDataSource auto const & | inputVec ) |
Perform an inclusive scan on the input data and write the result to the output data.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| outputVec | The output data. To perform an in-place scan, use the overload with only one data object. |
| inputVec | The input data. Can be const. |
| void alpaka::onHost::inclusiveScanInPlace | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | buffer, | ||
| alpaka::concepts::IMdSpan auto & | dataVec ) |
Perform an inclusive scan on data in-place.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| dataVec | The vector to scan, will be overwritten with the result. |
| void alpaka::onHost::inclusiveScanInPlace | ( | auto const & | queue, |
| alpaka::concepts::Executor auto | exec, | ||
| alpaka::concepts::IMdSpan auto & | dataVec ) |
Perform an inclusive scan on data in-place.
| queue | The queue to enqueue to. |
| exec | The executor to run with. |
| buffer | (optional) The internally used buffer. Use the scanBufferSize() function to check how big the buffer needs to be. If omitted, it will be allocated and destructed on the fly. If you call this method repeatedly, it is recommended to reuse the buffer whenever possible, or to provide a buffer allocated with onHost::allocDeferred() to reduce the overhead of allocating and deallocating the buffer on each call. |
| dataVec | The vector to scan, will be overwritten with the result. |
|
inline |
Fill data with sequentially increasing index (iota value).
For multidimensional memory, the iota value is increased fastest in the last dimension.
| T_DataType | Iota type which is used. Type must be convertible to the value type of the output data. Only fundamental types are allowed. |
| queue | The queue to execute the algorithm. |
| exec | The executor to use for the kernel execution. |
| initValue | Index of the first element. |
| out0 | Output data to set the iota value. Any kind of alpaka View/MdSpan is supported. The product of the extents must fit into the precision of the index_type. |
| outOther | Additional output data to set the iota value. The extents must be at least as large as out0. Any kind of alpaka View/MdSpan is supported. |
|
inline |
|
inline |
Check if the given view is accessible on the given device.
| device | device handle |
| view | memory where properties will be derived from |
Definition at line 297 of file Device.hpp.
|
inline |
Check if the given view is accessible on the device of the given queue.
| queue | queue handle |
Definition at line 313 of file Device.hpp.
|
consteval |
|
consteval |
|
inline |
Definition at line 14 of file Handle.hpp.
|
inline |
Definition at line 92 of file Serial.hpp.
|
inline |
Provides an instance of an object which can be used within the compute kernel.
Definition at line 45 of file KernelBundle.hpp.
|
inline |
Definition at line 83 of file DeviceSelector.hpp.
|
inline |
create an object to get access to devices
Definition at line 78 of file DeviceSelector.hpp.
|
inline |
Create a device specification object.
| any | Any device specification description providing an api and device kind. |
Definition at line 88 of file DeviceSpec.hpp.
|
inline |
Definition at line 89 of file DeviceSelector.hpp.
|
inline |
copy data byte wise from one to another container
| queue | the copy will be executed after all previous work in this queue is finished | |
| [in,out] | dest | can be a container/view where the data should be written to |
| [in] | source | can be a container/view from which the data will be copied |
|
inline |
copy data byte wise from one to another container
| queue | the copy will be executed after all previous work in this queue is finished | |
| [in,out] | dest | can be a container/view where the data should be written to |
| [in] | source | can be a container/view from which the data will be copied |
| extents | M-dimensional data extents in elements, can be smaller than the container capacity |
|
inline |
copy data byte wise from global device memory to a container or host pointer
| queue | the copy will be executed after all previous work in this queue is finished | |
| [in,out] | dest | can be a container/view or host accessible pointer the data should be written to |
| [in] | source | must be device global memory on the device of the queue from which the data will be copied |
|
inline |
copy data byte wise from a container or host pointer to global device memory
| queue | the copy will be executed after all previous work in this queue is finished | |
| [in,out] | dest | must be device global memory on the device of the queue the data should be written to |
| [in] | source | can be a container/view or host accessible pointer from which the data will be copied |
|
inline |
fill memory byte wise
| [in,out] | dest | can be a container/view where the data should be written to The caller should ensure that the memory is valid until the operation is completed not until the execution handle is given back because alpaka is not extending the life-time until the operation is finished. |
| byteValue | value to be written to each byte |
|
inline |
fill memory byte wise
| [in,out] | dest | can be a container/view where the data should be written to The caller should ensure that the memory is valid until the operation is completed not until the execution handle is given back because alpaka is not extending the life-time until the operation is finished. |
| byteValue | value to be written to each byte | |
| extents | M-dimensional data extents in elements, can be smaller than the container capacity |
| std::ostream & alpaka::onHost::operator<< | ( | std::ostream & | s, |
| concepts::FrameSpec auto const & | d ) |
Definition at line 143 of file FrameSpec.hpp.
| std::ostream & alpaka::onHost::operator<< | ( | std::ostream & | s, |
| concepts::ThreadSpec auto const & | t ) |
Definition at line 121 of file ThreadSpec.hpp.
|
inline |
Definition at line 113 of file DeviceProperties.hpp.
| std::ostream & alpaka::onHost::operator<< | ( | std::ostream & | s, |
| SharedBuffer< T_Api, T_Type, T_Extents, T_MemAlignment > const & | buff ) |
Definition at line 330 of file SharedBuffer.hpp.
| alpaka::onHost::Queue | ( | Handle< T_Queue > && | , |
| T_QueueKind | ) -> Queue< Device< ALPAKA_TYPEOF(alpaka::internal::getApi(std::declval< T_Queue >())), ALPAKA_TYPEOF(alpaka::internal::getDeviceKind(std::declval< T_Queue >()))>, T_QueueKind > |
|
inline |
accumulate the results into a scalar value.
| queue | The queue to execute the transformation. |
| exec | The executor to use for the kernel execution. |
| neutralElement | The neutral element in respect to binaryReduceFn. |
| out | MdSpan for the result. The value_type must be equal to neutralElement and the result of the binary reduce functor type. The result is written to the first element of the output data. |
| binaryReduceFn | Reduce binary functor, the functor operation must be transitive and commutative. The atomic operation atomic::alpakaAtomicInvoke(ReduceFnType, onAcc::concepts::Acc, auto* destination,auto source) must be overloaded. The functor execution order is not specified. The functor should support Simd packages, if not you can enforce the element wise execution by wrapping into ScalarFunc. |
| in | The input data which should be reduced. |
Definition at line 29 of file reduce.hpp.
|
inline |
An available default executor will be selected automatically.
The default executor is an executor with most parallelism/performance.
Definition at line 64 of file reduce.hpp.
| alpaka::onHost::SharedBuffer | ( | T_Any const & | , |
| T_Type * | , | ||
| T_UserExtents const & | , | ||
| T_UserPitches const & | , | ||
| std::invocable<> | auto ) -> SharedBuffer< ALPAKA_TYPEOF(getApi(std::declval< T_Any >())), T_Type, typename T_UserPitches::UniVec, Alignment<> > |
| alpaka::onHost::SharedBuffer | ( | T_Any const & | , |
| T_Type * | , | ||
| T_UserExtents const & | , | ||
| T_UserPitches const & | , | ||
| std::invocable<> | auto, | ||
| T_MemAlignment const | ) -> SharedBuffer< ALPAKA_TYPEOF(getApi(std::declval< T_Any >())), T_Type, typename T_UserPitches::UniVec, T_MemAlignment > |
|
inline |
Simplify the C++ signature of a function.
Template parameters will be left out and the alpaka namespace will be removed.
Definition at line 64 of file demangledName.hpp.
|
constexpr |
|
constexpr |
| alpaka::onHost::ThreadSpec | ( | T_NumBlocks const & | , |
| T_NumThreads const & | ) -> ThreadSpec< alpaka::trait::getVec_t< T_NumBlocks >, alpaka::trait::getVec_t< T_NumThreads > > |
| alpaka::onHost::ThreadSpec | ( | T_NumBlocks const & | , |
| T_NumThreads const & | , | ||
| T_Executor | ) -> ThreadSpec< alpaka::trait::getVec_t< T_NumBlocks >, alpaka::trait::getVec_t< T_NumThreads >, T_Executor > |
|
inline |
Transform the input data with the given function and write the result to the output data.
fn can be a lambda function if all arguments are specialized. This fully specialized functor must mostly wrapped by
| queue | The queue to execute the transformation. |
| exec | The executor to use for the kernel execution. |
| out | The output data to write the result to. |
| fn | The function to apply to each element of the input data. The functor should support Simd packages. If not you can enforce the element wise execution by wrapping into |
| in | The input data to transform, all input data is passed to fn. |
examples for a identity unary transform functor:
Definition at line 51 of file transform.hpp.
|
inline |
An available default executor will be selected automatically.
The default executor is an executor with most parallelism/performance.
Definition at line 76 of file transform.hpp.
|
inline |
Transform the input data with the given function and accumulate the results into a scalar value.
transformFn can be a lambda function if all arguments are specialized. This fully specialized functor must mostly wrapped by
| queue | The queue to execute the transformation. |
| exec | The executor to use for the kernel execution. |
| neutralElement | The neutral element in respect to binaryReduceFn. |
| out | MdSpan for the result. The value_type must be equal to neutralElement and the result of the binary reduce functor type. The result is written to the first element of the output data. |
| binaryReduceFn | Reduce binary functor, the functor operation must be transitive and commutative. The atomic operation atomic::alpakaAtomicInvoke(ReduceFnType, onAcc::concepts::Acc, auto* destination,auto source) must be overloaded. The functor execution order is not specified. The functor should support Simd packages, if not you can enforce the element wise execution by wrapping into |
| transformFn | The function to apply to each element of the input data. The functor should support Simd packages. If not you can enforce the element wise execution by wrapping into ScalarFunc. If you would like to support stencil executions wrapp fn into StencilFunc. StencilFunc is getting all arguments as SimdPtr. If StencilFunc is used you should take care to not read outside of valid memory ranges by using sub-views to your input and output data. Optionally a transformFn can have an accelerator as first argument. |
| in | The input data to transform, all input data is passed to fn. transformFn must support as many arguments as input data is provided. An optional argument for the accelerator is support as first argument if needed. |
examples for a identity unary transform functor:
Definition at line 60 of file transformReduce.hpp.
|
inline |
An available default executor will be selected automatically.
The default executor is the executor with the most parallelism/performance.
Definition at line 97 of file transformReduce.hpp.
|
inline |
wait for all work to be finished
Waits until all work submitted to any before this call has finished
| handle | queue/device/event |
Definition at line 142 of file interface.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
list of enabled device specifications
Definition at line 99 of file DeviceSpec.hpp.
|
constexpr |
Definition at line 118 of file FrameSpec.hpp.
|
constexpr |
Definition at line 102 of file ThreadSpec.hpp.
|
constexpr |
Definition at line 48 of file sysInfo.hpp.
|
constexpr |
Definition at line 50 of file sysInfo.hpp.
|
constexpr |
Definition at line 49 of file sysInfo.hpp.