aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h
diff options
context:
space:
mode:
authorGravatar Eugene Zhulenev <ezhulenev@google.com>2019-12-10 11:58:30 -0800
committerGravatar Eugene Zhulenev <ezhulenev@google.com>2019-12-10 14:31:44 -0800
commitdbca11e8805ec07660d8f966a1884ad0be302f15 (patch)
tree9da1438132a9a40de7ca3abafec2e559eb0449e3 /unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h
parentc49f0d851ab77c9e4d782b453b4b0428bce903d3 (diff)
Remove TensorBlock.h and old TensorBlock/BlockMapper
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h
index 9b835c4de..268c3246a 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h
@@ -447,13 +447,6 @@ struct TensorEvaluator<TensorChippingOp<DimId, ArgType>, Device>
RawAccess = false
};
- typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
-
- typedef internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>
- InputTensorBlock;
- typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
- OutputTensorBlock;
-
//===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//
typedef internal::TensorBlockDescriptor<NumDims, Index> TensorBlockDesc;
//===--------------------------------------------------------------------===//
@@ -506,50 +499,6 @@ struct TensorEvaluator<TensorChippingOp<DimId, ArgType>, Device>
}
}
- EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(
- const OutputTensorBlock& output_block) {
- // Calculate input block sizes.
- const DSizes<Index, NumDims>& output_block_sizes =
- output_block.block_sizes();
- const DSizes<Index, NumDims>& output_block_strides =
- output_block.block_strides();
- const Index chip_dim = this->m_dim.actualDim();
- DSizes<Index, NumInputDims> input_block_sizes;
- DSizes<Index, NumInputDims> input_block_strides;
- for (Index i = 0; i < NumInputDims; ++i) {
- if (i < chip_dim) {
- input_block_sizes[i] = output_block_sizes[i];
- input_block_strides[i] = output_block_strides[i];
- } else if (i > chip_dim) {
- input_block_sizes[i] = output_block_sizes[i - 1];
- input_block_strides[i] = output_block_strides[i - 1];
- } else {
- input_block_sizes[i] = 1;
- }
- }
- // Fix up input_block_stride for chip dimension.
- if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {
- if (chip_dim == 0) {
- input_block_strides[chip_dim] = 1;
- } else {
- input_block_strides[chip_dim] =
- input_block_strides[chip_dim - 1] * input_block_sizes[chip_dim - 1];
- }
- } else {
- if (chip_dim == NumInputDims - 1) {
- input_block_strides[chip_dim] = 1;
- } else {
- input_block_strides[chip_dim] =
- input_block_strides[chip_dim + 1] * input_block_sizes[chip_dim + 1];
- }
- }
- // Write input block.
- this->m_impl.writeBlock(InputTensorBlock(
- this->srcCoeff(output_block.first_coeff_index()), input_block_sizes,
- input_block_strides, this->m_inputStrides,
- const_cast<ScalarNoConst*>(output_block.data())));
- }
-
template <typename TensorBlockV2>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlockV2(
const TensorBlockDesc& desc, const TensorBlockV2& block) {