I want to compile and run my jcuda codes in an IDE (Netbeans) on ubuntu 16.04. I've already installed Netbeans, Maven, java and cuda 8.0.
For example, I want to run sample of vector add that the java file is JCudaVectorAdd.java and the cuda kernel is JCudaVectorAddKernel.cu. How can I compile and run this simple example using Netbeans?
You can create a maven project and add dependencies to the pom.xml file of the project:
then add the
JCudaVectorAdd.javato the project and give the address ofJCudaVectorAddKernel.cufile in the java file:now you can build your project successfully.