From 1c879eb010df8e53e5ac016ee5d155db2c721c2b Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Tue, 10 Dec 2019 15:40:23 -0800 Subject: Remove V2 suffix from TensorBlock --- .../Eigen/CXX11/src/Tensor/TensorBroadcasting.h | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h index 454b0f752..620c8741c 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h @@ -114,7 +114,7 @@ struct TensorEvaluator, Device> enum { IsAligned = true, PacketAccess = TensorEvaluator::PacketAccess, - BlockAccessV2 = TensorEvaluator::BlockAccessV2, + BlockAccess = TensorEvaluator::BlockAccess, PreferBlockAccess = true, Layout = TensorEvaluator::Layout, RawAccess = false @@ -130,12 +130,12 @@ struct TensorEvaluator, Device> typedef internal::TensorBlockDescriptor TensorBlockDesc; typedef internal::TensorBlockScratchAllocator TensorBlockScratch; - typedef typename TensorEvaluator::TensorBlockV2 + typedef typename TensorEvaluator::TensorBlock ArgTensorBlock; typedef typename internal::TensorMaterializedBlock - TensorBlockV2; + TensorBlock; //===--------------------------------------------------------------------===// EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, @@ -617,19 +617,19 @@ struct TensorEvaluator, Device> } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - internal::TensorBlockV2ResourceRequirements getResourceRequirements() const { + internal::TensorBlockResourceRequirements getResourceRequirements() const { // TODO(wuke): Targeting L1 size is 30% faster than targeting L{-1} on large // tensors. But this might need further tuning. const size_t target_block_size = numext::maxi( 1, m_device.firstLevelCacheSize() / sizeof(Scalar)); - return internal::TensorBlockV2ResourceRequirements::merge( - {internal::TensorBlockV2ShapeType::kSkewedInnerDims, target_block_size}, + return internal::TensorBlockResourceRequirements::merge( + {internal::TensorBlockShapeType::kSkewedInnerDims, target_block_size}, m_impl.getResourceRequirements()); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockV2 - blockV2(TensorBlockDesc& desc, TensorBlockScratch& scratch, + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock + block(TensorBlockDesc& desc, TensorBlockScratch& scratch, bool /*root_of_expr_ast*/ = false) const { BlockBroadcastingParams params = blockBroadcastingParams(desc); @@ -638,8 +638,8 @@ struct TensorEvaluator, Device> } // Prepare storage for the materialized broadcasting result. - const typename TensorBlockV2::Storage block_storage = - TensorBlockV2::prepareStorage(desc, scratch); + const typename TensorBlock::Storage block_storage = + TensorBlock::prepareStorage(desc, scratch); ScalarNoConst* materialized_output = block_storage.data(); // We potentially will need to materialize input blocks. @@ -843,10 +843,10 @@ struct TensorEvaluator, Device> return params; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockV2 emptyBlock() const { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock emptyBlock() const { DSizes dimensions; for (int i = 0; i < NumDims; ++i) dimensions[i] = 0; - return TensorBlockV2(internal::TensorBlockKind::kView, NULL, dimensions); + return TensorBlock(internal::TensorBlockKind::kView, NULL, dimensions); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index BroadcastBlockAlongBcastDim( @@ -856,7 +856,7 @@ struct TensorEvaluator, Device> size_t* materialized_input_size) const { if (params.bcast_dim_size == 1) { // We just need one block read using the ready-set values above. - return BroadcastBlockV2( + return BroadcastBlock( params.input_block_sizes, params.input_block_strides, params.bcast_block_sizes, params.bcast_block_strides, params.bcast_input_strides, bcast_offset, 0, scratch, @@ -873,7 +873,7 @@ struct TensorEvaluator, Device> params.bcast_block_strides[broadcast_bcast_dim] = params.output_strides[params.bcast_dim]; - return BroadcastBlockV2( + return BroadcastBlock( params.input_block_sizes, params.input_block_strides, params.bcast_block_sizes, params.bcast_block_strides, params.bcast_input_strides, bcast_offset, 0, scratch, @@ -942,7 +942,7 @@ struct TensorEvaluator, Device> params.output_strides[params.bcast_dim] * params.input_dims[params.bcast_dim]; - num_output_coeffs += BroadcastBlockV2( + num_output_coeffs += BroadcastBlock( params.input_block_sizes, params.input_block_strides, params.bcast_block_sizes, params.bcast_block_strides, params.bcast_input_strides, bcast_offset, 0, scratch, @@ -964,7 +964,7 @@ struct TensorEvaluator, Device> const Index offset = (first_multiple - bcast_dim_left_index) * m_outputStrides[params.bcast_dim]; - num_output_coeffs += BroadcastBlockV2( + num_output_coeffs += BroadcastBlock( params.input_block_sizes, params.input_block_strides, params.bcast_block_sizes, params.bcast_block_strides, params.bcast_input_strides, bcast_offset, offset, scratch, @@ -987,7 +987,7 @@ struct TensorEvaluator, Device> const Index offset = (last_multiple - bcast_dim_left_index) * m_outputStrides[params.bcast_dim]; - num_output_coeffs += BroadcastBlockV2( + num_output_coeffs += BroadcastBlock( params.input_block_sizes, params.input_block_strides, params.bcast_block_sizes, params.bcast_block_strides, params.bcast_input_strides, bcast_offset, offset, scratch, @@ -1005,7 +1005,7 @@ struct TensorEvaluator, Device> params.bcast_block_strides[copy_bcast_dim] = params.output_strides[params.bcast_dim]; - num_output_coeffs += BroadcastBlockV2( + num_output_coeffs += BroadcastBlock( params.input_block_sizes, params.input_block_strides, params.bcast_block_sizes, params.bcast_block_strides, params.bcast_input_strides, bcast_offset, 0, scratch, @@ -1016,7 +1016,7 @@ struct TensorEvaluator, Device> } } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index BroadcastBlockV2( + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index BroadcastBlock( const Dimensions& input_block_sizes, const Dimensions& input_block_strides, const BroadcastDimensions& bcast_block_sizes, @@ -1032,7 +1032,7 @@ struct TensorEvaluator, Device> IsColMajor ? indexColMajor(input_offset) : indexRowMajor(input_offset), input_block_sizes); - ArgTensorBlock input_block = m_impl.blockV2(input_desc, scratch); + ArgTensorBlock input_block = m_impl.block(input_desc, scratch); // ---------------------------------------------------------------------- // // Materialize input block into a temporary memory buffer only if it's not @@ -1071,14 +1071,14 @@ struct TensorEvaluator, Device> // ---------------------------------------------------------------------- // // Copy data from materialized input block to the materialized output, using // given broadcast strides (strides with zeroes). - typedef internal::TensorBlockIOV2 - TensorBlockIOV2; + typedef internal::TensorBlockIO + TensorBlockIO; - typename TensorBlockIOV2::Src src(bcast_input_strides, input_buffer); - typename TensorBlockIOV2::Dst dst(bcast_block_sizes, bcast_block_strides, + typename TensorBlockIO::Src src(bcast_input_strides, input_buffer); + typename TensorBlockIO::Dst dst(bcast_block_sizes, bcast_block_strides, materialized_output + offset); - return TensorBlockIOV2::Copy(dst, src); + return TensorBlockIO::Copy(dst, src); } protected: -- cgit v1.2.3