Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions inst/include/csr_matrix_times_vector2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@
/*
* This works exactly like csr_matrix_times_vector but faster and less safe
*/
template <typename T2__, typename T5__>
inline
Eigen::Matrix<typename boost::math::tools::promote_args<T2__, T5__>::type,
Eigen::Dynamic, 1>
csr_matrix_times_vector2(const int& m,
const int& n,
const Eigen::Matrix<T2__, Eigen::Dynamic, 1>& w,
const std::vector<int>& v,
const std::vector<int>& u,
const Eigen::Matrix<T5__, Eigen::Dynamic, 1>& b,
std::ostream* pstream__) {
Eigen::Map<const Eigen::SparseMatrix<T2__,Eigen::RowMajor> >
sm(m, n, w.size(), &u[0], &v[0], &w[0]);
return sm * b;
template <typename T2__, typename T5__>
Eigen::Matrix<stan::promote_args_t<stan::value_type_t<T2__>,
stan::value_type_t<T5__>>, -1, 1>
csr_matrix_times_vector2(const int& m, const int& n, const T2__& w_arg__,
const std::vector<int>& v,
const std::vector<int>& u, const T5__& b_arg__,
std::ostream* pstream__) {
return stan::math::csr_matrix_times_vector(m, n, w_arg__, v, u, b_arg__);
Comment on lines +23 to +30

This comment was marked as resolved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is related to a specific version of stanc3 > v2.26.1, after stan-dev/stanc3#865.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I did exactly this but idt we need the macro branch? I think the compiler should be able to figure out which version to use

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is resolved now:

* checking whether packagerstanarmcan be installed ... OK

I'll re-check with the development version of rstan, after it's merged.

}

/* This specialization is slower than the above templated version
Expand Down