From 6d749c172a2f8f4dd5ec342356553f0b70018f74 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Fri, 1 Jun 2007 07:56:24 +0000 Subject: replace size_t with int everywhere. The size_t type means a number of _bytes_, and it was misused as counting e.g. the number of rows/columns in a matrix. Moreover, it is unsigned, which can give strange bugs if a signed/unsigned mismatch occurs. --- tvmet-1.7.1/include/tvmet/xpr/MVProduct.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tvmet-1.7.1/include/tvmet/xpr/MVProduct.h') diff --git a/tvmet-1.7.1/include/tvmet/xpr/MVProduct.h b/tvmet-1.7.1/include/tvmet/xpr/MVProduct.h index 15d13adae..878e65a89 100644 --- a/tvmet-1.7.1/include/tvmet/xpr/MVProduct.h +++ b/tvmet-1.7.1/include/tvmet/xpr/MVProduct.h @@ -38,7 +38,7 @@ namespace tvmet { * M\,v * \f] */ -template class XprMVProduct : public TvmetBase< XprMVProduct > @@ -81,27 +81,27 @@ public: private: /** Wrapper for meta gemm. */ static inline - value_type do_gemv(dispatch, const E1& lhs, const E2& rhs, std::size_t j) { + value_type do_gemv(dispatch, const E1& lhs, const E2& rhs, int j) { return meta::gemv::prod(lhs, rhs, j); } /** Wrapper for loop gemm. */ static inline - value_type do_gemv(dispatch, const E1& lhs, const E2& rhs, std::size_t j) { + value_type do_gemv(dispatch, const E1& lhs, const E2& rhs, int j) { return loop::gemv::prod(lhs, rhs, j); } public: /** index operator, returns the expression by index. This is the vector style since a matrix*vector gives a vector. */ - value_type operator()(std::size_t j) const { + value_type operator()(int j) const { TVMET_RT_CONDITION(j < Rows , "XprMVProduct Bounce Violation") return do_gemv(dispatch(), m_lhs, m_rhs, j); } public: // debugging Xpr parse tree - void print_xpr(std::ostream& os, std::size_t l=0) const { + void print_xpr(std::ostream& os, int l=0) const { os << IndentLevel(l++) << "XprMVProduct[" << (use_meta ? "M" : "L") << ", O=" << ops -- cgit v1.2.3