Examples of clCreateContextFromType()


Examples of com.jogamp.opencl.llb.CL.clCreateContextFromType()

        long platform = pb.get(0);
        NativeSizeBuffer properties = NativeSizeBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM)
                                              .put(platform).put(0) // 0 terminated array
                                              .rewind();
        long context = cl.clCreateContextFromType(properties, CL.CL_DEVICE_TYPE_ALL, null, null);
        out.println("context handle: "+context);
        checkError("on clCreateContextFromType", ret);

        NativeSizeBuffer longBuffer = NativeSizeBuffer.allocateDirect(1);
        ret = cl.clGetContextInfo(context, CL.CL_CONTEXT_DEVICES, 0, null, longBuffer);
View Full Code Here

Examples of com.jogamp.opencl.llb.CLContextBinding.clCreateContextFromType()

    protected static long createContextFromType(CLPlatform platform, CLErrorHandler handler, NativeSizeBuffer properties, long deviceType) {

        IntBuffer status = newDirectIntBuffer(1);
        CLContextBinding cl = platform.getContextBinding();
        long context = cl.clCreateContextFromType(properties, deviceType, handler, status);

        checkForError(status.get(), "can not create CL context");

        return context;
    }
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.