Examples of clCreateContext()


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

        out.println("#devices: "+intBuffer.get(0));

        NativeSizeBuffer devices = NativeSizeBuffer.allocateDirect(intBuffer.get(0));
        ret = cl.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, devices.capacity(), devices, null);

        long context = cl.clCreateContext(null, devices, null, intBuffer);
        checkError("on clCreateContext", intBuffer.get());

        //get number of devices
        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.clCreateContext()

                }
                pb.put(i, device.ID);
            }
        }
        CLContextBinding cl = platform.getContextBinding();
        long context = cl.clCreateContext(properties, pb, 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.