Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.nativelibs4java.opencl.demos.particles;
/// Wrapper around the OpenCL program ParticlesDemoProgram
public class ParticlesDemoProgram extends CLAbstractUserProgram {
	public ParticlesDemoProgram(CLContext contextthrows IOException {
	}
	public ParticlesDemoProgram(CLProgram programthrows IOException {
	}
	public synchronized CLEvent updateParticle(CLQueue commandQueueCLBuffer<Float > massesCLBuffer<Float > velocitiesCLBuffer<Float > particlesfloat mousePos[], float dimensions[], float massFactorfloat speedFactorfloat slowDownFactorfloat mouseWeightbyte limitToScreenint globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitForthrows CLBuildException {
		if ( == null
			 = createKernel("updateParticle");
		checkArrayLength(mousePos, 2, "mousePos");
		checkArrayLength(dimensions, 2, "dimensions");
		.setArgs(massesvelocitiesparticlesmousePosdimensionsmassFactorspeedFactorslowDownFactormouseWeightlimitToScreen);
		return .enqueueNDRange(commandQueueglobalWorkSizeslocalWorkSizeseventsToWaitFor);
	}
	/// <i>native declaration : com/nativelibs4java/opencl/demos/particles/ParticlesDemoProgram.c</i>
	public static final float PI = (float)3.141f;
	/// <i>native declaration : com/nativelibs4java/opencl/demos/particles/ParticlesDemoProgram.c</i>
	public static final float CENTER_FORCE2 = (float)0.0005f;
	/// <i>native declaration : com/nativelibs4java/opencl/demos/particles/ParticlesDemoProgram.c</i>
	public static final float REPULSION_FORCE = (float)4.0f;
New to GrepCode? Check out our FAQ X