Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120301691
bench_sum.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 09:57
Size
320 B
Mime Type
text/x-c
Expires
Sat, Jul 5, 09:57 (2 d)
Engine
blob
Format
Raw Data
Handle
27169444
Attached To
rDLMA Diffusion limited mixed aggregation
bench_sum.cpp
View Options
#include <iostream>
#include <Eigen/Core>
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;
}
Event Timeline
Log In to Comment