24 : type_(
type), element_size_(
type.
size()), items_(array_size)
33 for (Item &item : items_) {
40 Item &item = items_[index];
41 if (item.length == item.capacity) {
42 this->realloc_to_at_least(item, item.capacity + 1);
45 void *dst =
POINTER_OFFSET(item.start, element_size_ * item.length);
64 this->
extend(index, varray);
69 for (
const int i :
mask) {
78 this->
extend(mask, virtual_values);
83 Item &item = items_[index];
89 const Item &item = items_[index];
90 return GSpan{type_, item.start, item.length};
93 void GVectorArray::realloc_to_at_least(Item &item,
int64_t min_capacity)
97 void *new_buffer = allocator_.
allocate(element_size_ * new_capacity, type_.
alignment());
100 item.start = new_buffer;
101 item.capacity = new_capacity;
#define POINTER_OFFSET(v, ofs)
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void * allocate(const int64_t size, const int64_t alignment)
int64_t alignment() const
bool is_trivially_destructible() const
void destruct(void *ptr) const
void destruct_n(void *ptr, int64_t n) const
void copy_to_uninitialized(const void *src, void *dst) const
void relocate_to_initialized_n(void *src, void *dst, int64_t n) const
const CPPType & type() const
void get(const int64_t index, void *r_value) const
GMutableSpan operator[](int64_t index)
void extend(int64_t index, const GVArray &values)
void append(int64_t index, const void *value)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)