Click here to Skip to main content
13,199,669 members (67,498 online)
Click here to Skip to main content

Stats

62K views
643 downloads
25 bookmarked
Posted 23 Dec 2012

GPU Computing Using CUDA, Eclipse, and Java with JCuda

, 21 Sep 2013
Tutorial: GPU computing with JCuda and Nsight (Eclipse)
CodeProjectMBishop_12_22_2012
JCudaFftDemo
bin
CaxpyGpu.class
ComplexCalcFloat.class
ComplexFloat.class
FftCpuFloat.class
FftGpuFloat.class
Main.class
Stopwatch.class
src
Notes
From Eclipse you make a runnable jar from

From Project Explorer > Export > Java > Runnable Jar file > Next

Set the launch configuration, pick a destination, and extract the libraries into the jar.
Click finish, acknowledge your actions with reguard to licenses, address errors, and review warnings.

To run a jar that uses native libraries, you can point to the native binary folder with the -DJava.library.path switch when you run the jar. 

Syntax java -Djava.library.path=<the exact path to the native library> -jar your.jar

For example, I have an executable jar with filespec: '/home/max/CodeProjectMBishop/javaFFT.jar'

It uses native libraries located in the folder: '/home/max/Cuda/JCuda-All-0.5.0-bin-linux-x86_32 -jar'

I run:


java -Djava.library.path=/home/max/Cuda/JCuda-All-0.5.0-bin-linux-x86_32 -jar '/home/max/CodeProjectMBishop/javaFFT.jar'

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mark H Bishop
Founder PEI Watershed Alliance, Inc.
United States United States
I am an analytical chemist and an educator. I program primarily to perform matrix computations for regression analysis, process signals, acquire data from sensors, and to control devices.

I participate in many open source development communities and Linux user forums. I occasionally perform IT contract work, primarily focused on network design/deployment and penetration testing for small organizations.

I am a member of several community-interest groups such as the Prince Edward Island Watershed Alliance, the Lot 11 and Area Watershed Management Group, and the Petersham Historic Commission.

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171020.1 | Last Updated 21 Sep 2013
Article Copyright 2012 by Mark H Bishop
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid