Class CLBuffer<B extends Buffer>

    • Constructor Detail

      • CLBuffer

        protected CLBuffer​(CLContext context,
                           long size,
                           long id,
                           int flags)
      • CLBuffer

        protected CLBuffer​(CLContext context,
                           B directBuffer,
                           long size,
                           long id,
                           int flags)
    • Method Detail

      • createSubBuffer

        public CLSubBuffer<B> createSubBuffer​(int offset,
                                              int size,
                                              CLMemory.Mem... flags)
        Creates a sub buffer with the specified region from this buffer. If this buffer contains a NIO buffer, the sub buffer will also contain a slice matching the specified region of the parent buffer. The region is specified by the offset and size in buffer elements or bytes if this buffer does not contain any NIO buffer.
        Parameters:
        offset - The offset in buffer elements.
        size - The size in buffer elements.
      • getSubBuffers

        public List<CLSubBuffer<B>> getSubBuffers()
        Returns the list of subbuffers.
      • isSubBuffer

        public boolean isSubBuffer()
        Returns true if this is a sub buffer.
      • cloneWith

        public <T extends BufferCLBuffer<T> cloneWith​(T directBuffer)
        Description copied from class: CLMemory
        Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer.
        Specified by:
        cloneWith in class CLMemory<B extends Buffer>
      • close

        @Deprecated
        public final void close()
        Deprecated.
        This method is not intended to be called from client code.
        Implementation detail, satisfying AutoCloseable. Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface AutoCloseable
        See Also:
        AutoCloseable