array
array copied to clipboard
C++ multidimensional arrays in the spirit of the STL
* clang-format automatically ran in my editor. * Add missing test/algorithm.cpp to Bazel test.
`mkdir -p obj/test g++ -I. -c -o obj/test/algorithm.o test/algorithm.cpp -O2 -ffast-math -fstrict-aliasing -march=native -std=c++14 -Wall In file included from test/algorithm.cpp:15: ./array.h: In instantiation of ‘void nda::for_each_value_in_order(const Shape&, const ShapeA&, PtrA,...
I've recently had use for a fixed size array allocated on the stack, i.e. the n-dimensional counterpart to std::array or the equivalent of Eigen::Matrix: this is an array with. ```...
Here's the first few things I thought to put in an "FAQ". It's written as a test (like readme.cpp).
It would be very helpful to provide a cheat sheet table at the top of the array.h header file. Something that shows how to do an equivalent numpy, Matlab, or...
... some of which may not be simple. Also include some gotchas like how cropping (slicing) doesn't change min.
`generate()` works like `std::generate()` and needs to maintain state elsewhere. It'd be nice to have a function that does a fill based on "pattern function" that takes in indices instead:...
When allocators are expensive to construct (e.g. `auto_allocator` uses a lot of stack space), the current `make_array` and similar helpers are problematic, because they use a default argument for the...
Currently, it is not possible to construct an Einstein reduction expression without copying the operands. Most of these copies are small/lightweight (never arrays, only array_refs), but operands that are functions/lambdas...