mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Improved the performance of tensor padding
This commit is contained in:
@@ -178,9 +178,14 @@ template <typename Device, typename T> class BenchmarkSuite {
|
||||
size_b[1] = m_;
|
||||
TensorMap<Tensor<T, 2>, Eigen::Aligned> B(b_, size_b);
|
||||
|
||||
#if defined(EIGEN_HAS_INDEX_LIST)
|
||||
Eigen::IndexPairList<Eigen::type2indexpair<0, 0>,
|
||||
Eigen::type2indexpair<2, 1> > paddings;
|
||||
#else
|
||||
Eigen::array<Eigen::IndexPair<TensorIndex>, 2> paddings;
|
||||
paddings[0] = Eigen::IndexPair<TensorIndex>(0, 0);
|
||||
paddings[1] = Eigen::IndexPair<TensorIndex>(2, 1);
|
||||
#endif
|
||||
|
||||
StartBenchmarkTiming();
|
||||
for (int iter = 0; iter < num_iters; ++iter) {
|
||||
|
||||
Reference in New Issue
Block a user