Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # HG changeset patch
- # User Aron Ahmadia <aron.ahmadia@kaust.edu.sa>
- # Date 1264189993 -10800
- # Node ID 0f1f2b9c85e201b1cef8867ccb30f5510cd551e9
- # Parent 2f0c3dd8b98818a5dec9b37d251614217142aedb
- Just touching a few files in the Eigen repository to show how adding compatibility
- with the IBM XLC compilers would affect the source code
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/AnyMatrixBase.h
- --- a/Eigen/src/Core/AnyMatrixBase.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/AnyMatrixBase.h Fri Jan 22 22:53:13 2010 +0300
- @@ -35,7 +35,8 @@
- *
- * Notice that this class is trivial, it is only used to disambiguate overloaded functions.
- */
- -template<typename Derived> struct AnyMatrixBase
- +//template<typename Derived> struct AnyMatrixBase
- +template<template <typename, typename> class Derived> struct AnyMatrixBase
- {
- // typedef typename ei_plain_matrix_type<Derived>::type PlainMatrixType;
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/CwiseUnaryOp.h
- --- a/Eigen/src/Core/CwiseUnaryOp.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/CwiseUnaryOp.h Fri Jan 22 22:53:13 2010 +0300
- @@ -39,7 +39,7 @@
- *
- * \sa MatrixBase::unaryExpr(const CustomUnaryOp &) const, class CwiseBinaryOp, class CwiseNullaryOp
- */
- -template<typename UnaryOp, typename MatrixType>
- +template<typename UnaryOp, template <typename, typename> class Derived>
- struct ei_traits<CwiseUnaryOp<UnaryOp, MatrixType> >
- : ei_traits<MatrixType>
- {
- @@ -59,7 +59,7 @@
- template<typename UnaryOp, typename MatrixType, typename StorageType>
- class CwiseUnaryOpImpl;
- -template<typename UnaryOp, typename MatrixType>
- +template<typename UnaryOp, template <typename, typename> class MatrixType>
- class CwiseUnaryOp : ei_no_assignment_operator,
- public CwiseUnaryOpImpl<UnaryOp, MatrixType, typename ei_traits<MatrixType>::StorageType>
- {
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/SelfAdjointView.h
- --- a/Eigen/src/Core/SelfAdjointView.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/SelfAdjointView.h Fri Jan 22 22:53:13 2010 +0300
- @@ -141,7 +141,7 @@
- *
- * \sa rankUpdate(const MatrixBase<DerivedU>&, const MatrixBase<DerivedV>&, Scalar)
- */
- - template<typename DerivedU>
- + template< typename DerivedU >
- SelfAdjointView& rankUpdate(const MatrixBase<DerivedU>& u, Scalar alpha = Scalar(1));
- /////////// Cholesky module ///////////
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/TriangularMatrix.h
- --- a/Eigen/src/Core/TriangularMatrix.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/TriangularMatrix.h Fri Jan 22 22:53:13 2010 +0300
- @@ -32,7 +32,7 @@
- *
- * \brief Base class for triangular part in a matrix
- */
- -template<typename Derived> class TriangularBase : public AnyMatrixBase<Derived>
- +template<template <typename, typename> class Derived> class TriangularBase: public AnyMatrixBase<Derived>;
- {
- public:
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/util/ForwardDeclarations.h
- --- a/Eigen/src/Core/util/ForwardDeclarations.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/util/ForwardDeclarations.h Fri Jan 22 22:53:13 2010 +0300
- @@ -28,7 +28,7 @@
- template<typename T> struct ei_traits;
- template<typename T> struct NumTraits;
- -template<typename Derived> struct AnyMatrixBase;
- +template<template <typename, typename> class Derived> struct AnyMatrixBase;
- template<typename _Scalar, int _Rows, int _Cols,
- int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | AutoAlign,
- @@ -46,7 +46,7 @@
- template<typename MatrixType> class Transpose;
- template<typename MatrixType> class Conjugate;
- template<typename NullaryOp, typename MatrixType> class CwiseNullaryOp;
- -template<typename UnaryOp, typename MatrixType> class CwiseUnaryOp;
- +template<typename UnaryOp, template <typename, typename> class Derived> class CwiseUnaryOp;
- template<typename ViewOp, typename MatrixType> class CwiseUnaryView;
- template<typename BinaryOp, typename Lhs, typename Rhs> class CwiseBinaryOp;
- template<typename BinOp, typename MatrixType> class SelfCwiseBinaryOp;
- @@ -59,7 +59,7 @@
- template<typename MatrixType, int Index> class Diagonal;
- template<typename MatrixType, int Options=Unaligned> class Map;
- -template<typename Derived> class TriangularBase;
- +template<template <typename, typename> class Derived> class TriangularBase;
- template<typename MatrixType, unsigned int Mode> class TriangularView;
- template<typename MatrixType, unsigned int Mode> class SelfAdjointView;
- template<typename ExpressionType> class WithFormat;
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/util/Macros.h
- --- a/Eigen/src/Core/util/Macros.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/util/Macros.h Fri Jan 22 22:53:13 2010 +0300
- @@ -218,6 +218,8 @@
- #elif (defined __SUNPRO_CC)
- // FIXME not sure about this one:
- #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
- +#elif (defined __IBMCPP__)
- + #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
- #else
- #error Please tell me what is the equivalent of __attribute__((aligned(n))) for your compiler
- #endif
- diff -r 2f0c3dd8b988 -r 0f1f2b9c85e2 Eigen/src/Core/util/XprHelper.h
- --- a/Eigen/src/Core/util/XprHelper.h Fri Jan 22 10:17:43 2010 +0100
- +++ b/Eigen/src/Core/util/XprHelper.h Fri Jan 22 22:53:13 2010 +0300
- @@ -268,7 +268,7 @@
- /** \internal Helper base class to add a scalar multiple operator
- * overloads for complex types */
- -template<typename Derived,typename Scalar,typename OtherScalar,
- +template<template <typename, typename> class Derived,typename Scalar,typename OtherScalar,
- bool EnableIt = !ei_is_same_type<Scalar,OtherScalar>::ret >
- struct ei_special_scalar_op_base : public AnyMatrixBase<Derived>
- {
- @@ -277,7 +277,7 @@
- void operator*() const;
- };
- -template<typename Derived,typename Scalar,typename OtherScalar>
- +template<template <typename, typename> class Derived,typename Scalar,typename OtherScalar>
- struct ei_special_scalar_op_base<Derived,Scalar,OtherScalar,true> : public AnyMatrixBase<Derived>
- {
- const CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
- @@ -287,9 +287,9 @@
- (*static_cast<const Derived*>(this), ei_scalar_multiple2_op<Scalar,OtherScalar>(scalar));
- }
- - inline friend const CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
- - operator*(const OtherScalar& scalar, const Derived& matrix)
- - { return static_cast<const ei_special_scalar_op_base&>(matrix).operator*(scalar); }
- + inline friend const CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
- + operator*(const OtherScalar& scalar, typename Eigen::ei_special_scalar_op_base<Derived,Scalar,OtherScalar,true>::Derived & matrix)
- + { return static_cast<const ei_special_scalar_op_base&>(matrix).operator*(scalar); }
- };
- /** \internal Gives the type of a sub-matrix or sub-vector of a matrix of type \a ExpressionType and size \a Size
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement