30 #ifndef SOLIDUTILS_INCLUDE_VECTORMATH_HPP 31 #define SOLIDUTILS_INCLUDE_VECTORMATH_HPP 36 #include <type_traits> 63 size_t const size) noexcept
66 for (
size_t i = 0; i < size; ++i) {
87 T
const inc = 1) noexcept
90 for (
size_t i = 0; i < size; ++i) {
104 template <
typename T>
107 size_t const size) noexcept
120 template <
typename T>
123 T
const end) noexcept
125 using V =
typename std::remove_reference<decltype(*begin)>::type;
127 for (T iter = begin; iter != end; ++iter) {
static void increment(T *const data, size_t const size, T const start=0, T const inc=1) noexcept
Set all entries int the array to the given sequence.
Definition: VectorMath.hpp:83
static void prefixSumExclusive(T const begin, T const end) noexcept
Perform a prefix sum on an array.
Definition: VectorMath.hpp:121
A mutable array structure for storing self-allocated memory.
static T sum(T *const data, size_t const size) noexcept
Sum the elements of an array.
Definition: VectorMath.hpp:61
The VectorMath class contains static functions for manipulating numerical data in vectors...
Definition: VectorMath.hpp:48
static void prefixSumExclusive(T *const data, size_t const size) noexcept
Perform a prefix sum on an array.
Definition: VectorMath.hpp:105