25#include <boost/multi_array.hpp>
41template <
class T,
class F>
44 using R =
decltype(f((offset)));
46 boost::multi_array<R, 3> res(size);
49 offset +
Vector<T, 3>{grid_spacing[0] *
static_cast<T
>(size[0]),
50 grid_spacing[1] *
static_cast<T
>(size[1]),
51 grid_spacing[2] *
static_cast<T
>(size[2])};
Vector implementation and trait types for boost qvm interoperability.
DEVICE_QUALIFIER constexpr pointer data() noexcept
auto raster(Vector< T, 3 > const &offset, Vector< T, 3 > const &grid_spacing, Vector3i const &size, F f)
Raster a function over a regular 3d grid.
auto make_lin_space(T start, T stop, std::size_t number, bool endpoint=true)
Equally spaced values in interval.