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.
Alpaka provides different device function via the alpaka acc to access the current id (alpaka::getIdx), do math (alpaka::math::abs) and other things. Some of the functions allows to break the constrains of the vikunja algorithm like writing to a specific element via thread id in the input memory. Therefore @j-stephan suggest in https://github.com/alpaka-group/vikunja/pull/59#discussion_r782939481 to provide an vikunja::acc type which only allows access to safe functions.
This issue should collect feedback and should decide if it is useful to implement a vikunja::acc object.
Pros
make it more safe the acc object
Con
extra work to maintain the vikunja::acc object and keep track with the alpaka::acc object
for some functions, it is not clear, if they should be forbidden or not
Alpaka provides different device function via the alpaka acc to access the current id (
alpaka::getIdx
), do math (alpaka::math::abs
) and other things. Some of the functions allows to break the constrains of the vikunja algorithm like writing to a specific element via thread id in the input memory. Therefore @j-stephan suggest in https://github.com/alpaka-group/vikunja/pull/59#discussion_r782939481 to provide anvikunja::acc
type which only allows access to safe functions.This issue should collect feedback and should decide if it is useful to implement a
vikunja::acc
object.Pros
Con