Examples of CLBufferBinding


Examples of com.jogamp.opencl.llb.CLBufferBinding

        if(isHostPointerFlag(flags)) {
            throw new IllegalArgumentException("no host pointer defined");
        }

        CLBufferBinding binding = context.getPlatform().getBufferBinding();
        int[] result = new int[1];
        long id = binding.clCreateBuffer(context.ID, flags, size, null, result, 0);
        checkForError(result[0], "can not create cl buffer");

        return new CLBuffer(context, size, id, flags);
    }
View Full Code Here

Examples of com.jogamp.opencl.llb.CLBufferBinding

        B host_ptr = null;
        if(isHostPointerFlag(flags)) {
            host_ptr = directBuffer;
        }

        CLBufferBinding binding = context.getPlatform().getBufferBinding();
        int[] result = new int[1];
        int size = Buffers.sizeOfBufferElem(directBuffer) * directBuffer.capacity();
        long id = binding.clCreateBuffer(context.ID, flags, size, host_ptr, result, 0);
        checkForError(result[0], "can not create cl buffer");
       
        return new CLBuffer<B>(context, directBuffer, size, id, flags);
    }
View Full Code Here

Examples of com.jogamp.opencl.llb.CLBufferBinding

        NativeSizeBuffer info = NativeSizeBuffer.allocateDirect(2);
        info.put(offset).put(size).rewind();
        int bitset = Mem.flagsToInt(flags);
       
        CLBufferBinding binding = getPlatform().getBufferBinding();
        int[] err = new int[1];
        long subID = binding.clCreateSubBuffer(ID, bitset, CL.CL_BUFFER_CREATE_TYPE_REGION, info.getBuffer(), err, 0);
        checkForError(err[0], "can not create sub buffer");

        CLSubBuffer<B> clSubBuffer = new CLSubBuffer<B>(this, offset, size, slice, subID, bitset);
        if(childs == null) {
            childs = new ArrayList<CLSubBuffer<B>>();
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.