Skip to content

Commit

Permalink
Add a possible msvc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesYang007 committed Oct 14, 2024
1 parent 86a160a commit 4c6b3c0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,15 @@ class MatrixNaiveConvexReluDense: public MatrixNaiveBase<typename DenseType::Sca
{
const auto d = _mat.cols();
const auto m = _mask.cols();
const auto v_weights = (v * weights).matrix();
Eigen::Map<rowmat_value_t> buff(_buff.data(), _n_threads, d);
const auto routine = [&](auto i) {
const auto i_sgn = i / m;
const auto i_m = i - i_sgn * m;
auto out_m = out.segment(i * d, d).matrix();
Eigen::Map<rowmat_value_t> buff(_buff.data(), _n_threads, d);
dgemv(
_mat,
(1-2*i_sgn) * _mask.col(i_m).transpose().template cast<value_t>().cwiseProduct((v * weights).matrix()),
(1-2*i_sgn) * _mask.col(i_m).transpose().template cast<value_t>().cwiseProduct(v_weights),
1,
buff /* unused */,
out_m
Expand Down

0 comments on commit 4c6b3c0

Please sign in to comment.