mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Use index list for the striding benchmarks
This commit is contained in:
parent
f670613e4b
commit
79b900375f
@ -201,9 +201,15 @@ template <typename Device, typename T> class BenchmarkSuite {
|
|||||||
size_b[1] = k_/2;
|
size_b[1] = k_/2;
|
||||||
TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, size_b);
|
TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, size_b);
|
||||||
|
|
||||||
|
#ifndef EIGEN_HAS_INDEX_LIST
|
||||||
Eigen::array<TensorIndex, 2> strides;
|
Eigen::array<TensorIndex, 2> strides;
|
||||||
strides[0] = 1;
|
strides[0] = 1;
|
||||||
strides[1] = 2;
|
strides[1] = 2;
|
||||||
|
#else
|
||||||
|
// Take advantage of cxx11 to give the compiler information it can use to
|
||||||
|
// optimize the code.
|
||||||
|
Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> > strides;
|
||||||
|
#endif
|
||||||
|
|
||||||
StartBenchmarkTiming();
|
StartBenchmarkTiming();
|
||||||
for (int iter = 0; iter < num_iters; ++iter) {
|
for (int iter = 0; iter < num_iters; ++iter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user