From 13c3327f5cf829fd9d04a2ab46861e722cd74ca0 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Tue, 12 Nov 2019 10:12:28 -0800 Subject: Remove legacy block evaluation support --- .../Eigen/CXX11/src/Tensor/TensorGenerator.h | 55 ---------------------- 1 file changed, 55 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h b/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h index 7f57281a0..77fa32dc7 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h @@ -93,7 +93,6 @@ struct TensorEvaluator, Device> enum { IsAligned = false, PacketAccess = (PacketType::size > 1), - BlockAccess = true, BlockAccessV2 = true, PreferBlockAccess = true, Layout = TensorEvaluator::Layout, @@ -183,60 +182,6 @@ struct TensorEvaluator, Device> Index count; }; - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void block( - TensorBlock* output_block) const { - if (NumDims <= 0) return; - - static const bool is_col_major = - static_cast(Layout) == static_cast(ColMajor); - - // Compute spatial coordinates for the first block element. - array coords; - extract_coordinates(output_block->first_coeff_index(), coords); - array initial_coords = coords; - - CoeffReturnType* data = output_block->data(); - Index offset = 0; - - // Initialize output block iterator state. Dimension in this array are - // always in inner_most -> outer_most order (col major layout). - array it; - for (Index i = 0; i < NumDims; ++i) { - const Index dim = is_col_major ? i : NumDims - 1 - i; - it[i].size = output_block->block_sizes()[dim]; - it[i].stride = output_block->block_strides()[dim]; - it[i].span = it[i].stride * (it[i].size - 1); - it[i].count = 0; - } - eigen_assert(it[0].stride == 1); - - while (it[NumDims - 1].count < it[NumDims - 1].size) { - // Generate data for the inner-most dimension. - for (Index i = 0; i < it[0].size; ++i) { - *(data + offset + i) = m_generator(coords); - coords[is_col_major ? 0 : NumDims - 1]++; - } - coords[is_col_major ? 0 : NumDims - 1] = - initial_coords[is_col_major ? 0 : NumDims - 1]; - - // For the 1d tensor we need to generate only one inner-most dimension. - if (NumDims == 1) break; - - // Update offset. - for (Index i = 1; i < NumDims; ++i) { - if (++it[i].count < it[i].size) { - offset += it[i].stride; - coords[is_col_major ? i : NumDims - 1 - i]++; - break; - } - if (i != NumDims - 1) it[i].count = 0; - coords[is_col_major ? i : NumDims - 1 - i] = - initial_coords[is_col_major ? i : NumDims - 1 - i]; - offset -= it[i].span; - } - } - } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockV2 blockV2(TensorBlockDesc& desc, TensorBlockScratch& scratch, bool /*root_of_expr_ast*/ = false) const { -- cgit v1.2.3