Examples of clGetDeviceInfo()


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

    private LongBuffer getInfoLongs(int flag) {

        CL cl = CLPlatform.getLowLevelCLInterface();

        NativeSizeBuffer nsb = NativeSizeBuffer.allocateDirect(1);
        int ret = cl.clGetDeviceInfo(ID, flag, 0, null, nsb);
        CLException.checkForError(ret, "clGetDeviceInfo failed");

        LongBuffer types = Buffers.newDirectByteBuffer((int)nsb.get(0)).asLongBuffer();
        ret = cl.clGetDeviceInfo(ID, flag, types.capacity()*Buffers.SIZEOF_LONG, types, null);
        CLException.checkForError(ret, "clGetDeviceInfo failed");
View Full Code Here

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

        NativeSizeBuffer nsb = NativeSizeBuffer.allocateDirect(1);
        int ret = cl.clGetDeviceInfo(ID, flag, 0, null, nsb);
        CLException.checkForError(ret, "clGetDeviceInfo failed");

        LongBuffer types = Buffers.newDirectByteBuffer((int)nsb.get(0)).asLongBuffer();
        ret = cl.clGetDeviceInfo(ID, flag, types.capacity()*Buffers.SIZEOF_LONG, types, null);
        CLException.checkForError(ret, "clGetDeviceInfo failed");

        return types;
    }

View Full Code Here

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

    private LongBuffer getInfoLongs(int flag) {

        CL cl = CLPlatform.getLowLevelCLInterface();

        NativeSizeBuffer nsb = NativeSizeBuffer.allocateDirect(1);
        int ret = cl.clGetDeviceInfo(ID, flag, 0, null, nsb);
        CLException.checkForError(ret, "clGetDeviceInfo failed");

        LongBuffer types = Buffers.newDirectByteBuffer((int)nsb.get(0)).asLongBuffer();
        ret = cl.clGetDeviceInfo(ID, flag, types.capacity()*Buffers.SIZEOF_LONG, types, null);
        CLException.checkForError(ret, "clGetDeviceInfo failed");
View Full Code Here

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

        NativeSizeBuffer nsb = NativeSizeBuffer.allocateDirect(1);
        int ret = cl.clGetDeviceInfo(ID, flag, 0, null, nsb);
        CLException.checkForError(ret, "clGetDeviceInfo failed");

        LongBuffer types = Buffers.newDirectByteBuffer((int)nsb.get(0)).asLongBuffer();
        ret = cl.clGetDeviceInfo(ID, flag, types.capacity()*Buffers.SIZEOF_LONG, types, null);
        CLException.checkForError(ret, "clGetDeviceInfo failed");

        return types;
    }

View Full Code Here

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

            ret = cl.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, devices.capacity(), devices, null);

            //print device info
            for (int j = 0; j < devices.capacity(); j++) {
                long device = devices.get(j);
                ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_NAME, bb.capacity(), bb, longBuffer);
                checkForError(ret);
                out.println("    device: " + clString2JavaString(bb, (int)longBuffer.get(0)));

                ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_TYPE, bb.capacity(), bb, longBuffer);
                checkForError(ret);
View Full Code Here

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

                long device = devices.get(j);
                ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_NAME, bb.capacity(), bb, longBuffer);
                checkForError(ret);
                out.println("    device: " + clString2JavaString(bb, (int)longBuffer.get(0)));

                ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_TYPE, bb.capacity(), bb, longBuffer);
                checkForError(ret);
                out.println("    type: " + CLDevice.Type.valueOf(bb.get()));
                bb.rewind();

            }
View Full Code Here

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

        int offset = new Random().nextInt(deviceCount);
        out.println("using device# " + offset);
        offset *= (is32Bit() ? 4 : 8);
        long device = is32Bit()?bb.getInt(offset):bb.getLong(offset);
       
        ret = cl.clGetDeviceInfo(device, CL.CL_DEVICE_MAX_WORK_GROUP_SIZE, bb.capacity(), bb, null);
        checkError("on clGetDeviceInfo", ret);
        int maxWGS = bb.getInt();
        out.println("max WGS: " + maxWGS);

        // Create a command-queue
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.