java.lang.Object
api.Native
au.notzed.zcl.CLObject
au.notzed.zcl.CLMemory
au.notzed.zcl.CLImage<T>
- Type Parameters:
T
- Not used, yet?
public class CLImage<T> extends CLMemory
Interface for cl_image.
-
Field Summary
Fields Modifier and Type Field Description static long[]
ORIGIN
Origin of (0,0,0) for read/write. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description long
getArraySize()
CLBuffer
getBuffer()
long
getDepth()
long
getElementSize()
CLImageFormat
getFormat()
long
getHeight()
int
getNumMipLevels()
int
getNumSamples()
long
getRowPitch()
long
getSlicePitch()
long
getWidth()
CLTask
ofRead(byte[] target)
Read whole image.CLTask
ofRead(float[] target)
CLTask
ofRead(int index, byte[] target)
Read operation from a single whole 2D image within a 2D image array.CLTask
ofRead(int index, float[] target)
CLTask
ofRead(java.nio.ByteBuffer target, boolean blocking)
Read whole image into a direct byte buffer.CLTask
ofRead(java.nio.ByteBuffer target, boolean blocking, int row_pitch)
Read whole 2D image into a direct byte buffer.CLTask
ofWrite(byte[] source)
CLTask
ofWrite(float[] source)
CLTask
ofWrite(int index, byte[] source)
Write operation to a single whole 2D image within a 2D image array.CLTask
ofWrite(java.nio.ByteBuffer source, boolean blocking)
CLTask
ofWrite(java.nio.ByteBuffer source, boolean blocking, int row_pitch)
Write 2D image.static long[]
ORIGIN(long x, long y)
long[]
region()
Whole region of this image { width, height, depth }long[]
region(long width, long height)
2D region of this image { width, height, 1 }java.lang.String
toString()
Methods inherited from class au.notzed.zcl.CLMemory
alloc, alloc, alloc, alloc, alloc, create, getAssociatedMemObject, getContext, getFlags, getHostPtr, getMemOffset, getSize, getType, release, setMemObjectDestructorCallback, toFloat, toFloat, toFloat, toHalf, toHalf, toHalf
Methods inherited from class au.notzed.zcl.CLObject
getInfo, getInfo, getInfo, getInfoAny, getInfoAny, getInfoAny, getInfoAny, getInfoAnyV, getInfoByteV, getInfoByteV, getInfoInt, getInfoInt, getInfoInt, getInfoInt, getInfoJava, getInfoLong, getInfoLong, getInfoLong, getInfoLong, getInfoLongV, getInfoLongV, getInfoPropertyV, getInfoSizeT, getInfoSizeT, getInfoSizeT, getInfoSizeTA, getInfoString, getInfoString, getInfoString, getInfoString, release, release
Methods inherited from class api.Native
addr, addr, addr, debugDumpReachable, debugFlushAll, downcallHandle, downcallHandle, dumpSignature, freeUpcallStub, getAddr, getAddr, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, loadLibraries, parseStruct, parseUnion, release, release, resolve, setAddr, setAddr, setByte, setByte, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setShort, setShort, toAddrV, toAddrV, toAddrV, toByteV, toByteV, toLongV, toLongV, toObjectV, toObjectV, toString, upcallStub
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
ORIGIN
public static final long[] ORIGINOrigin 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
-
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
-
getNumMipLevels
public int getNumMipLevels() -
getNumSamples
public int getNumSamples() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.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
Read whole image.- Parameters:
target
-- Returns:
-
ofRead
-
ofWrite
-
ofWrite
-
ofRead
Read operation from a single whole 2D image within a 2D image array.- Parameters:
index
- Which image to read.target
-- Returns:
-
ofRead
-
ofWrite
Write operation to a single whole 2D image within a 2D image array.- Parameters:
index
- Which image to read.source
-- Returns:
-
ofRead
Read whole image into a direct byte buffer.- Parameters:
target
- Target memory. position() and capacity() are ignored?blocking
-- Returns:
-
ofRead
Read whole 2D image into a direct byte buffer.- Parameters:
target
-blocking
-row_pitch
- Row pitch in bytes.- Returns:
-
ofWrite
-
ofWrite
Write 2D image.- Parameters:
source
-blocking
-row_pitch
- Row pitch in bytes.- Returns:
-