Skip to content

Commit

Permalink
Fix a bug in QR::bytes()
Browse files Browse the repository at this point in the history
  • Loading branch information
ddemidov committed Jul 23, 2018
1 parent 8a4c96f commit 7db081b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions amgcl/detail/qr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ class QR {
}

size_t bytes() {
return backend::bytes(tau) +
backend::bytes(f) +
backend::bytes(q);
return sizeof(value_type) * (tau.size() + f.size() + q.size());
}

private:
Expand Down Expand Up @@ -568,7 +566,7 @@ class QR<value_type, typename std::enable_if<math::is_static_matrix<value_type>:
}

size_t bytes() const {
return base.bytes() + backend::bytes(buf);
return base.bytes() + sizeof(scalar_type) * buf.size();
}

private:
Expand Down

0 comments on commit 7db081b

Please sign in to comment.