com.nativelibs4java.opencl.util.fft.DoubleDFT Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacl-jna Show documentation
Show all versions of javacl-jna Show documentation
JavaCL is an Object-Oriented API that makes the C OpenCL API available to Java in a very natural way.
It hides away the complexity of cross-platform C bindings, has a clean OO design (with generics, Java enums, NIO buffers, fully typed exceptions...), provides high-level features (OpenGL-interop, array reductions) and comes with samples and demos.
For more info, please visit http://code.google.com/p/nativelibs4java/wiki/OpenCL.
package com.nativelibs4java.opencl.util.fft;
import com.nativelibs4java.opencl.*;
import com.nativelibs4java.opencl.CLPlatform.DeviceFeature;
import java.io.IOException;
import java.nio.DoubleBuffer;
public class DoubleDFT extends AbstractDFT {
final DoubleDFTProgram program;
public DoubleDFT(CLContext context) throws IOException {
super(context, Double.class);
this.program = new DoubleDFTProgram(context);
}
public DoubleDFT() throws IOException {
this(JavaCL.createBestContext(DeviceFeature.DoubleSupport));
}
@Override
protected CLEvent dft(CLQueue queue, CLBuffer inBuf, CLBuffer outBuf, int length, int sign, int[] dims, CLEvent... events) throws CLException {
return program.dft(queue, inBuf, outBuf, length, sign, dims, null, events);
}
@Override
public double[] transform(CLQueue queue, double[] input, boolean inverse) {
return super.transform(queue, input, inverse);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy