Click here to Skip to main content
11,438,007 members (44,287 online)
Click here to Skip to main content
Add your own
alternative version

GPU Computing Using CUDA, Eclipse, and Java with JCuda

, 21 Sep 2013 CPOL
Tutorial: GPU computing with JCuda and Nsight (Eclipse)
codeprojectmbishop_12_22_2012.zip
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
President PEI Watershed Alliance, Inc.
United States United States
I am a scientist and not a professional programmer. I program primarily to perform matrix computations for regression analysis, process signals, acquire data from sensors, and to control devices.

I have a personal web page at www.mark-bishop.net

I am the Chairperson and one of the primary founders of the Prince Edward Island Watershed Alliance, Inc.: http://peiwatershedalliance.org/web/

I participate in many open source development communities and Linux user forums.
Follow on   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150506.1 | Last Updated 21 Sep 2013
Article Copyright 2012 by Mark H Bishop
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid