diff options
Diffstat (limited to 'Eigen/src/Core/PlainObjectBase.h')
-rw-r--r-- | Eigen/src/Core/PlainObjectBase.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index ca5b5ee1d..e53ca1b16 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -118,16 +118,8 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type using Base::IsVectorAtCompileTime; using Base::Flags; - template<typename PlainObjectType, int MapOptions, typename StrideType> friend class Eigen::Map; - friend class Eigen::Map<Derived, Unaligned>; typedef Eigen::Map<Derived, Unaligned> MapType; - friend class Eigen::Map<const Derived, Unaligned>; typedef const Eigen::Map<const Derived, Unaligned> ConstMapType; -#if EIGEN_MAX_ALIGN_BYTES>0 - // for EIGEN_MAX_ALIGN_BYTES==0, AlignedMax==Unaligned, and many compilers generate warnings for friend-ing a class twice. - friend class Eigen::Map<Derived, AlignedMax>; - friend class Eigen::Map<const Derived, AlignedMax>; -#endif typedef Eigen::Map<Derived, AlignedMax> AlignedMapType; typedef const Eigen::Map<const Derived, AlignedMax> ConstAlignedMapType; template<typename StrideType> struct StridedMapType { typedef Eigen::Map<Derived, Unaligned, StrideType> type; }; @@ -989,6 +981,17 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type enum { IsPlainObjectBase = 1 }; #endif + public: + // These apparently need to be down here for nvcc+icc to prevent duplicate + // Map symbol. + template<typename PlainObjectType, int MapOptions, typename StrideType> friend class Eigen::Map; + friend class Eigen::Map<Derived, Unaligned>; + friend class Eigen::Map<const Derived, Unaligned>; +#if EIGEN_MAX_ALIGN_BYTES>0 + // for EIGEN_MAX_ALIGN_BYTES==0, AlignedMax==Unaligned, and many compilers generate warnings for friend-ing a class twice. + friend class Eigen::Map<Derived, AlignedMax>; + friend class Eigen::Map<const Derived, AlignedMax>; +#endif }; namespace internal { |