9 #include "testing/testing.h"
15 std::array<int, 5>
data = {3, 4, 5, 6, 7};
25 TEST(virtual_array, Single)
69 TEST(virtual_array, StdVector)
71 std::vector<int>
vector = {5, 6, 7, 8};
78 TEST(virtual_array, StdArray)
80 std::array<int, 4>
array = {2, 3, 4, 5};
101 auto func = [](
int64_t index) {
return (
int)(index * index); };
111 auto func = [](
int64_t index) {
return (
int)(10 * index); };
122 static int get_x(
const std::array<int, 3> &item)
127 static void set_x(std::array<int, 3> &item,
int value)
132 TEST(virtual_array, DerivedSpan)
156 TEST(virtual_array, MutableToImmutable)
158 std::array<int, 4>
array = {4, 2, 6, 4};
184 TEST(virtual_array, MaterializeCompressed)
187 std::array<int, 10>
array = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90};
189 std::array<int, 3> compressed_array;
201 std::array<int, 3> compressed_array;
206 compressed_array.fill(0);
214 std::array<int, 3> compressed_array;
226 TEST(virtual_array, EmptySpanWrapper)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
constexpr bool is_empty() const
constexpr int64_t size() const
constexpr bool is_empty() const
void materialize_compressed(IndexMask mask, MutableSpan< T > r_span) const
T get(const int64_t index) const
void materialize_compressed_to_uninitialized(IndexMask mask, MutableSpan< T > r_span) const
Span< T > get_internal_span() const
static VArray ForContainer(ContainerT container)
static VArray ForSingle(T value, const int64_t size)
static VArray ForSpan(Span< T > values)
static VArray ForFunc(const int64_t size, GetFunc get_func)
void set(const int64_t index, T value)
static VMutableArray ForSpan(MutableSpan< T > values)
static int get_x(const std::array< int, 3 > &item)
static void set_x(std::array< int, 3 > &item, int value)
TEST(any, DefaultConstructor)