Class ecs_sparse_t
java.lang.Object
com.github.elebras1.flecs.ecs_sparse_t
struct ecs_sparse_t {
ecs_vec_t dense;
ecs_vec_t pages;
ecs_size_t size;
int32_t count;
uint64_t max_id;
struct ecs_allocator_t *allocator;
struct ecs_block_allocator_t *page_allocator;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentallocator(MemorySegment struct) Getter for field:struct ecs_allocator_t *allocatorstatic voidallocator(MemorySegment struct, MemorySegment fieldValue) Setter for field:struct ecs_allocator_t *allocatorstatic final AddressLayoutLayout for field:struct ecs_allocator_t *allocatorstatic final longOffset for field:struct ecs_allocator_t *allocatorstatic MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static intcount(MemorySegment struct) Getter for field:int32_t countstatic voidcount(MemorySegment struct, int fieldValue) Setter for field:int32_t countstatic final ValueLayout.OfIntLayout for field:int32_t countstatic final longOffset for field:int32_t countstatic MemorySegmentdense(MemorySegment struct) Getter for field:ecs_vec_t densestatic voiddense(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_vec_t densestatic final GroupLayoutLayout for field:ecs_vec_t densestatic final longOffset for field:ecs_vec_t densestatic final GroupLayoutlayout()The layout of this structstatic longmax_id(MemorySegment struct) Getter for field:uint64_t max_idstatic voidmax_id(MemorySegment struct, long fieldValue) Setter for field:uint64_t max_idstatic final ValueLayout.OfLongLayout for field:uint64_t max_idstatic final longOffset for field:uint64_t max_idstatic MemorySegmentpage_allocator(MemorySegment struct) Getter for field:struct ecs_block_allocator_t *page_allocatorstatic voidpage_allocator(MemorySegment struct, MemorySegment fieldValue) Setter for field:struct ecs_block_allocator_t *page_allocatorstatic final AddressLayoutLayout for field:struct ecs_block_allocator_t *page_allocatorstatic final longOffset for field:struct ecs_block_allocator_t *page_allocatorstatic MemorySegmentpages(MemorySegment struct) Getter for field:ecs_vec_t pagesstatic voidpages(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_vec_t pagesstatic final GroupLayoutLayout for field:ecs_vec_t pagesstatic final longOffset for field:ecs_vec_t pagesstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static intsize(MemorySegment struct) Getter for field:ecs_size_t sizestatic voidsize(MemorySegment struct, int fieldValue) Setter for field:ecs_size_t sizestatic final ValueLayout.OfIntLayout for field:ecs_size_t sizestatic final longOffset for field:ecs_size_t sizestatic longsizeof()The size (in bytes) of this struct
-
Method Details
-
layout
The layout of this struct -
dense$layout
Layout for field:ecs_vec_t dense -
dense$offset
public static final long dense$offset()Offset for field:ecs_vec_t dense -
dense
Getter for field:ecs_vec_t dense -
dense
Setter for field:ecs_vec_t dense -
pages$layout
Layout for field:ecs_vec_t pages -
pages$offset
public static final long pages$offset()Offset for field:ecs_vec_t pages -
pages
Getter for field:ecs_vec_t pages -
pages
Setter for field:ecs_vec_t pages -
size$layout
Layout for field:ecs_size_t size -
size$offset
public static final long size$offset()Offset for field:ecs_size_t size -
size
Getter for field:ecs_size_t size -
size
Setter for field:ecs_size_t size -
count$layout
Layout for field:int32_t count -
count$offset
public static final long count$offset()Offset for field:int32_t count -
count
Getter for field:int32_t count -
count
Setter for field:int32_t count -
max_id$layout
Layout for field:uint64_t max_id -
max_id$offset
public static final long max_id$offset()Offset for field:uint64_t max_id -
max_id
Getter for field:uint64_t max_id -
max_id
Setter for field:uint64_t max_id -
allocator$layout
Layout for field:struct ecs_allocator_t *allocator -
allocator$offset
public static final long allocator$offset()Offset for field:struct ecs_allocator_t *allocator -
allocator
Getter for field:struct ecs_allocator_t *allocator -
allocator
Setter for field:struct ecs_allocator_t *allocator -
page_allocator$layout
Layout for field:struct ecs_block_allocator_t *page_allocator -
page_allocator$offset
public static final long page_allocator$offset()Offset for field:struct ecs_block_allocator_t *page_allocator -
page_allocator
Getter for field:struct ecs_block_allocator_t *page_allocator -
page_allocator
Setter for field:struct ecs_block_allocator_t *page_allocator -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-