Click here to Skip to main content
15,893,994 members
Articles / Programming Languages / CUDA

GPU Computing Using CUDA, Eclipse, and Java with JCuda

Rate me:
Please Sign up or sign in to vote.
4.71/5 (8 votes)
21 Sep 2013CPOL18 min read 103.1K   805   25  
Tutorial: GPU computing with JCuda and Nsight (Eclipse)
/**
 * 
 * Credit: http://introcs.cs.princeton.edu/java/32class/Stopwatch.java.html
 * 
 */

public class Stopwatch {
	private final long start;

	public Stopwatch() {
		start = System.currentTimeMillis();
	}

	// return time (in seconds) since this object was created
	public double elapsedTime() {
		long now = System.currentTimeMillis();
		return (now - start) / 1000.0;
	}
}

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)


Written By
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 do contract work for an environmental analytical laboratory, where I am primarily focused on LIMS programming and network administration.

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.

Comments and Discussions