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

Question: JCuda integration #8

Open
davidpham87 opened this issue Oct 12, 2020 · 1 comment
Open

Question: JCuda integration #8

davidpham87 opened this issue Oct 12, 2020 · 1 comment

Comments

@davidpham87
Copy link

Hello,

Thanks a lot for the library.

I wondered if you think one could integrate JCuda (https://github.com/jcuda/jcuda-main) in your java API? From my understanding, the device variables should be interchangeable between ThrustRTC and JCuda?

For the context, I am interesting to use ThurstRTC Java API from Clojure.

Best regards,
David

@fynv
Copy link
Owner

fynv commented Oct 15, 2020

Hi,
I've just added some new interfaces to the JAVA API:

  • long DVVector.native_pointer():
    You can use this to retrieve a native CUDA pointer from a DVVector object

  • class DVVectorAdaptor:
    You can use a native CUDA pointer from an external library to initialize a DVVectorAdaptor object, then use it similarity as a DVVector object.

Theoretically these 2 interfaces should enable the interoperation with jcuda. Basically, you get a native pointer from one library, then pass it to the other library to initialize an object in the 2nd library, by I haven't got a chance to try it yet.

Looks like getting a native pointer from jcuda is a little bit tricky:
https://stackoverflow.com/questions/31993759/how-can-i-create-a-struct-of-native-pointers-in-jcuda

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

2 participants