diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2018-08-09 09:44:07 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2018-08-09 09:44:07 -0700 |
commit | cfaedb38cd662def3b5684a20965b3bc1b0d6a3f (patch) | |
tree | 82dc639a1f91a2eebd9d1afb777945dd8830ff70 /unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h | |
parent | 1c8b9e10a791cb43b4f730dcb5d7889099cc1c68 (diff) |
Fix bug in a test + compilation errors
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h index d5b0c1237..b25c1eabc 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h @@ -520,6 +520,7 @@ struct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Devi typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout> TensorBlock; + typedef typename TensorBlock::Dimensions TensorBlockDimensions; EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device) : m_impl(op.expression(), device), m_device(device), m_dimensions(op.sizes()), m_offsets(op.startIndices()) @@ -687,7 +688,7 @@ struct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Devi TensorBlock input_block(srcCoeff(output_block->first_coeff_index()), output_block->block_sizes(), output_block->block_strides(), - Dimensions(m_inputStrides), + TensorBlockDimensions(m_inputStrides), output_block->data()); m_impl.block(&input_block); } @@ -796,6 +797,7 @@ struct TensorEvaluator<TensorSlicingOp<StartIndices, Sizes, ArgType>, Device> typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout> TensorBlock; + typedef typename TensorBlock::Dimensions TensorBlockDimensions; EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device) : Base(op, device) @@ -862,13 +864,11 @@ struct TensorEvaluator<TensorSlicingOp<StartIndices, Sizes, ArgType>, Device> const TensorBlock& block) { this->m_impl.writeBlock(TensorBlock( this->srcCoeff(block.first_coeff_index()), block.block_sizes(), - block.block_strides(), Dimensions(this->m_inputStrides), + block.block_strides(), TensorBlockDimensions(this->m_inputStrides), const_cast<ScalarNoConst*>(block.data()))); } }; - - namespace internal { template<typename StartIndices, typename StopIndices, typename Strides, typename XprType> struct traits<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprType> > : public traits<XprType> |