Download include/eigen/bench/benchmarkXcwise.cpp from adfa5456/FastRobustICP: direct link, hf CLI and curl.
- Browser
- Download file 605 Bytes
-
https://huggingface.co/datasets/adfa5456/FastRobustICP/resolve/main/include/eigen/bench/benchmarkXcwise.cpp
- Command line
-
hf download hf://datasets/adfa5456/FastRobustICP/include/eigen/bench/benchmarkXcwise.cpp
-
curl -L -o benchmarkXcwise.cpp https://huggingface.co/datasets/adfa5456/FastRobustICP/resolve/main/include/eigen/bench/benchmarkXcwise.cpp
605 Bytes
| // g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX | |
| using namespace std; | |
| using namespace Eigen; | |
| int main(int argc, char *argv[]) | |
| { | |
| VECTYPE I = VECTYPE::Ones(VECSIZE); | |
| VECTYPE m(VECSIZE,1); | |
| for(int i = 0; i < VECSIZE; i++) | |
| { | |
| m[i] = 0.1 * i/VECSIZE; | |
| } | |
| for(int a = 0; a < REPEAT; a++) | |
| { | |
| m = VECTYPE::Ones(VECSIZE) + 0.00005 * (m.cwise().square() + m/4); | |
| } | |
| cout << m[0] << endl; | |
| return 0; | |
| } | |