Module notzed.zcl
Package au.notzed.zcl

Class CLImage<T>

java.lang.Object
Type Parameters:
T - Not used, yet?

public class CLImage<T>
extends CLMemory
Interface for cl_image.
  • Field Details

    • ORIGIN

      public static final long[] ORIGIN
      Origin of (0,0,0) for read/write.
  • Constructor Details

    • CLImage

      public CLImage​(jdk.incubator.foreign.MemoryAddress p)
    • CLImage

      public CLImage​(jdk.incubator.foreign.MemoryAddress p, jdk.incubator.foreign.MemorySegment seg)
  • Method Details

    • getFormat

      public CLImageFormat getFormat()
    • getElementSize

      public long getElementSize()
    • getRowPitch

      public long getRowPitch()
    • getSlicePitch

      public long getSlicePitch()
    • getWidth

      public long getWidth()
    • getHeight

      public long getHeight()
    • getDepth

      public long getDepth()
    • getArraySize

      public long getArraySize()
    • getBuffer

      public CLBuffer getBuffer()
    • getNumMipLevels

      public int getNumMipLevels()
    • getNumSamples

      public int getNumSamples()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • ORIGIN

      public static long[] ORIGIN​(long x, long y)
    • region

      public long[] region()
      Whole region of this image { width, height, depth }
      Returns:
    • region

      public long[] region​(long width, long height)
      2D region of this image { width, height, 1 }
      Parameters:
      width -
      height -
      Returns:
    • ofRead

      public CLTask ofRead​(byte[] target)
      Read whole image.
      Parameters:
      target -
      Returns:
    • ofRead

      public CLTask ofRead​(float[] target)
    • ofWrite

      public CLTask ofWrite​(byte[] source)
    • ofWrite

      public CLTask ofWrite​(float[] source)
    • ofRead

      public CLTask ofRead​(int index, byte[] target)
      Read operation from a single whole 2D image within a 2D image array.
      Parameters:
      index - Which image to read.
      target -
      Returns:
    • ofRead

      public CLTask ofRead​(int index, float[] target)
    • ofWrite

      public CLTask ofWrite​(int index, byte[] source)
      Write operation to a single whole 2D image within a 2D image array.
      Parameters:
      index - Which image to read.
      source -
      Returns:
    • ofRead

      public CLTask ofRead​(java.nio.ByteBuffer target, boolean blocking)
      Read whole image into a direct byte buffer.
      Parameters:
      target - Target memory. position() and capacity() are ignored?
      blocking -
      Returns:
    • ofRead

      public CLTask ofRead​(java.nio.ByteBuffer target, boolean blocking, int row_pitch)
      Read whole 2D image into a direct byte buffer.
      Parameters:
      target -
      blocking -
      row_pitch - Row pitch in bytes.
      Returns:
    • ofWrite

      public CLTask ofWrite​(java.nio.ByteBuffer source, boolean blocking)
    • ofWrite

      public CLTask ofWrite​(java.nio.ByteBuffer source, boolean blocking, int row_pitch)
      Write 2D image.
      Parameters:
      source -
      blocking -
      row_pitch - Row pitch in bytes.
      Returns: