/* * @file timeMatrix.cpp * @brief Performs timing and profiling for Matrix operations * @author Alex Cunningham */ #include #include #include "Matrix.h" using namespace std; using namespace gtsam; /* * Results: * Alex's Machine: * - (1st pass of simple changes) no pass: 0.184 sec , pass: 0.181 sec * - (1st rev memcpy) no pass: 0.181 sec , pass: 0.180 sec * - (1st rev matrix_range) no pass: 0.186 sec , pass: 0.184 sec */ double timeCollect(size_t p, size_t m, size_t n, bool passDims, size_t reps) { // create a large number of matrices // p = number of matrices // m = rows per matrix // n = columns per matrix // reps = number of repetitions // fill the matrices with identities vector matrices; for (int i=0; i