Examples of CLQueue


Examples of com.nativelibs4java.opencl.CLQueue

public class SimpleTest {
  public static void main(String[] args) {
    System.out.println("Start");
    CLContext context = JavaCL.createBestContext();
    CLQueue queue = context.createDefaultQueue();

    float[] A = { 1.0f, 2.0f, 3.0f, 4.0f };
    float[] B = { 5.0f, 6.0f, 7.0f, 8.0f };
       
    String myKernelSource = ResourceInputStream.readResourceAsString("org/encog/plugins/opencl/kernels/simple.cl");
View Full Code Here

Examples of com.nativelibs4java.opencl.CLQueue

     // (try using DeviceFeature.GPU, DeviceFeature.CPU...)
        CLContext context = JavaCL.createBestContext(DeviceFeature.DoubleSupport);
       
        // Create a command queue, if possible able to execute multiple jobs in parallel
        // (out-of-order queues will still respect the CLEvent chaining)
        CLQueue queue = context.createDefaultOutOfOrderQueueIfPossible();

        DFT dft = new DFT(queue);
        //DFT2 dft = new DFT2(queue);

        // Create some fake test data :
View Full Code Here

Examples of com.nativelibs4java.opencl.CLQueue

        //leitura dos dados de entrada
        double[][] entradas = FuncoesCPU.lerArquivoEntradas(Param.nomeArquivo);

        //configuracao do opencl via JavaCL
        CLContext context = JavaCL.createBestContext();
        CLQueue queue = context.createDefaultQueue();
        ByteOrder byteOrder = context.getByteOrder();

        ArrayList<CLBuffer<Double>> clBufferEntradas = new ArrayList<CLBuffer<Double>>(entradas.length);
        for (int i = 0; i < entradas.length; i++) {
            DoubleBuffer dBufferEntrada = NIOUtils.directDoubles(entradas[i].length, byteOrder);
View Full Code Here

Examples of com.nativelibs4java.opencl.CLQueue

        System.out.println("");
       
        int dataSize = v1.length;
       
        CLContext context = JavaCL.createBestContext();
        CLQueue queue = context.createDefaultQueue();
        ByteOrder byteOrder = context.getByteOrder();
       
       
        DoubleBuffer v1_b = NIOUtils.directDoubles(dataSize, byteOrder);
        DoubleBuffer v2_b = NIOUtils.directDoubles(v2.length, byteOrder);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.