mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Fix instantiation of ScalarBinaryOpTraits for AutoDiff.
This commit is contained in:
parent
cd577a275c
commit
fa39f81b48
@ -497,29 +497,29 @@ struct make_coherent_impl<Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows,
|
|||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
template<typename A_Scalar, int A_Rows, int A_Cols, int A_Options, int A_MaxRows, int A_MaxCols>
|
template<typename A_Scalar, int A_Rows, int A_Cols, int A_Options, int A_MaxRows, int A_MaxCols, typename BinOp>
|
||||||
struct ScalarBinaryOpTraits<Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>,A_Scalar>
|
struct ScalarBinaryOpTraits<Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>,A_Scalar,BinOp>
|
||||||
{
|
{
|
||||||
enum { Defined = 1 };
|
enum { Defined = 1 };
|
||||||
typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> ReturnType;
|
typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> ReturnType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename A_Scalar, int A_Rows, int A_Cols, int A_Options, int A_MaxRows, int A_MaxCols>
|
template<typename A_Scalar, int A_Rows, int A_Cols, int A_Options, int A_MaxRows, int A_MaxCols, typename BinOp>
|
||||||
struct ScalarBinaryOpTraits<A_Scalar, Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> >
|
struct ScalarBinaryOpTraits<A_Scalar, Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols>, BinOp>
|
||||||
{
|
{
|
||||||
enum { Defined = 1 };
|
enum { Defined = 1 };
|
||||||
typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> ReturnType;
|
typedef Matrix<A_Scalar, A_Rows, A_Cols, A_Options, A_MaxRows, A_MaxCols> ReturnType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename DerType>
|
template<typename DerType, typename BinOp>
|
||||||
struct ScalarBinaryOpTraits<AutoDiffScalar<DerType>,typename DerType::Scalar>
|
struct ScalarBinaryOpTraits<AutoDiffScalar<DerType>,typename DerType::Scalar,BinOp>
|
||||||
{
|
{
|
||||||
enum { Defined = 1 };
|
enum { Defined = 1 };
|
||||||
typedef AutoDiffScalar<DerType> ReturnType;
|
typedef AutoDiffScalar<DerType> ReturnType;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename DerType>
|
template<typename DerType, typename BinOp>
|
||||||
struct ScalarBinaryOpTraits<typename DerType::Scalar,AutoDiffScalar<DerType> >
|
struct ScalarBinaryOpTraits<typename DerType::Scalar,AutoDiffScalar<DerType>, BinOp>
|
||||||
{
|
{
|
||||||
enum { Defined = 1 };
|
enum { Defined = 1 };
|
||||||
typedef AutoDiffScalar<DerType> ReturnType;
|
typedef AutoDiffScalar<DerType> ReturnType;
|
||||||
|
Loading…
Reference in New Issue
Block a user