Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "FN_generic_virtual_vector_array.hh"
|
|
|
|
namespace blender::fn {
|
|
|
|
void GVArray_For_GVVectorArrayIndex::get(const int64_t index_in_vector, void *r_value) const
|
|
{
|
|
vector_array_.get_vector_element(index_, index_in_vector, r_value);
|
|
}
|
|
|
|
void GVArray_For_GVVectorArrayIndex::get_to_uninitialized(const int64_t index_in_vector,
|
|
void *r_value) const
|
|
{
|
|
type_->default_construct(r_value);
|
|
vector_array_.get_vector_element(index_, index_in_vector, r_value);
|
|
}
|
|
|
|
int64_t GVVectorArray_For_SingleGVArray::get_vector_size_impl(const int64_t UNUSED(index)) const
|
|
{
|
|
return varray_.size();
|
|
}
|
|
|
|
void GVVectorArray_For_SingleGVArray::get_vector_element_impl(const int64_t UNUSED(index),
|
|
const int64_t index_in_vector,
|
|
void *r_value) const
|
|
{
|
|
varray_.get(index_in_vector, r_value);
|
|
}
|
|
|
|
bool GVVectorArray_For_SingleGVArray::is_single_vector_impl() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
int64_t GVVectorArray_For_SingleGSpan::get_vector_size_impl(const int64_t UNUSED(index)) const
|
|
{
|
|
return span_.size();
|
|
}
|
|
|
|
void GVVectorArray_For_SingleGSpan::get_vector_element_impl(const int64_t UNUSED(index),
|
|
const int64_t index_in_vector,
|
|
void *r_value) const
|
|
{
|
|
type_->copy_assign(span_[index_in_vector], r_value);
|
|
}
|
|
|
|
bool GVVectorArray_For_SingleGSpan::is_single_vector_impl() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} // namespace blender::fn
|