fmat
/fvec
) and 64-bit floating-point precision (i.e. mat
/vec
)
accu()
(accumulate elements of vector)// N is specified externally // when using Armadillo, 'using namespace arma' is used // when using Bandicoot, 'using namespace coot' is used fvec f(N); f.randu(); coot_synchronise(); // applicable only to Bandicoot wall_clock c; c.tic(); float result = accu(c); coot_synchronise(); // applicable only to Bandicoot const double time = c.toc();
// N is specified externally // when using Armadillo, 'using namespace arma' is used // when using Bandicoot, 'using namespace coot' is used fvec A(N, fill::randu); fvec B(N, fill::randu); coot_synchronise(); // applicable only to Bandicoot wall_clock c; c.tic(); B += 3 * A; coot_synchronise(); // applicable only to Bandicoot const double time = c.toc();
// N is specified externally // when using Armadillo, 'using namespace arma' is used // when using Bandicoot, 'using namespace coot' is used fmat A(N, N, fill::randu); fmat B(N, N, fill::randu); coot_synchronise(); // applicable only to Bandicoot wall_clock c; c.tic(); fmat C = A * B; coot_synchronise(); // applicable only to Bandicoot const double time = c.toc();
// N is specified externally // when using Armadillo, 'using namespace arma' is used // when using Bandicoot, 'using namespace coot' is used fmat A(N, N, fill::randu); coot_synchronise(); // applicable only to Bandicoot wall_clock c; c.tic(); fmat L, U; lu(L, U, A); coot_synchronise(); // applicable only to Bandicoot const double time = c.toc();