Download include/eigen/bench/bench_sum.cpp from adfa5456/FastRobustICP: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/datasets/adfa5456/FastRobustICP/resolve/main/include/eigen/bench/bench_sum.cpp
- Command line
-
hf download hf://datasets/adfa5456/FastRobustICP/include/eigen/bench/bench_sum.cpp
-
curl -L -o bench_sum.cpp https://huggingface.co/datasets/adfa5456/FastRobustICP/resolve/main/include/eigen/bench/bench_sum.cpp
320 Bytes
| using namespace Eigen; | |
| using namespace std; | |
| int main() | |
| { | |
| typedef Matrix<SCALAR,Eigen::Dynamic,1> Vec; | |
| Vec v(SIZE); | |
| v.setZero(); | |
| v[0] = 1; | |
| v[1] = 2; | |
| for(int i = 0; i < 1000000; i++) | |
| { | |
| v.coeffRef(0) += v.sum() * SCALAR(1e-20); | |
| } | |
| cout << v.sum() << endl; | |
| } | |