Bugzilla – Attachment 847 Details for
Bug 1494
Test case test_minmax_nan_propagation from cxx11_tensor_expr fails on PPC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
mini benchmark for pmin
perf_minmax.cpp (text/x-csrc), 1.03 KB, created by
Gael Guennebaud
on 2018-04-04 21:12:09 UTC
(
hide
)
Description:
mini benchmark for pmin
Filename:
MIME Type:
Creator:
Gael Guennebaud
Created:
2018-04-04 21:12:09 UTC
Size:
1.03 KB
patch
obsolete
>#include <iostream> >#include <Eigen/Dense> >#include <bench/BenchTimer.h> >using namespace Eigen; >using namespace std; > >template<typename T> >EIGEN_DONT_INLINE >void coeffwise(const T &a, const T &b, T& c) >{ > c = a.min(b); >} > >template<typename T> >EIGEN_DONT_INLINE >typename T::Scalar redux(const T &a) >{ > return a.minCoeff(); >} > >int main() >{ > int tries = 10000; > int rep = 100; > int n = 1000; > ArrayXf a(n), b(n), c(n); > a.setRandom(); > b.setRandom(); > c.setRandom(); > BenchTimer t; > BENCH(t, tries, rep, coeffwise(a, b, c)); > std::cout << "coeffwise: " << t.best() << "s | " << c.sum() << std::endl; > > BENCH(t, tries, rep, b[0]+=redux(a)); > std::cout << "redux: " << t.best() << "s | " << b[0] << std::endl; >} > > >/* > >// POWER7 > >// vec_min >coeffwise: 2.6218e-05s | -318.279 >redux: 2.2514e-05s | -999804 > >// asm >coeffwise: 2.9966e-05s | -318.279 >redux: 4.3434e-05s | -999804 > > >// POWER 8 > >// vec_min >coeffwise: 2.2198e-05s | -318.279 >redux: 1.5742e-05s | -999804 > >// asm >coeffwise: 2.8444e-05s | -318.279 >redux: 2.3142e-05s | -999804 > >*/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1494
:
831
|
846
| 847