MCPcopy Create free account
hub / github.com/PX4/eigen / check_accuracy

Function check_accuracy

bench/bench_norm.cpp:246–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void check_accuracy(double basef, double based, int s)
247{
248 double yf = basef * std::abs(internal::random<double>());
249 double yd = based * std::abs(internal::random<double>());
250 VectorXf vf = VectorXf::Ones(s) * yf;
251 VectorXd vd = VectorXd::Ones(s) * yd;
252
253 std::cout << "reference\t" << std::sqrt(double(s))*yf << "\t" << std::sqrt(double(s))*yd << "\n";
254 std::cout << "sqsumNorm\t" << sqsumNorm(vf) << "\t" << sqsumNorm(vd) << "\n";
255 std::cout << "hypotNorm\t" << hypotNorm(vf) << "\t" << hypotNorm(vd) << "\n";
256 std::cout << "blueNorm\t" << blueNorm(vf) << "\t" << blueNorm(vd) << "\n";
257 std::cout << "pblueNorm\t" << pblueNorm(vf) << "\t" << pblueNorm(vd) << "\n";
258 std::cout << "lapackNorm\t" << lapackNorm(vf) << "\t" << lapackNorm(vd) << "\n";
259 std::cout << "twopassNorm\t" << twopassNorm(vf) << "\t" << twopassNorm(vd) << "\n";
260 std::cout << "bl2passNorm\t" << bl2passNorm(vf) << "\t" << bl2passNorm(vd) << "\n";
261}
262
263void check_accuracy_var(int ef0, int ef1, int ed0, int ed1, int s)
264{

Callers 1

mainFunction · 0.85

Calls 2

absFunction · 0.50
sqrtFunction · 0.50

Tested by

no test coverage detected