Registered Member
|
Hello
I'm trying to use automatic differentiation with function that contains matrix operations, but i could not make it compile for simple matrix multiplications ! Anyone now how i could fix that without have to rewrite the matrix multiplication by myself using three loops ? Do i need to modify eigen library's code somewhere ? Here is the code:
and I get this compilation error message : 1>------ Build started: Project: OptasiaCharacter, Configuration: Debug Win32 ------ 1> Character.cpp 1>b:\build\thirdpartylibs\eigen\src/Core/products/CoeffBasedProduct.h(56): error C2752: 'Eigen::internal::scalar_product_traits<T,U>' : more than one partial specialization matches the template argument list 1> with 1> [ 1> T=Eigen::AutoDiffScalar<DerivType>, 1> U=Eigen::AutoDiffScalar<DerivType> 1> ] 1> B:\Build\ThirdPartyLibs\eigen\unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h(475): could be 'Eigen::internal::scalar_product_traits<Eigen::AutoDiffScalar<_DerType>,T>' 1> b:\build\thirdpartylibs\eigen\eigen-3.0.3-patch1\eigen\eigen\src/Core/util/Meta.h(192): or 'Eigen::internal::scalar_product_traits<T,T>' 1> b:\build\thirdpartylibs\eigen\src/Core/DenseBase.h(46) : see reference to class template instantiation 'Eigen::internal::traits<T>' being compiled 1> with 1> [ 1> T=Eigen::CoeffBasedProduct<const Eigen::Matrix<ADScalar,3,3> ,const Eigen::Matrix<ADScalar,3,3> ,6> 1> ] 1> b:\build\thirdpartylibs\eigen\src/Core/MatrixBase.h(63) : see reference to class template instantiation 'Eigen::DenseBase<Derived>' being compiled 1> with 1> [ 1> Derived=Eigen::CoeffBasedProduct<const Eigen::Matrix<ADScalar,3,3> ,const Eigen::Matrix<ADScalar,3,3> ,6> 1> ] 1> b:\build\thirdpartylibs\eigen\src/Core/products/CoeffBasedProduct.h(129) : see reference to class template instantiation 'Eigen::MatrixBase<Derived>' being compiled 1> with 1> [ 1> Derived=Eigen::CoeffBasedProduct<const Eigen::Matrix<ADScalar,3,3> ,const Eigen::Matrix<ADScalar,3,3> ,6> 1> ] 1> x:test.cpp(302) : see reference to class template instantiation 'Eigen::CoeffBasedProduct<LhsNested,RhsNested,NestingFlags>' being compiled 1> with 1> [ 1> LhsNested=const Eigen::Matrix<ADScalar,3,3> , 1> RhsNested=const Eigen::Matrix<ADScalar,3,3> , 1> NestingFlags=6 1> ] |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]