check 2 matrices have same type nrows and ncols
| 30 | |
| 31 | // check 2 matrices have same type nrows and ncols |
| 32 | void RG_Matrix_checkCompatible |
| 33 | ( |
| 34 | const RG_Matrix M, |
| 35 | const RG_Matrix N |
| 36 | ) { |
| 37 | #if RG_DEBUG |
| 38 | GrB_Matrix m = RG_MATRIX_M(M); |
| 39 | GrB_Matrix n = RG_MATRIX_M(N); |
| 40 | |
| 41 | GrB_Type m_type; |
| 42 | GrB_Type n_type; |
| 43 | GxB_Matrix_type(&m_type, m); |
| 44 | GxB_Matrix_type(&n_type, n); |
| 45 | ASSERT(m_type == n_type); |
| 46 | |
| 47 | GrB_Index m_nrows; |
| 48 | GrB_Index m_ncols; |
| 49 | GrB_Index n_nrows; |
| 50 | GrB_Index n_ncols; |
| 51 | GrB_Matrix_nrows(&m_nrows, m); |
| 52 | GrB_Matrix_ncols(&m_ncols, m); |
| 53 | GrB_Matrix_nrows(&n_nrows, n); |
| 54 | GrB_Matrix_ncols(&n_ncols, n); |
| 55 | ASSERT(m_nrows == n_nrows); |
| 56 | ASSERT(m_ncols == n_ncols); |
| 57 | #endif |
| 58 | } |
| 59 | |
| 60 | void RG_Matrix_validateState |
| 61 | ( |
no test coverage detected