performance test. The test is twofold: one aspect is the 'fidelity' of the filtering operations: if we repeatedly prefilter and restore the data, how badly do they suffer, given different data types? The second question is, how long does a prefilter-restore cycle take (roughly)?
More...
#include <vigra/multi_array.hxx>
#include <vigra/accumulator.hxx>
#include <vigra/multi_math.hxx>
#include <iostream>
#include <typeinfo>
#include <random>
#include <ctime>
#include <chrono>
#include <vspline/vspline.h>
Go to the source code of this file.
|
template<class T > |
using | is_singular = typename std::conditional< std::is_fundamental< T > ::value, std::true_type, std::false_type > ::type |
|
|
template<typename T > |
double | condense (const T &t, std::true_type) |
|
template<typename T > |
double | condense (const T &t, std::false_type) |
|
template<typename T > |
double | condense (const std::complex< T > &t, std::false_type) |
|
template<typename T > |
double | condense (const T &t) |
|
template<int dim, typename T > |
double | check_diff (vigra::MultiArrayView< dim, T > &reference, vigra::MultiArrayView< dim, T > &candidate) |
|
template<int dim, typename T , typename math_ele_type > |
void | grind_test (vigra::TinyVector< int, dim > shape, vspline::bc_code bc, int spline_degree) |
| create an array of random data ditributed between -1 and 1. Then repeatedly prefilter and restore the data, and check the difference between the restored and original data, plus the time needed to do the processing. This test shows that for higher-degree splines, arithmetic precision becomes an issue, and using floats becomes futile. But it also shows that using double data and operating in double precision does not cost too much more processing time. keeping the data in float and using double maths does not help. More...
|
|
int | main (int argc, char *argv[]) |
|
performance test. The test is twofold: one aspect is the 'fidelity' of the filtering operations: if we repeatedly prefilter and restore the data, how badly do they suffer, given different data types? The second question is, how long does a prefilter-restore cycle take (roughly)?
Definition in file grind.cc.
◆ is_singular
template<class T >
using is_singular = typename std::conditional < std::is_fundamental < T > :: value , std::true_type , std::false_type > :: type |
◆ check_diff()
template<int dim, typename T >
double check_diff |
( |
vigra::MultiArrayView< dim, T > & |
reference, |
|
|
vigra::MultiArrayView< dim, T > & |
candidate |
|
) |
| |
◆ condense() [1/4]
template<typename T >
double condense |
( |
const std::complex< T > & |
t, |
|
|
std::false_type |
|
|
) |
| |
◆ condense() [2/4]
template<typename T >
double condense |
( |
const T & |
t | ) |
|
◆ condense() [3/4]
template<typename T >
double condense |
( |
const T & |
t, |
|
|
std::false_type |
|
|
) |
| |
◆ condense() [4/4]
template<typename T >
double condense |
( |
const T & |
t, |
|
|
std::true_type |
|
|
) |
| |
◆ grind_test()
template<int dim, typename T , typename math_ele_type >
void grind_test |
( |
vigra::TinyVector< int, dim > |
shape, |
|
|
vspline::bc_code |
bc, |
|
|
int |
spline_degree |
|
) |
| |
create an array of random data ditributed between -1 and 1. Then repeatedly prefilter and restore the data, and check the difference between the restored and original data, plus the time needed to do the processing. This test shows that for higher-degree splines, arithmetic precision becomes an issue, and using floats becomes futile. But it also shows that using double data and operating in double precision does not cost too much more processing time. keeping the data in float and using double maths does not help.
Definition at line 142 of file grind.cc.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ verbose