vikunja namespaces
SimeonEhrig opened this issue · comments
Currently the vikunja has no clear concept for different namespaces. The main question is, how detailed or flat should be it?
Independent of the namespace question, I want to introduce the concept of host
and device
:
- A accelerator fulfill the requirements of a
host
, if a device of the type accelerator can execute the non-vikunja c++-code. Typical the CPU of a computer. - Host memory can be accessible from non-vikunja c++ code without memory copy.
device
is a subset ofhost
. It can execute non-vikunja c++ code but don't need it.device
can be accessible from non-vikunja c++ code without memory copy but it is not required
Note: CUDA virtual memory fulfill the requirements of host memory.
First, I would put every functionality, which is required for the implementation of the vikunja functions and which should normally not used by the user in an extra namespace, like the existing vikunja::operators
(but this needs a better name).
In my opinion the vikunja user namespace depends on the namespace of the algorithm, because I think it decides what the namespace vikunja
contains. I have three ideas.
To make it easier to understand, I use the algorithm transform
.
- There is only
vikunja::transform
. Eithervikunja::transform
throws an error, if the acc cannot access the memory or it automatically copies the memory to the correct memory type. - There is
vikunja::host::transform
andvikunja::device::transform
. If the acc cannot access the memory, it throws an compile error. - There is
vikunja::transform
,vikunja::host::transform
andvikunja::device::transform
.vikunja::host::transform
andvikunja::device::transform
throws an compile error if the acc cannot access the memory.vikunja::transform
is ether an alias ofvikunja::device::transform
orvikunja::host::transform
depending of the acc type or it automatically copies the memory to the correct buffer type.
- Option1: There is only the flat
namespace vikunja
and contains all. - Option 2: Ether does not provide the flat
namespace vikunja
or thenamespace vikunja
contains everything except the algorithm and the implementation details or it contains only function "common", widely used functions. - Option3: The
namespace vikunja
contains everything except the algorithm and the implementation details or it contains only function "common", widely used functions
My personal favorite is Option 3 and the namespace vikunja
contains "common" used functions.