Package org.jocl

Examples of org.jocl.cl_context


        cl_device_id[] devices = new cl_device_id[numDevices];
        clGetDeviceIDs(platform, deviceType, numDevices, devices, null);
        cl_device_id device = devices[deviceIndex];

        // Create a context for the selected device
        cl_context context = clCreateContext(
            contextProperties, 1, new cl_device_id[]{device},
            null, null, null);

        // Create a command-queue for the selected device
        cl_command_queue commandQueue =
View Full Code Here


  public void setupOpenCL(cl_platform_id platform_id, cl_device_id device_id,
      World world, Collection<ChunkPosition> chunks) {
    cl_context_properties contextProps = new cl_context_properties();
    contextProps.addProperty(CL_CONTEXT_PLATFORM, platform_id);

    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,
View Full Code Here

      public void run() {

        int[] mandelbrotColorMap;
        int[] juliaColorMap;

        cl_context context;
        JFrame frame = new JFrame("Concurrent Systems - Assignment 2");
        calculateGridLayout(frame, n);

        juliaColorMap = initColorMap(512, Color.PINK, Color.BLACK, Color.BLUE, Color.GREEN); // awesome color palate!
        mandelbrotColorMap = initColorMap(32, Color.BLACK, Color.GREEN, Color.BLUE, Color.PINK, Color.WHITE);
View Full Code Here

TOP

Related Classes of org.jocl.cl_context

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.