19 this->
get(i, elem_dst);
35 this->
get(i, elem_dst);
231 type.copy_construct(value, (
void *)
value_);
264 type.copy_construct(value, &buffer_);
268 void get(
const int64_t index,
void *r_value)
const final
270 this->get_to_uninitialized(index, r_value);
272 void get_to_uninitialized(
const int64_t ,
void *r_value)
const final
274 memcpy(r_value, &buffer_,
type_->
size());
277 void materialize(
const IndexMask &mask,
void *dst)
const final
279 this->materialize_to_uninitialized(mask, dst);
281 void materialize_to_uninitialized(
const IndexMask &mask,
void *dst)
const final
285 void materialize_compressed(
const IndexMask &mask,
void *dst)
const final
287 this->materialize_compressed_to_uninitialized(mask, dst);
289 void materialize_compressed_to_uninitialized(
const IndexMask &mask,
void *dst)
const final
294 CommonVArrayInfo common_info() const final
309 :
GSpan(varray ? &varray.type() : nullptr), varray_(std::move(varray))
328 :
GSpan(other.type_ptr()), varray_(std::move(other.varray_)), owned_data_(other.owned_data_)
342 other.owned_data_ =
nullptr;
343 other.data_ =
nullptr;
349 if (owned_data_ !=
nullptr) {
357 if (
this == &other) {
360 std::destroy_at(
this);
374 :
GMutableSpan(varray ? &varray.type() : nullptr), varray_(std::move(varray))
386 if (copy_values_to_span) {
398 varray_(std::move(other.varray_)),
399 owned_data_(other.owned_data_),
400 show_not_saved_warning_(other.show_not_saved_warning_)
413 other.owned_data_ =
nullptr;
414 other.data_ =
nullptr;
421 if (show_not_saved_warning_) {
422 if (!save_has_been_called_) {
423 std::cout <<
"Warning: Call `save()` to make sure that changes persist in all cases.\n";
427 if (owned_data_ !=
nullptr) {
435 if (
this == &other) {
438 std::destroy_at(
this);
445 save_has_been_called_ =
true;
446 if (
data_ != owned_data_) {
454 show_not_saved_warning_ =
false;
497 switch (internal_info.
type) {
507 return internal_info;
555 impl_ = this->impl_from_storage();
556 other.storage_.reset();
557 other.impl_ =
nullptr;
607 if (
this == &other) {
616 if (
this == &other) {
619 storage_ = std::move(other.storage_);
620 impl_ = this->impl_from_storage();
621 other.storage_.reset();
622 other.impl_ =
nullptr;
686 if (type.is_trivial() && type.size() <= 16 && type.alignment() <= 8) {
757 this->move_from(std::move(other));
804 this->move_from(std::move(other));
810 return this->get_impl();
815 this->get_impl()->
set_all(src);
832CommonVArrayInfo GVArrayImpl_For_SingleValueRef_final::common_info()
const
#define BLI_assert_unreachable()
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
#define POINTER_OFFSET(v, ofs)
const RealExtraInfo & extra_info() const
void default_construct_n(void *ptr, int64_t n) const
void destruct_n(void *ptr, int64_t n) const
void copy_assign_indices(const void *src, void *dst, const IndexMask &mask) const
void fill_assign_n(const void *value, void *dst, int64_t n) const
void fill_construct_indices(const void *value, void *dst, const IndexMask &mask) const
void copy_construct_indices(const void *src, void *dst, const IndexMask &mask) const
void fill_assign_indices(const void *value, void *dst, const IndexMask &mask) const
void fill_construct_n(const void *value, void *dst, int64_t n) const
void copy_construct_compressed(const void *src, void *dst, const IndexMask &mask) const
void copy_assign_n(const void *src, void *dst, int64_t n) const
void copy_construct(const void *src, void *dst) const
void destruct(void *ptr) const
int64_t alignment() const
void copy_assign(const void *src, void *dst) const
void move_construct(void *src, void *dst) const
void relocate_assign(void *src, void *dst) const
void default_construct(void *ptr) const
void copy_assign_compressed(const void *src, void *dst, const IndexMask &mask) const
const GVMutableArray & varray() const
GMutableVArraySpan & operator=(GMutableVArraySpan &&other)
void disable_not_applied_warning()
GSpan slice(const int64_t start, int64_t size) const
CommonVArrayInfo common_info() const
void emplace(Args &&...args)
GSpan get_internal_span() const
void materialize_compressed_to_uninitialized(const IndexMask &mask, void *dst) const
const GVArrayImpl * impl_from_storage() const
void copy_from(const GVArrayCommon &other)
const CPPType & type() const
void move_from(GVArrayCommon &&other) noexcept
void get_to_uninitialized(int64_t index, void *r_value) const
void materialize(void *dst) const
void get_internal_single_to_uninitialized(void *r_value) const
void materialize_to_uninitialized(void *dst) const
void get(int64_t index, void *r_value) const
IndexRange index_range() const
const GVArrayImpl * impl_
void materialize_compressed(const IndexMask &mask, void *dst) const
void get_internal_single(void *r_value) const
GVArrayImpl_For_GArray(GArray<> array)
CommonVArrayInfo common_info() const override
void set_by_move(int64_t index, void *value) override
void get_to_uninitialized(int64_t index, void *r_value) const override
virtual void materialize_compressed(const IndexMask &mask, void *dst) const override
virtual void materialize_to_uninitialized(const IndexMask &mask, void *dst) const override
void set_by_relocate(int64_t index, void *value) override
virtual void materialize(const IndexMask &mask, void *dst) const override
const int64_t element_size_
virtual void materialize_compressed_to_uninitialized(const IndexMask &mask, void *dst) const override
void get(int64_t index, void *r_value) const override
void set_by_copy(int64_t index, const void *value) override
void get(const int64_t index, void *r_value) const override
void materialize_compressed_to_uninitialized(const IndexMask &mask, void *dst) const override
void materialize_compressed(const IndexMask &mask, void *dst) const override
void materialize_to_uninitialized(const IndexMask &mask, void *dst) const override
void materialize(const IndexMask &mask, void *dst) const override
void get_to_uninitialized(const int64_t index, void *r_value) const override
CommonVArrayInfo common_info() const override
GVArrayImpl_For_SingleValue(const CPPType &type, const int64_t size, const void *value)
~GVArrayImpl_For_SingleValue() override
CommonVArrayInfo common_info() const override
void materialize_compressed_to_uninitialized(const IndexMask &mask, void *dst) const override
void materialize(const IndexMask &mask, void *dst) const final
void materialize_compressed(const IndexMask &mask, void *dst) const final
void get(const int64_t index, void *r_value) const override
void materialize_to_uninitialized(const IndexMask &mask, void *dst) const final
GVArrayImpl_For_SlicedGVArray(GVArray varray, const IndexRange slice)
void get_to_uninitialized(const int64_t index, void *r_value) const override
GVArrayImpl_For_SmallTrivialSingleValue(const CPPType &type, const int64_t size, const void *value)
virtual void materialize_compressed_to_uninitialized(const IndexMask &mask, void *dst) const
virtual void materialize(const IndexMask &mask, void *dst) const
virtual void get_to_uninitialized(int64_t index, void *r_value) const =0
virtual void materialize_compressed(const IndexMask &mask, void *dst) const
virtual void get(int64_t index, void *r_value) const
virtual bool try_assign_VArray(void *varray) const
virtual CommonVArrayInfo common_info() const
const CPPType & type() const
virtual void materialize_to_uninitialized(const IndexMask &mask, void *dst) const
GVArraySpan & operator=(GVArraySpan &&other)
GVArray slice(IndexRange slice) const
static GVArray ForEmpty(const CPPType &type)
static GVArray ForGArray(GArray<> array)
static GVArray ForSingleDefault(const CPPType &type, int64_t size)
GVArray & operator=(const GVArray &other)
static GVArray For(Args &&...args)
static GVArray ForSingleRef(const CPPType &type, int64_t size, const void *value)
static GVArray ForSpan(GSpan span)
static GVArray ForSingle(const CPPType &type, int64_t size, const void *value)
virtual bool try_assign_VMutableArray(void *varray) const
virtual void set_all(const void *src)
virtual void set_by_copy(int64_t index, const void *value)
virtual void set_by_relocate(int64_t index, void *value)
virtual void set_by_move(int64_t index, void *value)=0
void set_all(const void *src)
void set_by_copy(int64_t index, const void *value)
GVMutableArrayImpl * get_implementation() const
GMutableSpan get_internal_span() const
GVMutableArray & operator=(const GVMutableArray &other)
void fill(const void *value)
static GVMutableArray ForSpan(GMutableSpan span)
static GVMutableArray For(Args &&...args)
constexpr int64_t one_after_last() const
constexpr int64_t size() const
IndexMask shift(const int64_t offset, IndexMaskMemory &memory) const
void * MEM_mallocN_aligned(size_t len, size_t alignment, const char *str)
void MEM_freeN(void *vmemh)