Vikunja is a performance portable algorithm library that defines functions operating on ranges of elements for a variety of purposes . It supports the execution on multi-core CPUs and various GPUs. Vikunja uses alpaka to implement platform-independent primitives such as reduce or transform.
Currently, both the OpenMP and the CUDA workdiv use a runtime-computed value for one of their workdiv parameters. For CUDA, this requires a call to cudaGetDeviceProperties, which turns out to be very costly in applications where all the data is available on the GPU.
For OpenMP, std::thread::hardware_concurrency is used.
Both values should be cached somehow.
This is not trivial as the workdiv is defined by a policy with static methods.
Currently, both the OpenMP and the CUDA workdiv use a runtime-computed value for one of their workdiv parameters. For CUDA, this requires a call to
cudaGetDeviceProperties
, which turns out to be very costly in applications where all the data is available on the GPU. For OpenMP,std::thread::hardware_concurrency
is used. Both values should be cached somehow. This is not trivial as the workdiv is defined by a policy with static methods.