Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
Eigen
bench
bench_sum.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <Eigen/Core>
3
using namespace
Eigen
;
4
using namespace
std
;
5
6
int
main
()
7
{
8
typedef
Matrix<SCALAR,Eigen::Dynamic,1>
Vec
;
9
Vec
v
(
SIZE
);
10
v.
setZero
();
11
v[0] = 1;
12
v[1] = 2;
13
for
(
int
i
= 0;
i
< 1000000;
i
++)
14
{
15
v.
coeffRef
(0) += v.sum() *
SCALAR
(1
e
-20);
16
}
17
cout << v.sum() << endl;
18
}
main
int main()
Definition:
bench_sum.cpp:6
Eigen::PlainObjectBase::setZero
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Definition:
CwiseNullaryOp.h:515
v
ArrayXcf v
Definition:
Cwise_arg.cpp:1
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
std
Definition:
Half.h:150
Eigen::PlainObjectBase::coeffRef
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Definition:
PlainObjectBase.h:183
SIZE
#define SIZE
Definition:
BenchSparseUtil.h:11
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
SCALAR
#define SCALAR
Definition:
bench_gemm.cpp:22
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition:
3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
i
int i
Definition:
BiCGSTAB_step_by_step.cpp:9
Vec
Matrix< SCALAR, Eigen::Dynamic, 1 > Vec
Definition:
vdw_new.cpp:18
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:41