Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102454462
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, Feb 20, 22:02
Size
320 B
Mime Type
text/x-c
Expires
Sat, Feb 22, 22:02 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24324351
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