vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
|
evaluating a specific spline, derivatives, precision More...
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
evaluating a specific spline, derivatives, precision
If we create a b-spline over an array containing, at each grid point, the sum of the grid point's coordinates, each 1D row, column, etc will hold a linear gradient with first derivative == 1. If we use NATURAL BCs, evaluating the spline with real coordinates anywhere inside the defined range should produce precisely the sum of the coordinates. This is a good test for both the precision of the evaluation and it's correct functioning, particularly with higher-D arrays.
compile: clang++ -O3 -DUSE_VC -march=native -std=c++11 -pthread -o gradient gradient.cc -lVc
(with Vc; use -DUSE_HWY and -lhwy for highway, or -std=c++17 and -DUSE_STDSIMD for the std::simd backend)
or clang++ -O3 -march=native -std=c++11 -pthread -o gradient gradient.cc
Definition in file gradient.cc.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 57 of file gradient.cc.