19
19
namespace Test {
20
20
template <class ScalarType , class LayoutType , class ExeSpaceType >
21
21
void doCsMat (size_t m, size_t n, ScalarType min_val, ScalarType max_val) {
22
- using RandCs = RandCsMatrix<ScalarType, LayoutType, ExeSpaceType>;
23
- using ordinal_type = typename RandCs::ordinal_type;
24
- using size_type = typename RandCs::size_type;
25
- auto expected_min = ScalarType (1.0 );
26
- ordinal_type expected_nnz = 0 ;
22
+ using RandCs = RandCsMatrix<ScalarType, LayoutType, ExeSpaceType>;
23
+ using size_type = typename RandCs::size_type;
24
+ auto expected_min = ScalarType (1.0 );
25
+ size_type expected_nnz = 0 ;
27
26
RandCs cm (m, n, min_val, max_val);
28
27
29
28
for (size_type i = 0 ; i < cm.get_nnz (); ++i) ASSERT_GE (cm (i), expected_min) << cm.info ;
@@ -39,7 +38,7 @@ void doCsMat(size_t m, size_t n, ScalarType min_val, ScalarType max_val) {
39
38
int64_t col_start = j < static_cast <int64_t >(m) ? map (j) : 0 ;
40
39
ASSERT_FLOAT_EQ (cm (col_start + i), cm (expected_nnz + i)) << cm.info ;
41
40
}
42
- expected_nnz += col_len;
41
+ expected_nnz += size_type ( col_len) ;
43
42
}
44
43
ASSERT_EQ (cm.get_nnz (), expected_nnz) << cm.info ;
45
44
0 commit comments