On Tue, Jul 07, 2015 at 01:16:52PM -0700, Ben Goodrich wrote:
> Actually attaching now. -- Ben
Hm, I replaced my includes with simply,
#include <stan/math.hpp>
Now I get a template error,
g++ -I/usr/share/R/include -DNDEBUG -I"/home/joshua/R/x86_64-pc-linux-gnu-library/3.1/RcppEigen/include" -I"/home/joshua/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include" -I"/home/joshua/R/x86_64-pc-linux-gnu-library/3.1/BH/include" -fopenmp -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-parameter -Wvla -Wno-unused-local-typedefs -fdiagnostics-color=auto -DOMX_BOUNDS_CHECK -D_GLIBCXX_DEBUG -g3 -fno-inline -fno-inline-small-functions -fno-default-inline -O0 -fmax-errors=1 -UNDEBUG -fpic -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -c omxMLFitFunction.cpp -o omxMLFitFunction.o
In file included from /home/joshua/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include/stan/math.hpp:225:0,
from omxMLFitFunction.cpp:19:
/home/joshua/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include/stan/math/prim/mat/fun/trace_inv_quad_form_ldlt.hpp: In instantiation of ‘typename boost::enable_if_c<((! stan::is_var<T>::value) && (! stan::is_var<T2>::value)), typename boost::math::tools::promote_args<RT1, RT2>::type>::type stan::math::trace_inv_quad_form_ldlt(const stan::math::LDLT_factor<T1, R2, C2>&, const Eigen::Matrix<T2, R2, C2>&) [with T1 = stan::math::fvar<stan::math::var>; T2 = stan::math::fvar<stan::math::var>; int R2 = -1; int C2 = -1; int R3 = -1; int C3 = 1; typename boost::enable_if_c<((! stan::is_var<T>::value) && (! stan::is_var<T2>::value)), typename boost::math::tools::promote_args<RT1, RT2>::type>::type = stan::math::fvar<stan::math::var>]’:
multi_normal_sufficient.hpp:76:63: required from ‘typename boost::math::tools::promote_args<T_sample, typename stan::scalar_type<T2>::type, T_covar>::type stan::prob::multi_normal_sufficient_log(int, const Eigen::Matrix<Scalar, -1, 1>&, const Eigen::Matrix<LhsScalar, -1, -1, 0>&, const T_loc&, const Eigen::Matrix<LhsScalar, -1, -1, 0>&) [with T_sample = double; T_loc = Eigen::Matrix<stan::math::fvar<stan::math::var>, -1, 1>; T_covar = stan::math::fvar<stan::math::var>; typename boost::math::tools::promote_args<T_sample, typename stan::scalar_type<T2>::type, T_covar>::type = stan::math::fvar<stan::math::var>]’
omxMLFitFunction.cpp:133:88: required from ‘T multi_normal_deriv::operator()(Eigen::Matrix<Scalar, -1, 1>&) const [with T = stan::math::fvar<stan::math::var>]’
/home/joshua/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include/stan/math/mix/mat/functor/hessian.hpp:59:39: required from ‘void stan::math::hessian(const F&, const Eigen::Matrix<double, -1, 1>&, double&, Eigen::Matrix<double, -1, 1>&, Eigen::Matrix<double, -1, -1>&) [with F = multi_normal_deriv]’
omxMLFitFunction.cpp:218:77: required from here
/home/joshua/R/x86_64-pc-linux-gnu-library/3.1/StanHeaders/include/stan/math/prim/mat/fun/trace_inv_quad_form_ldlt.hpp:33:66: error: call of overloaded ‘multiply(Eigen::Matrix<stan::math::fvar<stan::math::var>, 1, -1, 1, 1, -1>, Eigen::Matrix<stan::math::fvar<stan::math::var>, -1, 1>)’ is ambiguous
return trace(multiply(transpose(B), mdivide_left_ldlt(A, B)));
Any ideas? Need to see the full source code?