Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.littlekt.wgpu.WGPULimits Maven / Gradle / Ivy
// Generated by jextract
package com.littlekt.wgpu;
import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;
/**
* {@snippet lang=c :
* struct WGPULimits {
* uint32_t maxTextureDimension1D;
* uint32_t maxTextureDimension2D;
* uint32_t maxTextureDimension3D;
* uint32_t maxTextureArrayLayers;
* uint32_t maxBindGroups;
* uint32_t maxBindGroupsPlusVertexBuffers;
* uint32_t maxBindingsPerBindGroup;
* uint32_t maxDynamicUniformBuffersPerPipelineLayout;
* uint32_t maxDynamicStorageBuffersPerPipelineLayout;
* uint32_t maxSampledTexturesPerShaderStage;
* uint32_t maxSamplersPerShaderStage;
* uint32_t maxStorageBuffersPerShaderStage;
* uint32_t maxStorageTexturesPerShaderStage;
* uint32_t maxUniformBuffersPerShaderStage;
* uint64_t maxUniformBufferBindingSize;
* uint64_t maxStorageBufferBindingSize;
* uint32_t minUniformBufferOffsetAlignment;
* uint32_t minStorageBufferOffsetAlignment;
* uint32_t maxVertexBuffers;
* uint64_t maxBufferSize;
* uint32_t maxVertexAttributes;
* uint32_t maxVertexBufferArrayStride;
* uint32_t maxInterStageShaderComponents;
* uint32_t maxInterStageShaderVariables;
* uint32_t maxColorAttachments;
* uint32_t maxColorAttachmentBytesPerSample;
* uint32_t maxComputeWorkgroupStorageSize;
* uint32_t maxComputeInvocationsPerWorkgroup;
* uint32_t maxComputeWorkgroupSizeX;
* uint32_t maxComputeWorkgroupSizeY;
* uint32_t maxComputeWorkgroupSizeZ;
* uint32_t maxComputeWorkgroupsPerDimension;
* }
* }
*/
public class WGPULimits {
WGPULimits() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
WGPU.C_INT.withName("maxTextureDimension1D"),
WGPU.C_INT.withName("maxTextureDimension2D"),
WGPU.C_INT.withName("maxTextureDimension3D"),
WGPU.C_INT.withName("maxTextureArrayLayers"),
WGPU.C_INT.withName("maxBindGroups"),
WGPU.C_INT.withName("maxBindGroupsPlusVertexBuffers"),
WGPU.C_INT.withName("maxBindingsPerBindGroup"),
WGPU.C_INT.withName("maxDynamicUniformBuffersPerPipelineLayout"),
WGPU.C_INT.withName("maxDynamicStorageBuffersPerPipelineLayout"),
WGPU.C_INT.withName("maxSampledTexturesPerShaderStage"),
WGPU.C_INT.withName("maxSamplersPerShaderStage"),
WGPU.C_INT.withName("maxStorageBuffersPerShaderStage"),
WGPU.C_INT.withName("maxStorageTexturesPerShaderStage"),
WGPU.C_INT.withName("maxUniformBuffersPerShaderStage"),
WGPU.C_LONG_LONG.withName("maxUniformBufferBindingSize"),
WGPU.C_LONG_LONG.withName("maxStorageBufferBindingSize"),
WGPU.C_INT.withName("minUniformBufferOffsetAlignment"),
WGPU.C_INT.withName("minStorageBufferOffsetAlignment"),
WGPU.C_INT.withName("maxVertexBuffers"),
MemoryLayout.paddingLayout(4),
WGPU.C_LONG_LONG.withName("maxBufferSize"),
WGPU.C_INT.withName("maxVertexAttributes"),
WGPU.C_INT.withName("maxVertexBufferArrayStride"),
WGPU.C_INT.withName("maxInterStageShaderComponents"),
WGPU.C_INT.withName("maxInterStageShaderVariables"),
WGPU.C_INT.withName("maxColorAttachments"),
WGPU.C_INT.withName("maxColorAttachmentBytesPerSample"),
WGPU.C_INT.withName("maxComputeWorkgroupStorageSize"),
WGPU.C_INT.withName("maxComputeInvocationsPerWorkgroup"),
WGPU.C_INT.withName("maxComputeWorkgroupSizeX"),
WGPU.C_INT.withName("maxComputeWorkgroupSizeY"),
WGPU.C_INT.withName("maxComputeWorkgroupSizeZ"),
WGPU.C_INT.withName("maxComputeWorkgroupsPerDimension")
).withName("WGPULimits");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt maxTextureDimension1D$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxTextureDimension1D"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension1D
* }
*/
public static final OfInt maxTextureDimension1D$layout() {
return maxTextureDimension1D$LAYOUT;
}
private static final long maxTextureDimension1D$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension1D
* }
*/
public static final long maxTextureDimension1D$offset() {
return maxTextureDimension1D$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension1D
* }
*/
public static int maxTextureDimension1D(MemorySegment struct) {
return struct.get(maxTextureDimension1D$LAYOUT, maxTextureDimension1D$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension1D
* }
*/
public static void maxTextureDimension1D(MemorySegment struct, int fieldValue) {
struct.set(maxTextureDimension1D$LAYOUT, maxTextureDimension1D$OFFSET, fieldValue);
}
private static final OfInt maxTextureDimension2D$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxTextureDimension2D"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension2D
* }
*/
public static final OfInt maxTextureDimension2D$layout() {
return maxTextureDimension2D$LAYOUT;
}
private static final long maxTextureDimension2D$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension2D
* }
*/
public static final long maxTextureDimension2D$offset() {
return maxTextureDimension2D$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension2D
* }
*/
public static int maxTextureDimension2D(MemorySegment struct) {
return struct.get(maxTextureDimension2D$LAYOUT, maxTextureDimension2D$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension2D
* }
*/
public static void maxTextureDimension2D(MemorySegment struct, int fieldValue) {
struct.set(maxTextureDimension2D$LAYOUT, maxTextureDimension2D$OFFSET, fieldValue);
}
private static final OfInt maxTextureDimension3D$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxTextureDimension3D"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension3D
* }
*/
public static final OfInt maxTextureDimension3D$layout() {
return maxTextureDimension3D$LAYOUT;
}
private static final long maxTextureDimension3D$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension3D
* }
*/
public static final long maxTextureDimension3D$offset() {
return maxTextureDimension3D$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension3D
* }
*/
public static int maxTextureDimension3D(MemorySegment struct) {
return struct.get(maxTextureDimension3D$LAYOUT, maxTextureDimension3D$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxTextureDimension3D
* }
*/
public static void maxTextureDimension3D(MemorySegment struct, int fieldValue) {
struct.set(maxTextureDimension3D$LAYOUT, maxTextureDimension3D$OFFSET, fieldValue);
}
private static final OfInt maxTextureArrayLayers$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxTextureArrayLayers"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxTextureArrayLayers
* }
*/
public static final OfInt maxTextureArrayLayers$layout() {
return maxTextureArrayLayers$LAYOUT;
}
private static final long maxTextureArrayLayers$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxTextureArrayLayers
* }
*/
public static final long maxTextureArrayLayers$offset() {
return maxTextureArrayLayers$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxTextureArrayLayers
* }
*/
public static int maxTextureArrayLayers(MemorySegment struct) {
return struct.get(maxTextureArrayLayers$LAYOUT, maxTextureArrayLayers$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxTextureArrayLayers
* }
*/
public static void maxTextureArrayLayers(MemorySegment struct, int fieldValue) {
struct.set(maxTextureArrayLayers$LAYOUT, maxTextureArrayLayers$OFFSET, fieldValue);
}
private static final OfInt maxBindGroups$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxBindGroups"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxBindGroups
* }
*/
public static final OfInt maxBindGroups$layout() {
return maxBindGroups$LAYOUT;
}
private static final long maxBindGroups$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxBindGroups
* }
*/
public static final long maxBindGroups$offset() {
return maxBindGroups$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxBindGroups
* }
*/
public static int maxBindGroups(MemorySegment struct) {
return struct.get(maxBindGroups$LAYOUT, maxBindGroups$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxBindGroups
* }
*/
public static void maxBindGroups(MemorySegment struct, int fieldValue) {
struct.set(maxBindGroups$LAYOUT, maxBindGroups$OFFSET, fieldValue);
}
private static final OfInt maxBindGroupsPlusVertexBuffers$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxBindGroupsPlusVertexBuffers"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxBindGroupsPlusVertexBuffers
* }
*/
public static final OfInt maxBindGroupsPlusVertexBuffers$layout() {
return maxBindGroupsPlusVertexBuffers$LAYOUT;
}
private static final long maxBindGroupsPlusVertexBuffers$OFFSET = 20;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxBindGroupsPlusVertexBuffers
* }
*/
public static final long maxBindGroupsPlusVertexBuffers$offset() {
return maxBindGroupsPlusVertexBuffers$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxBindGroupsPlusVertexBuffers
* }
*/
public static int maxBindGroupsPlusVertexBuffers(MemorySegment struct) {
return struct.get(maxBindGroupsPlusVertexBuffers$LAYOUT, maxBindGroupsPlusVertexBuffers$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxBindGroupsPlusVertexBuffers
* }
*/
public static void maxBindGroupsPlusVertexBuffers(MemorySegment struct, int fieldValue) {
struct.set(maxBindGroupsPlusVertexBuffers$LAYOUT, maxBindGroupsPlusVertexBuffers$OFFSET, fieldValue);
}
private static final OfInt maxBindingsPerBindGroup$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxBindingsPerBindGroup"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxBindingsPerBindGroup
* }
*/
public static final OfInt maxBindingsPerBindGroup$layout() {
return maxBindingsPerBindGroup$LAYOUT;
}
private static final long maxBindingsPerBindGroup$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxBindingsPerBindGroup
* }
*/
public static final long maxBindingsPerBindGroup$offset() {
return maxBindingsPerBindGroup$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxBindingsPerBindGroup
* }
*/
public static int maxBindingsPerBindGroup(MemorySegment struct) {
return struct.get(maxBindingsPerBindGroup$LAYOUT, maxBindingsPerBindGroup$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxBindingsPerBindGroup
* }
*/
public static void maxBindingsPerBindGroup(MemorySegment struct, int fieldValue) {
struct.set(maxBindingsPerBindGroup$LAYOUT, maxBindingsPerBindGroup$OFFSET, fieldValue);
}
private static final OfInt maxDynamicUniformBuffersPerPipelineLayout$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxDynamicUniformBuffersPerPipelineLayout"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxDynamicUniformBuffersPerPipelineLayout
* }
*/
public static final OfInt maxDynamicUniformBuffersPerPipelineLayout$layout() {
return maxDynamicUniformBuffersPerPipelineLayout$LAYOUT;
}
private static final long maxDynamicUniformBuffersPerPipelineLayout$OFFSET = 28;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxDynamicUniformBuffersPerPipelineLayout
* }
*/
public static final long maxDynamicUniformBuffersPerPipelineLayout$offset() {
return maxDynamicUniformBuffersPerPipelineLayout$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxDynamicUniformBuffersPerPipelineLayout
* }
*/
public static int maxDynamicUniformBuffersPerPipelineLayout(MemorySegment struct) {
return struct.get(maxDynamicUniformBuffersPerPipelineLayout$LAYOUT, maxDynamicUniformBuffersPerPipelineLayout$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxDynamicUniformBuffersPerPipelineLayout
* }
*/
public static void maxDynamicUniformBuffersPerPipelineLayout(MemorySegment struct, int fieldValue) {
struct.set(maxDynamicUniformBuffersPerPipelineLayout$LAYOUT, maxDynamicUniformBuffersPerPipelineLayout$OFFSET, fieldValue);
}
private static final OfInt maxDynamicStorageBuffersPerPipelineLayout$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxDynamicStorageBuffersPerPipelineLayout"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxDynamicStorageBuffersPerPipelineLayout
* }
*/
public static final OfInt maxDynamicStorageBuffersPerPipelineLayout$layout() {
return maxDynamicStorageBuffersPerPipelineLayout$LAYOUT;
}
private static final long maxDynamicStorageBuffersPerPipelineLayout$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxDynamicStorageBuffersPerPipelineLayout
* }
*/
public static final long maxDynamicStorageBuffersPerPipelineLayout$offset() {
return maxDynamicStorageBuffersPerPipelineLayout$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxDynamicStorageBuffersPerPipelineLayout
* }
*/
public static int maxDynamicStorageBuffersPerPipelineLayout(MemorySegment struct) {
return struct.get(maxDynamicStorageBuffersPerPipelineLayout$LAYOUT, maxDynamicStorageBuffersPerPipelineLayout$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxDynamicStorageBuffersPerPipelineLayout
* }
*/
public static void maxDynamicStorageBuffersPerPipelineLayout(MemorySegment struct, int fieldValue) {
struct.set(maxDynamicStorageBuffersPerPipelineLayout$LAYOUT, maxDynamicStorageBuffersPerPipelineLayout$OFFSET, fieldValue);
}
private static final OfInt maxSampledTexturesPerShaderStage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxSampledTexturesPerShaderStage"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxSampledTexturesPerShaderStage
* }
*/
public static final OfInt maxSampledTexturesPerShaderStage$layout() {
return maxSampledTexturesPerShaderStage$LAYOUT;
}
private static final long maxSampledTexturesPerShaderStage$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxSampledTexturesPerShaderStage
* }
*/
public static final long maxSampledTexturesPerShaderStage$offset() {
return maxSampledTexturesPerShaderStage$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxSampledTexturesPerShaderStage
* }
*/
public static int maxSampledTexturesPerShaderStage(MemorySegment struct) {
return struct.get(maxSampledTexturesPerShaderStage$LAYOUT, maxSampledTexturesPerShaderStage$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxSampledTexturesPerShaderStage
* }
*/
public static void maxSampledTexturesPerShaderStage(MemorySegment struct, int fieldValue) {
struct.set(maxSampledTexturesPerShaderStage$LAYOUT, maxSampledTexturesPerShaderStage$OFFSET, fieldValue);
}
private static final OfInt maxSamplersPerShaderStage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxSamplersPerShaderStage"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxSamplersPerShaderStage
* }
*/
public static final OfInt maxSamplersPerShaderStage$layout() {
return maxSamplersPerShaderStage$LAYOUT;
}
private static final long maxSamplersPerShaderStage$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxSamplersPerShaderStage
* }
*/
public static final long maxSamplersPerShaderStage$offset() {
return maxSamplersPerShaderStage$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxSamplersPerShaderStage
* }
*/
public static int maxSamplersPerShaderStage(MemorySegment struct) {
return struct.get(maxSamplersPerShaderStage$LAYOUT, maxSamplersPerShaderStage$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxSamplersPerShaderStage
* }
*/
public static void maxSamplersPerShaderStage(MemorySegment struct, int fieldValue) {
struct.set(maxSamplersPerShaderStage$LAYOUT, maxSamplersPerShaderStage$OFFSET, fieldValue);
}
private static final OfInt maxStorageBuffersPerShaderStage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxStorageBuffersPerShaderStage"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxStorageBuffersPerShaderStage
* }
*/
public static final OfInt maxStorageBuffersPerShaderStage$layout() {
return maxStorageBuffersPerShaderStage$LAYOUT;
}
private static final long maxStorageBuffersPerShaderStage$OFFSET = 44;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxStorageBuffersPerShaderStage
* }
*/
public static final long maxStorageBuffersPerShaderStage$offset() {
return maxStorageBuffersPerShaderStage$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxStorageBuffersPerShaderStage
* }
*/
public static int maxStorageBuffersPerShaderStage(MemorySegment struct) {
return struct.get(maxStorageBuffersPerShaderStage$LAYOUT, maxStorageBuffersPerShaderStage$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxStorageBuffersPerShaderStage
* }
*/
public static void maxStorageBuffersPerShaderStage(MemorySegment struct, int fieldValue) {
struct.set(maxStorageBuffersPerShaderStage$LAYOUT, maxStorageBuffersPerShaderStage$OFFSET, fieldValue);
}
private static final OfInt maxStorageTexturesPerShaderStage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxStorageTexturesPerShaderStage"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxStorageTexturesPerShaderStage
* }
*/
public static final OfInt maxStorageTexturesPerShaderStage$layout() {
return maxStorageTexturesPerShaderStage$LAYOUT;
}
private static final long maxStorageTexturesPerShaderStage$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxStorageTexturesPerShaderStage
* }
*/
public static final long maxStorageTexturesPerShaderStage$offset() {
return maxStorageTexturesPerShaderStage$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxStorageTexturesPerShaderStage
* }
*/
public static int maxStorageTexturesPerShaderStage(MemorySegment struct) {
return struct.get(maxStorageTexturesPerShaderStage$LAYOUT, maxStorageTexturesPerShaderStage$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxStorageTexturesPerShaderStage
* }
*/
public static void maxStorageTexturesPerShaderStage(MemorySegment struct, int fieldValue) {
struct.set(maxStorageTexturesPerShaderStage$LAYOUT, maxStorageTexturesPerShaderStage$OFFSET, fieldValue);
}
private static final OfInt maxUniformBuffersPerShaderStage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxUniformBuffersPerShaderStage"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxUniformBuffersPerShaderStage
* }
*/
public static final OfInt maxUniformBuffersPerShaderStage$layout() {
return maxUniformBuffersPerShaderStage$LAYOUT;
}
private static final long maxUniformBuffersPerShaderStage$OFFSET = 52;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxUniformBuffersPerShaderStage
* }
*/
public static final long maxUniformBuffersPerShaderStage$offset() {
return maxUniformBuffersPerShaderStage$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxUniformBuffersPerShaderStage
* }
*/
public static int maxUniformBuffersPerShaderStage(MemorySegment struct) {
return struct.get(maxUniformBuffersPerShaderStage$LAYOUT, maxUniformBuffersPerShaderStage$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxUniformBuffersPerShaderStage
* }
*/
public static void maxUniformBuffersPerShaderStage(MemorySegment struct, int fieldValue) {
struct.set(maxUniformBuffersPerShaderStage$LAYOUT, maxUniformBuffersPerShaderStage$OFFSET, fieldValue);
}
private static final OfLong maxUniformBufferBindingSize$LAYOUT = (OfLong)$LAYOUT.select(groupElement("maxUniformBufferBindingSize"));
/**
* Layout for field:
* {@snippet lang=c :
* uint64_t maxUniformBufferBindingSize
* }
*/
public static final OfLong maxUniformBufferBindingSize$layout() {
return maxUniformBufferBindingSize$LAYOUT;
}
private static final long maxUniformBufferBindingSize$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* uint64_t maxUniformBufferBindingSize
* }
*/
public static final long maxUniformBufferBindingSize$offset() {
return maxUniformBufferBindingSize$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint64_t maxUniformBufferBindingSize
* }
*/
public static long maxUniformBufferBindingSize(MemorySegment struct) {
return struct.get(maxUniformBufferBindingSize$LAYOUT, maxUniformBufferBindingSize$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint64_t maxUniformBufferBindingSize
* }
*/
public static void maxUniformBufferBindingSize(MemorySegment struct, long fieldValue) {
struct.set(maxUniformBufferBindingSize$LAYOUT, maxUniformBufferBindingSize$OFFSET, fieldValue);
}
private static final OfLong maxStorageBufferBindingSize$LAYOUT = (OfLong)$LAYOUT.select(groupElement("maxStorageBufferBindingSize"));
/**
* Layout for field:
* {@snippet lang=c :
* uint64_t maxStorageBufferBindingSize
* }
*/
public static final OfLong maxStorageBufferBindingSize$layout() {
return maxStorageBufferBindingSize$LAYOUT;
}
private static final long maxStorageBufferBindingSize$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* uint64_t maxStorageBufferBindingSize
* }
*/
public static final long maxStorageBufferBindingSize$offset() {
return maxStorageBufferBindingSize$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint64_t maxStorageBufferBindingSize
* }
*/
public static long maxStorageBufferBindingSize(MemorySegment struct) {
return struct.get(maxStorageBufferBindingSize$LAYOUT, maxStorageBufferBindingSize$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint64_t maxStorageBufferBindingSize
* }
*/
public static void maxStorageBufferBindingSize(MemorySegment struct, long fieldValue) {
struct.set(maxStorageBufferBindingSize$LAYOUT, maxStorageBufferBindingSize$OFFSET, fieldValue);
}
private static final OfInt minUniformBufferOffsetAlignment$LAYOUT = (OfInt)$LAYOUT.select(groupElement("minUniformBufferOffsetAlignment"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t minUniformBufferOffsetAlignment
* }
*/
public static final OfInt minUniformBufferOffsetAlignment$layout() {
return minUniformBufferOffsetAlignment$LAYOUT;
}
private static final long minUniformBufferOffsetAlignment$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t minUniformBufferOffsetAlignment
* }
*/
public static final long minUniformBufferOffsetAlignment$offset() {
return minUniformBufferOffsetAlignment$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t minUniformBufferOffsetAlignment
* }
*/
public static int minUniformBufferOffsetAlignment(MemorySegment struct) {
return struct.get(minUniformBufferOffsetAlignment$LAYOUT, minUniformBufferOffsetAlignment$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t minUniformBufferOffsetAlignment
* }
*/
public static void minUniformBufferOffsetAlignment(MemorySegment struct, int fieldValue) {
struct.set(minUniformBufferOffsetAlignment$LAYOUT, minUniformBufferOffsetAlignment$OFFSET, fieldValue);
}
private static final OfInt minStorageBufferOffsetAlignment$LAYOUT = (OfInt)$LAYOUT.select(groupElement("minStorageBufferOffsetAlignment"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t minStorageBufferOffsetAlignment
* }
*/
public static final OfInt minStorageBufferOffsetAlignment$layout() {
return minStorageBufferOffsetAlignment$LAYOUT;
}
private static final long minStorageBufferOffsetAlignment$OFFSET = 76;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t minStorageBufferOffsetAlignment
* }
*/
public static final long minStorageBufferOffsetAlignment$offset() {
return minStorageBufferOffsetAlignment$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t minStorageBufferOffsetAlignment
* }
*/
public static int minStorageBufferOffsetAlignment(MemorySegment struct) {
return struct.get(minStorageBufferOffsetAlignment$LAYOUT, minStorageBufferOffsetAlignment$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t minStorageBufferOffsetAlignment
* }
*/
public static void minStorageBufferOffsetAlignment(MemorySegment struct, int fieldValue) {
struct.set(minStorageBufferOffsetAlignment$LAYOUT, minStorageBufferOffsetAlignment$OFFSET, fieldValue);
}
private static final OfInt maxVertexBuffers$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxVertexBuffers"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxVertexBuffers
* }
*/
public static final OfInt maxVertexBuffers$layout() {
return maxVertexBuffers$LAYOUT;
}
private static final long maxVertexBuffers$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxVertexBuffers
* }
*/
public static final long maxVertexBuffers$offset() {
return maxVertexBuffers$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxVertexBuffers
* }
*/
public static int maxVertexBuffers(MemorySegment struct) {
return struct.get(maxVertexBuffers$LAYOUT, maxVertexBuffers$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxVertexBuffers
* }
*/
public static void maxVertexBuffers(MemorySegment struct, int fieldValue) {
struct.set(maxVertexBuffers$LAYOUT, maxVertexBuffers$OFFSET, fieldValue);
}
private static final OfLong maxBufferSize$LAYOUT = (OfLong)$LAYOUT.select(groupElement("maxBufferSize"));
/**
* Layout for field:
* {@snippet lang=c :
* uint64_t maxBufferSize
* }
*/
public static final OfLong maxBufferSize$layout() {
return maxBufferSize$LAYOUT;
}
private static final long maxBufferSize$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* uint64_t maxBufferSize
* }
*/
public static final long maxBufferSize$offset() {
return maxBufferSize$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint64_t maxBufferSize
* }
*/
public static long maxBufferSize(MemorySegment struct) {
return struct.get(maxBufferSize$LAYOUT, maxBufferSize$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint64_t maxBufferSize
* }
*/
public static void maxBufferSize(MemorySegment struct, long fieldValue) {
struct.set(maxBufferSize$LAYOUT, maxBufferSize$OFFSET, fieldValue);
}
private static final OfInt maxVertexAttributes$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxVertexAttributes"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxVertexAttributes
* }
*/
public static final OfInt maxVertexAttributes$layout() {
return maxVertexAttributes$LAYOUT;
}
private static final long maxVertexAttributes$OFFSET = 96;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxVertexAttributes
* }
*/
public static final long maxVertexAttributes$offset() {
return maxVertexAttributes$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxVertexAttributes
* }
*/
public static int maxVertexAttributes(MemorySegment struct) {
return struct.get(maxVertexAttributes$LAYOUT, maxVertexAttributes$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxVertexAttributes
* }
*/
public static void maxVertexAttributes(MemorySegment struct, int fieldValue) {
struct.set(maxVertexAttributes$LAYOUT, maxVertexAttributes$OFFSET, fieldValue);
}
private static final OfInt maxVertexBufferArrayStride$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxVertexBufferArrayStride"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxVertexBufferArrayStride
* }
*/
public static final OfInt maxVertexBufferArrayStride$layout() {
return maxVertexBufferArrayStride$LAYOUT;
}
private static final long maxVertexBufferArrayStride$OFFSET = 100;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxVertexBufferArrayStride
* }
*/
public static final long maxVertexBufferArrayStride$offset() {
return maxVertexBufferArrayStride$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxVertexBufferArrayStride
* }
*/
public static int maxVertexBufferArrayStride(MemorySegment struct) {
return struct.get(maxVertexBufferArrayStride$LAYOUT, maxVertexBufferArrayStride$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxVertexBufferArrayStride
* }
*/
public static void maxVertexBufferArrayStride(MemorySegment struct, int fieldValue) {
struct.set(maxVertexBufferArrayStride$LAYOUT, maxVertexBufferArrayStride$OFFSET, fieldValue);
}
private static final OfInt maxInterStageShaderComponents$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxInterStageShaderComponents"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderComponents
* }
*/
public static final OfInt maxInterStageShaderComponents$layout() {
return maxInterStageShaderComponents$LAYOUT;
}
private static final long maxInterStageShaderComponents$OFFSET = 104;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderComponents
* }
*/
public static final long maxInterStageShaderComponents$offset() {
return maxInterStageShaderComponents$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderComponents
* }
*/
public static int maxInterStageShaderComponents(MemorySegment struct) {
return struct.get(maxInterStageShaderComponents$LAYOUT, maxInterStageShaderComponents$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderComponents
* }
*/
public static void maxInterStageShaderComponents(MemorySegment struct, int fieldValue) {
struct.set(maxInterStageShaderComponents$LAYOUT, maxInterStageShaderComponents$OFFSET, fieldValue);
}
private static final OfInt maxInterStageShaderVariables$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxInterStageShaderVariables"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderVariables
* }
*/
public static final OfInt maxInterStageShaderVariables$layout() {
return maxInterStageShaderVariables$LAYOUT;
}
private static final long maxInterStageShaderVariables$OFFSET = 108;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderVariables
* }
*/
public static final long maxInterStageShaderVariables$offset() {
return maxInterStageShaderVariables$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderVariables
* }
*/
public static int maxInterStageShaderVariables(MemorySegment struct) {
return struct.get(maxInterStageShaderVariables$LAYOUT, maxInterStageShaderVariables$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxInterStageShaderVariables
* }
*/
public static void maxInterStageShaderVariables(MemorySegment struct, int fieldValue) {
struct.set(maxInterStageShaderVariables$LAYOUT, maxInterStageShaderVariables$OFFSET, fieldValue);
}
private static final OfInt maxColorAttachments$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxColorAttachments"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxColorAttachments
* }
*/
public static final OfInt maxColorAttachments$layout() {
return maxColorAttachments$LAYOUT;
}
private static final long maxColorAttachments$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxColorAttachments
* }
*/
public static final long maxColorAttachments$offset() {
return maxColorAttachments$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxColorAttachments
* }
*/
public static int maxColorAttachments(MemorySegment struct) {
return struct.get(maxColorAttachments$LAYOUT, maxColorAttachments$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxColorAttachments
* }
*/
public static void maxColorAttachments(MemorySegment struct, int fieldValue) {
struct.set(maxColorAttachments$LAYOUT, maxColorAttachments$OFFSET, fieldValue);
}
private static final OfInt maxColorAttachmentBytesPerSample$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxColorAttachmentBytesPerSample"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxColorAttachmentBytesPerSample
* }
*/
public static final OfInt maxColorAttachmentBytesPerSample$layout() {
return maxColorAttachmentBytesPerSample$LAYOUT;
}
private static final long maxColorAttachmentBytesPerSample$OFFSET = 116;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxColorAttachmentBytesPerSample
* }
*/
public static final long maxColorAttachmentBytesPerSample$offset() {
return maxColorAttachmentBytesPerSample$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxColorAttachmentBytesPerSample
* }
*/
public static int maxColorAttachmentBytesPerSample(MemorySegment struct) {
return struct.get(maxColorAttachmentBytesPerSample$LAYOUT, maxColorAttachmentBytesPerSample$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxColorAttachmentBytesPerSample
* }
*/
public static void maxColorAttachmentBytesPerSample(MemorySegment struct, int fieldValue) {
struct.set(maxColorAttachmentBytesPerSample$LAYOUT, maxColorAttachmentBytesPerSample$OFFSET, fieldValue);
}
private static final OfInt maxComputeWorkgroupStorageSize$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxComputeWorkgroupStorageSize"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupStorageSize
* }
*/
public static final OfInt maxComputeWorkgroupStorageSize$layout() {
return maxComputeWorkgroupStorageSize$LAYOUT;
}
private static final long maxComputeWorkgroupStorageSize$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupStorageSize
* }
*/
public static final long maxComputeWorkgroupStorageSize$offset() {
return maxComputeWorkgroupStorageSize$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupStorageSize
* }
*/
public static int maxComputeWorkgroupStorageSize(MemorySegment struct) {
return struct.get(maxComputeWorkgroupStorageSize$LAYOUT, maxComputeWorkgroupStorageSize$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupStorageSize
* }
*/
public static void maxComputeWorkgroupStorageSize(MemorySegment struct, int fieldValue) {
struct.set(maxComputeWorkgroupStorageSize$LAYOUT, maxComputeWorkgroupStorageSize$OFFSET, fieldValue);
}
private static final OfInt maxComputeInvocationsPerWorkgroup$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxComputeInvocationsPerWorkgroup"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxComputeInvocationsPerWorkgroup
* }
*/
public static final OfInt maxComputeInvocationsPerWorkgroup$layout() {
return maxComputeInvocationsPerWorkgroup$LAYOUT;
}
private static final long maxComputeInvocationsPerWorkgroup$OFFSET = 124;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxComputeInvocationsPerWorkgroup
* }
*/
public static final long maxComputeInvocationsPerWorkgroup$offset() {
return maxComputeInvocationsPerWorkgroup$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxComputeInvocationsPerWorkgroup
* }
*/
public static int maxComputeInvocationsPerWorkgroup(MemorySegment struct) {
return struct.get(maxComputeInvocationsPerWorkgroup$LAYOUT, maxComputeInvocationsPerWorkgroup$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxComputeInvocationsPerWorkgroup
* }
*/
public static void maxComputeInvocationsPerWorkgroup(MemorySegment struct, int fieldValue) {
struct.set(maxComputeInvocationsPerWorkgroup$LAYOUT, maxComputeInvocationsPerWorkgroup$OFFSET, fieldValue);
}
private static final OfInt maxComputeWorkgroupSizeX$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxComputeWorkgroupSizeX"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeX
* }
*/
public static final OfInt maxComputeWorkgroupSizeX$layout() {
return maxComputeWorkgroupSizeX$LAYOUT;
}
private static final long maxComputeWorkgroupSizeX$OFFSET = 128;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeX
* }
*/
public static final long maxComputeWorkgroupSizeX$offset() {
return maxComputeWorkgroupSizeX$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeX
* }
*/
public static int maxComputeWorkgroupSizeX(MemorySegment struct) {
return struct.get(maxComputeWorkgroupSizeX$LAYOUT, maxComputeWorkgroupSizeX$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeX
* }
*/
public static void maxComputeWorkgroupSizeX(MemorySegment struct, int fieldValue) {
struct.set(maxComputeWorkgroupSizeX$LAYOUT, maxComputeWorkgroupSizeX$OFFSET, fieldValue);
}
private static final OfInt maxComputeWorkgroupSizeY$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxComputeWorkgroupSizeY"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeY
* }
*/
public static final OfInt maxComputeWorkgroupSizeY$layout() {
return maxComputeWorkgroupSizeY$LAYOUT;
}
private static final long maxComputeWorkgroupSizeY$OFFSET = 132;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeY
* }
*/
public static final long maxComputeWorkgroupSizeY$offset() {
return maxComputeWorkgroupSizeY$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeY
* }
*/
public static int maxComputeWorkgroupSizeY(MemorySegment struct) {
return struct.get(maxComputeWorkgroupSizeY$LAYOUT, maxComputeWorkgroupSizeY$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeY
* }
*/
public static void maxComputeWorkgroupSizeY(MemorySegment struct, int fieldValue) {
struct.set(maxComputeWorkgroupSizeY$LAYOUT, maxComputeWorkgroupSizeY$OFFSET, fieldValue);
}
private static final OfInt maxComputeWorkgroupSizeZ$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxComputeWorkgroupSizeZ"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeZ
* }
*/
public static final OfInt maxComputeWorkgroupSizeZ$layout() {
return maxComputeWorkgroupSizeZ$LAYOUT;
}
private static final long maxComputeWorkgroupSizeZ$OFFSET = 136;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeZ
* }
*/
public static final long maxComputeWorkgroupSizeZ$offset() {
return maxComputeWorkgroupSizeZ$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeZ
* }
*/
public static int maxComputeWorkgroupSizeZ(MemorySegment struct) {
return struct.get(maxComputeWorkgroupSizeZ$LAYOUT, maxComputeWorkgroupSizeZ$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupSizeZ
* }
*/
public static void maxComputeWorkgroupSizeZ(MemorySegment struct, int fieldValue) {
struct.set(maxComputeWorkgroupSizeZ$LAYOUT, maxComputeWorkgroupSizeZ$OFFSET, fieldValue);
}
private static final OfInt maxComputeWorkgroupsPerDimension$LAYOUT = (OfInt)$LAYOUT.select(groupElement("maxComputeWorkgroupsPerDimension"));
/**
* Layout for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupsPerDimension
* }
*/
public static final OfInt maxComputeWorkgroupsPerDimension$layout() {
return maxComputeWorkgroupsPerDimension$LAYOUT;
}
private static final long maxComputeWorkgroupsPerDimension$OFFSET = 140;
/**
* Offset for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupsPerDimension
* }
*/
public static final long maxComputeWorkgroupsPerDimension$offset() {
return maxComputeWorkgroupsPerDimension$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupsPerDimension
* }
*/
public static int maxComputeWorkgroupsPerDimension(MemorySegment struct) {
return struct.get(maxComputeWorkgroupsPerDimension$LAYOUT, maxComputeWorkgroupsPerDimension$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* uint32_t maxComputeWorkgroupsPerDimension
* }
*/
public static void maxComputeWorkgroupsPerDimension(MemorySegment struct, int fieldValue) {
struct.set(maxComputeWorkgroupsPerDimension$LAYOUT, maxComputeWorkgroupsPerDimension$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}