Package org.jocl

Examples of org.jocl.cl_program


      CL.clReleaseProgram(this.program);
      CL.clReleaseKernel(this.kernel);
    }

    // Create the program from the source code
    final cl_program program = CL.clCreateProgramWithSource(this.context,
        1, new String[] { this.cl }, null, null);

    if (options.size() > 0) {
      final StringBuilder builder = new StringBuilder();
      for (final Entry<String, String> obj : options.entrySet()) {
View Full Code Here


public class TowStepFilter extends CLBase
  cl_kernel kernel,kernel1;
  IImage2d img1,img2;
 
  public TowStepFilter(String file,String ker1,String ker2) throws IOException
    cl_program prog=Programs.createFromFile(context, file, "-cl-mad-enable");
    kernel=Kernels.create(prog,ker1);
    kernel1=Kernels.create(prog, ker2);
    Programs.release(prog);
  }
View Full Code Here

        memObjects[2] = clCreateBuffer(context,
            CL_MEM_READ_WRITE,
            Sizeof.cl_float * N, null, null);

        // Create the program from the source code
        cl_program program = clCreateProgramWithSource(context,
            1, new String[] {programSource} , null, null);

        // Build the program
        clBuildProgram(program, 0, null, null, null, null);
        // Create the kernel
View Full Code Here

    cl_context context = clCreateContext(contextProps, 1, new cl_device_id[] { device_id },
        null, null, null);
    commandQueue = clCreateCommandQueue(context, device_id, 0, null);

    String kernelSource = processKernel();
    cl_program program = clCreateProgramWithSource(context, 1,
        new String[] {kernelSource}, null, null);
    clBuildProgram(program, 0, null, "-cl-mad-enable", null, null);
    kernel = clCreateKernel(program, "path_trace", null);
    sampleBuffer = clCreateBuffer(context, CL_MEM_READ_WRITE,
        3 * bufferWidth * bufferHeight * Sizeof.cl_float, null, null);
View Full Code Here

        // Program Setup
        String mandelbrotSource = readFile("Mandelbrot.cl");
        String juliaSource = readFile("Julia.cl");

        // Create the program
        cl_program mandelbrotProgram = clCreateProgramWithSource(
            context, 1, new String[] { mandelbrotSource }, null,
            null);
        cl_program juliaProgram = clCreateProgramWithSource(context, 1,
            new String[] { juliaSource }, null, null);

        // Build the program
        clBuildProgram(mandelbrotProgram, 0, null, "-cl-mad-enable",
            null, null);
View Full Code Here

TOP

Related Classes of org.jocl.cl_program

Copyright © 2018 www.massapicom. 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.