diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-03-24 13:12:14 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-03-24 13:12:14 -0700 |
commit | d3f7915aeb5fb08da7961cfb0160561ec0cf56bb (patch) | |
tree | adf1d716f3ebd09540728776b719bfe8cdb1a022 /unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h | |
parent | 0196141938e5f988308eab82450cf283dacdf844 (diff) | |
parent | abdbe8562e889a0ca0877d607cfd5c4cbf937e3a (diff) |
Pulled latest update from the eigen main codebase
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h b/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h index 9a35b044d..0745b1742 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h @@ -65,7 +65,7 @@ struct traits<Tensor<Scalar_, NumIndices_, Options_> > static const int Layout = Options_ & RowMajor ? RowMajor : ColMajor; enum { Options = Options_, - Flags = compute_tensor_flags<Scalar_, Options_>::ret | LvalueBit, + Flags = compute_tensor_flags<Scalar_, Options_>::ret | (is_const<Scalar_>::value ? 0 : LvalueBit), }; }; @@ -80,7 +80,7 @@ struct traits<TensorFixedSize<Scalar_, Dimensions, Options_> > static const int Layout = Options_ & RowMajor ? RowMajor : ColMajor; enum { Options = Options_, - Flags = compute_tensor_flags<Scalar_, Options_>::ret | LvalueBit, + Flags = compute_tensor_flags<Scalar_, Options_>::ret | (is_const<Scalar_>::value ? 0: LvalueBit), }; }; @@ -97,7 +97,7 @@ struct traits<TensorMap<PlainObjectType, Options_> > static const int Layout = BaseTraits::Layout; enum { Options = Options_, - Flags = ((BaseTraits::Flags | LvalueBit) & ~AlignedBit) | (Options&Aligned ? AlignedBit : 0), + Flags = (BaseTraits::Flags & ~AlignedBit) | (Options&Aligned ? AlignedBit : 0), }; }; @@ -113,7 +113,7 @@ struct traits<TensorRef<PlainObjectType> > static const int Layout = BaseTraits::Layout; enum { Options = BaseTraits::Options, - Flags = ((BaseTraits::Flags | LvalueBit) & ~AlignedBit) | (Options&Aligned ? AlignedBit : 0), + Flags = (BaseTraits::Flags & ~AlignedBit) | (Options&Aligned ? AlignedBit : 0), }; }; |