Go to the documentation of this file.
   23 using namespace gtsam;
 
   38 double timeCollect(
size_t p, 
size_t m, 
size_t n, 
bool passDims, 
size_t reps) {
 
   46   vector<const Matrix *> matrices;
 
   47   for (
size_t i=0; 
i<
p;++
i) {
 
   49     (*M) = Matrix::Identity(
m,
n);
 
   50     matrices.push_back(
M);
 
   60       for (
size_t i=0; 
i<reps; ++
i)
 
   63       for (
size_t i=0; 
i<reps; ++
i)
 
   72   for (
size_t i=0; 
i<
p;++
i) {
 
   90   for (
size_t i=0; 
i<
m; ++
i)
 
   91     for (
size_t j=0; 
j<
n; ++
j)
 
   96   for (
size_t i=0; 
i<
m; ++
i)
 
  104     for (
size_t i=0; 
i<reps; ++
i)
 
  126   for (
size_t i=0; 
i<
m; ++
i)
 
  127     for (
size_t j=0; 
j<
n; ++
j)
 
  132   for (
size_t i=0; 
i<
n; ++
i)
 
  140     for (
size_t i=0; 
i<reps; ++
i)
 
  163   size_t m = 100; 
size_t n = 100;
 
  165   for (
size_t i=0; 
i<
m; ++
i)
 
  166       for (
size_t j=0; 
j<
n; ++
j)
 
  175     for (
size_t i=0; 
i<reps; ++
i)
 
  176       for (
size_t j = 0; 
j<
n; ++
j)
 
  212       -5,  0, 5, 0,  0,  0,  -1,
 
  213       00, -5, 0, 5,  0,  0, 1.5,
 
  214       10,  0, 0, 0,-10,  0,   2,
 
  215       00, 10, 0, 0,  0,-10,  -1).finished();
 
  222     for (
size_t i=0; 
i<reps; ++
i) {
 
  243   Matrix bigBase = Matrix::Zero(100, 100);
 
  252     for (
size_t rep=0; rep<reps; ++rep)
 
  253       for (
size_t i=0; 
i<100; 
i += 5)
 
  254         for (
size_t j=0; 
j<100; 
j += 5)
 
  265 int main(
int argc, 
char ** argv) {
 
  268   cout << 
"Starting Matrix::collect() Timing" << endl;
 
  270   size_t p = 10; 
size_t m = 10; 
size_t n = 12; 
size_t reps = 10000000;
 
  273   cout << 
"Average Elapsed time for collect (no pass) [" << 
p << 
" (" << 
m << 
", " << 
n << 
") matrices] : " << collect_time1 << endl;
 
  274   cout << 
"Average Elapsed time for collect (pass)    [" << 
p << 
" (" << 
m << 
", " << 
n << 
") matrices] : " << collect_time2 << endl;
 
  277   cout << 
"Starting Matrix::vector_scale(column) Timing" << endl;
 
  278   size_t m1 = 400; 
size_t n1 = 480; 
size_t reps1 = 1000;
 
  280   cout << 
"Elapsed time for vector_scale(column) [(" << 
m1 << 
", " << 
n1 << 
") matrix] : " << vsColumn_time << endl;
 
  283   cout << 
"Starting Matrix::vector_scale(row)    Timing" << endl;
 
  285   cout << 
"Elapsed time for vector_scale(row)    [(" << 
m1 << 
", " << 
n1 << 
") matrix] : " << vsRow_time << endl;
 
  288   cout << 
"Starting column() Timing" << endl;
 
  289   size_t reps2 = 2000000;
 
  291   cout << 
"Time: " << column_time << 
" sec" << endl;
 
  294   cout << 
"Starting householder_() Timing" << endl;
 
  295   size_t reps_house = 5000000;
 
  297   cout << 
"Elapsed time for householder_() : " << house_time << 
" sec" << endl;
 
  300   cout << 
"Starting insertSub() Timing" << endl;
 
  301   size_t reps_insert = 200000;
 
  303   cout << 
"Elapsed time for insertSub() : " << insert_time << 
" sec" << endl;
 
  
const MATRIX::ConstColXpr column(const MATRIX &A, size_t j)
double timeColumn(size_t reps)
typedef and functions to augment Eigen's MatrixXd
State class representing the state of the Biased Attitude System.
int main(int argc, char **argv)
void householder_(Matrix &A, size_t k, bool copy_vectors)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
#define tictoc_getNode(variable, label)
double timeMatrixInsert(size_t reps)
Matrix vector_scale(const Vector &v, const Matrix &A, bool inf_mask)
static const std::vector< Vector3 > small
void insertSub(Eigen::MatrixBase< Derived1 > &fullMatrix, const Eigen::MatrixBase< Derived2 > &subMatrix, size_t i, size_t j)
double timeCollect(size_t p, size_t m, size_t n, bool passDims, size_t reps)
double timeVScaleColumn(size_t m, size_t n, size_t reps)
Matrix collect(const std::vector< const Matrix * > &matrices, size_t m, size_t n)
double timeHouseholder(size_t reps)
abc_eqf_lib::State< N > M
double timeVScaleRow(size_t m, size_t n, size_t reps)
gtsam
Author(s): 
autogenerated on Wed May 28 2025 03:08:00