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 record
Represents a pointer to / an array of cl_image_desc structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final UnionLayout
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionCLImageDesc
(@NotNull MemorySegment segment) Creates an instance of aCLImageDesc
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CLImageDesc
static CLImageDesc.Ptr
@NotNull CLImageDescBufferOrMemObject
bufferOrMemObject
(@NotNull CLImageDescBufferOrMemObject value) bufferOrMemObject
(Consumer<@NotNull CLImageDescBufferOrMemObject> consumer) static CLImageDesc
clone
(Arena arena, CLImageDesc src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
imageArraySize
(long value) long
imageDepth
(long value) long
imageHeight
(long value) long
imageRowPitch
(long value) long
imageSlicePitch
(long value) int
imageType
(int value) long
imageWidth
(long value) int
numMipLevels
(int value) int
numSamples
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
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 aCLImageDesc
record class.- Parameters:
segment
- the value for thesegment
record 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 thesegment
record component.
-