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:
  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$imageType

      public static final MemoryLayout.PathElement PATH$imageType
    • PATH$imageWidth

      public static final MemoryLayout.PathElement PATH$imageWidth
    • PATH$imageHeight

      public static final MemoryLayout.PathElement PATH$imageHeight
    • PATH$imageDepth

      public static final MemoryLayout.PathElement PATH$imageDepth
    • PATH$imageArraySize

      public static final MemoryLayout.PathElement PATH$imageArraySize
    • PATH$imageRowPitch

      public static final MemoryLayout.PathElement PATH$imageRowPitch
    • PATH$imageSlicePitch

      public static final MemoryLayout.PathElement PATH$imageSlicePitch
    • PATH$numMipLevels

      public static final MemoryLayout.PathElement PATH$numMipLevels
    • PATH$numSamples

      public static final MemoryLayout.PathElement PATH$numSamples
    • PATH$bufferOrMemObject

      public static final MemoryLayout.PathElement PATH$bufferOrMemObject
    • LAYOUT$imageType

      public static final ValueLayout.OfInt LAYOUT$imageType
    • LAYOUT$numMipLevels

      public static final ValueLayout.OfInt LAYOUT$numMipLevels
    • LAYOUT$numSamples

      public static final ValueLayout.OfInt LAYOUT$numSamples
    • LAYOUT$bufferOrMemObject

      public static final UnionLayout 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

      public CLImageDesc(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a CLImageDesc record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details