Created
February 6, 2011 18:43
-
-
Save ochafik/813594 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tutorial; | |
import com.nativelibs4java.opencl.*; | |
import java.io.IOException; | |
/// Auto-generated wrapper around the OpenCL program DiscreteFourierTransformProgram.cl | |
public class DiscreteFourierTransformProgram extends CLAbstractUserProgram { | |
public DiscreteFourierTransformProgram(CLContext context) throws IOException { | |
super(context, readRawSourceForClass(DiscreteFourierTransformProgram.class)); | |
} | |
public DiscreteFourierTransformProgram(CLProgram program) throws IOException { | |
super(program, readRawSourceForClass(DiscreteFourierTransformProgram.class)); | |
} | |
CLKernel dft_kernel; | |
public synchronized CLEvent dft(CLQueue commandQueue, CLDoubleBuffer in, CLDoubleBuffer out, int length, int sign, int globalWorkSizes[], int localWorkSizes[], CLEvent... eventsToWaitFor) throws CLBuildException { | |
if (dft_kernel == null) | |
dft_kernel = createKernel("dft"); | |
dft_kernel.setArgs(in, out, length, sign); | |
return dft_kernel.enqueueNDRange(commandQueue, globalWorkSizes, localWorkSizes, eventsToWaitFor); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment