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

Support multiple devices and contexts #1

Open
jcuda opened this issue Jun 13, 2016 · 0 comments
Open

Support multiple devices and contexts #1

jcuda opened this issue Jun 13, 2016 · 0 comments

Comments

@jcuda
Copy link
Owner

jcuda commented Jun 13, 2016

The current handling of devices and contexts in the jcuda-vec classes is very limited. The library can attach to a single context, and only to one context. If no context is available, it will create one, but always for a single device (the first one).

In order to improve this, serval options have to be considered:

  • whether there has to be some cuCtxSetCurrent call inside of the VecFloat methods
  • whether it will be the responsibility of the user to call something like VecFloat.attachToCurrentThread() before using the VecFloat class on a different thread
  • whether it will be the responsibility of the user to call something like VecFloat.setCurrentContext(myContext) before using the VecFloat class on data that belongs to myContext
  • whether one VecFloat instance has to be created for each context (because the modules that are created during the initialization of the VecFloat class belong to one context only)
  • whether the VecFloat will need a (context-) "handle", like it is used in the newer versions of the runtime libraries, and which has to be passed to all method calls

( Already listed in this forum thread (the formatting is a bit broken, due to a forum software update - sorry))

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