Record Class CLImageDesc
java.lang.Object
java.lang.Record
club.doki7.opencl.datatype.CLImageDesc
- All Implemented Interfaces:
IPointer,ICLImageDesc
@ValueBasedCandidate
@UnsafeConstructor
public record CLImageDesc(@NotNull MemorySegment segment)
extends Record
implements ICLImageDesc
Represents a pointer to a cl_image_desc structure in native memory.
Structure
typedef struct cl_image_desc {
cl_mem_object_type imageType;
size_t imageWidth;
size_t imageHeight;
size_t imageDepth;
size_t imageArraySize;
size_t imageRowPitch;
size_t imageSlicePitch;
cl_uint numMipLevels;
cl_uint numSamples;
cl_image_desc_buffer_or_mem_object bufferOrMemObject;
} cl_image_desc;
Contracts
The property segment() should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to
LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java
null instead. See the documentation of IPointer.segment() for more details.
The constructor of this class is marked as UnsafeConstructor, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of cl_image_desc structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final UnionLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionCLImageDesc(@NotNull MemorySegment segment) Creates an instance of aCLImageDescrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CLImageDescstatic CLImageDesc.Ptr@NotNull CLImageDescBufferOrMemObjectbufferOrMemObject(@NotNull CLImageDescBufferOrMemObject value) bufferOrMemObject(Consumer<@NotNull CLImageDescBufferOrMemObject> consumer) static CLImageDescclone(Arena arena, CLImageDesc src) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longimageArraySize(long value) longimageDepth(long value) longimageHeight(long value) longimageRowPitch(long value) longimageSlicePitch(long value) intimageType(int value) longimageWidth(long value) intnumMipLevels(int value) intnumSamples(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$imageType
-
PATH$imageWidth
-
PATH$imageHeight
-
PATH$imageDepth
-
PATH$imageArraySize
-
PATH$imageRowPitch
-
PATH$imageSlicePitch
-
PATH$numMipLevels
-
PATH$numSamples
-
PATH$bufferOrMemObject
-
LAYOUT$imageType
-
LAYOUT$numMipLevels
-
LAYOUT$numSamples
-
LAYOUT$bufferOrMemObject
-
SIZE$imageType
public static final long SIZE$imageType -
SIZE$imageWidth
public static final long SIZE$imageWidth -
SIZE$imageHeight
public static final long SIZE$imageHeight -
SIZE$imageDepth
public static final long SIZE$imageDepth -
SIZE$imageArraySize
public static final long SIZE$imageArraySize -
SIZE$imageRowPitch
public static final long SIZE$imageRowPitch -
SIZE$imageSlicePitch
public static final long SIZE$imageSlicePitch -
SIZE$numMipLevels
public static final long SIZE$numMipLevels -
SIZE$numSamples
public static final long SIZE$numSamples -
SIZE$bufferOrMemObject
public static final long SIZE$bufferOrMemObject -
OFFSET$imageType
public static final long OFFSET$imageType -
OFFSET$imageWidth
public static final long OFFSET$imageWidth -
OFFSET$imageHeight
public static final long OFFSET$imageHeight -
OFFSET$imageDepth
public static final long OFFSET$imageDepth -
OFFSET$imageArraySize
public static final long OFFSET$imageArraySize -
OFFSET$imageRowPitch
public static final long OFFSET$imageRowPitch -
OFFSET$imageSlicePitch
public static final long OFFSET$imageSlicePitch -
OFFSET$numMipLevels
public static final long OFFSET$numMipLevels -
OFFSET$numSamples
public static final long OFFSET$numSamples -
OFFSET$bufferOrMemObject
public static final long OFFSET$bufferOrMemObject
-
-
Constructor Details
-
CLImageDesc
Creates an instance of aCLImageDescrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
imageType
-
imageType
-
imageWidth
-
imageWidth
-
imageHeight
-
imageHeight
-
imageDepth
-
imageDepth
-
imageArraySize
-
imageArraySize
-
imageRowPitch
-
imageRowPitch
-
imageSlicePitch
-
imageSlicePitch
-
numMipLevels
-
numMipLevels
-
numSamples
-
numSamples
-
bufferOrMemObject
-
bufferOrMemObject
-
bufferOrMemObject
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-