diff options
author | 2014-07-02 09:35:37 +0200 | |
---|---|---|
committer | 2014-07-02 09:35:37 +0200 | |
commit | 61b88d2feb8f23d1ba122f2c9a73abb183ebb25d (patch) | |
tree | da8fbb7e88c6668bbf4b63e2c988697d95f9f2de /Eigen/src/Core/PlainObjectBase.h | |
parent | 8f4cdbbc8f9b2214b906412701722a150cba3460 (diff) | |
parent | bf334b8ae51725754f525c2ffcfbd83ffc55ff2e (diff) |
merge with default branch
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index c31bfbc8c..a81bf3540 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -711,6 +711,55 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type m_storage.data()[1] = val1; } + template<typename T> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if<Base::SizeAtCompileTime!=1,T>::type* = 0) + { + EIGEN_STATIC_ASSERT(bool(NumTraits<T>::IsInteger), + FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED) + resize(size); + } + template<typename T> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const Scalar& val0, typename internal::enable_if<Base::SizeAtCompileTime==1,T>::type* = 0) + { + EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1) + m_storage.data()[0] = val0; + } + + template<typename T> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const Scalar* data){ + this->_set_noalias(ConstMapType(data)); + } + + template<typename T, typename OtherDerived> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const DenseBase<OtherDerived>& other){ + this->_set_noalias(other); + } + + template<typename T, typename OtherDerived> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const EigenBase<OtherDerived>& other){ + this->derived() = other; + } + + template<typename T, typename OtherDerived> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const ReturnByValue<OtherDerived>& other) + { + resize(other.rows(), other.cols()); + other.evalTo(this->derived()); + } + + template<typename T, typename OtherDerived, int ColsAtCompileTime> + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE void _init1(const RotationBase<OtherDerived,ColsAtCompileTime>& r) + { + this->derived() = r; + } + template<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers> friend struct internal::matrix_swap_impl; |