Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vikunja namespaces #89

Open
SimeonEhrig opened this issue Sep 5, 2022 · 1 comment
Open

vikunja namespaces #89

SimeonEhrig opened this issue Sep 5, 2022 · 1 comment

Comments

@SimeonEhrig
Copy link
Member

SimeonEhrig commented Sep 5, 2022

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 of host. 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.

@SimeonEhrig SimeonEhrig changed the title alpaka namespaces vikunja namespaces Sep 5, 2022
@SimeonEhrig
Copy link
Member Author

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.

  1. There is only vikunja::transform. Either vikunja::transform throws an error, if the acc cannot access the memory or it automatically copies the memory to the correct memory type.
  2. There is vikunja::host::transform and vikunja::device::transform. If the acc cannot access the memory, it throws an compile error.
  3. There is vikunja::transform, vikunja::host::transform and vikunja::device::transform. vikunja::host::transform and vikunja::device::transform throws an compile error if the acc cannot access the memory. vikunja::transform is ether an alias of vikunja::device::transform or vikunja::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 the namespace 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant