Go to the documentation of this file.
4 #include <Eigen/Geometry>
11 #define REPEAT 1000000
22 template <
class res,
class arg1,
class arg2,
int opt>
25 template <
class res,
class arg1,
class arg2>
35 template <
class res,
class arg1,
class arg2>
41 return a1.matrix() *
a2;
45 template <
class res,
class arg1,
class arg2>
51 return res(
a1.matrix() *
a2.matrix());
55 template <
class func,
class arg1,
class arg2>
67 for (
int k=0; k<10; ++k)
70 for (
int k=0; k<
REPEAT; ++k)
74 cout << setprecision(4) << fixed <<
timer.
value() <<
"s " << endl;;
79 #define run_vec( op, scalar, mode, option, vsize ) \
80 std::cout << #scalar << "\t " << #mode << "\t " << #option << " " << #vsize " "; \
82 typedef Transform<scalar, 3, mode, option> Trans;\
83 typedef Matrix<scalar, vsize, 1, option> Vec;\
84 typedef func<Vec,Trans,Vec,op> Func;\
85 test_transform< Func, Trans, Vec >::run();\
88 #define run_trans( op, scalar, mode, option ) \
89 std::cout << #scalar << "\t " << #mode << "\t " << #option << " "; \
91 typedef Transform<scalar, 3, mode, option> Trans;\
92 typedef func<Trans,Trans,Trans,op> Func;\
93 test_transform< Func, Trans, Trans >::run();\
96 int main(
int argc,
char* argv[])
98 cout <<
"vec = trans * vec" << endl;
112 cout <<
"vec = trans.matrix() * vec" << endl;
118 cout <<
"trans = trans1 * trans" << endl;
128 cout <<
"trans = trans1.matrix() * trans.matrix()" << endl;
#define run_trans(op, scalar, mode, option)
Namespace containing all symbols from the Eigen library.
static EIGEN_DONT_INLINE res run(arg1 &a1, arg2 &a2)
#define run_vec(op, scalar, mode, option, vsize)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
double value(int TIMER=CPU_TIMER) const
int main(int argc, char *argv[])
static EIGEN_DONT_INLINE res run(arg1 &a1, arg2 &a2)
static EIGEN_DONT_INLINE res run(arg1 &a1, arg2 &a2)
#define EIGEN_DONT_INLINE
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:00