| 154 | } |
| 155 | |
| 156 | GrB_Info GB_subref_phase0 |
| 157 | ( |
| 158 | // output |
| 159 | int64_t *restrict *p_Ch, // Ch = C->h hyperlist, or NULL standard |
| 160 | size_t *p_Ch_size, |
| 161 | int64_t *restrict *p_Ap_start, // A(:,kA) starts at Ap_start [kC] |
| 162 | size_t *p_Ap_start_size, |
| 163 | int64_t *restrict *p_Ap_end, // ... and ends at Ap_end [kC] - 1 |
| 164 | size_t *p_Ap_end_size, |
| 165 | int64_t *p_Cnvec, // # of vectors in C |
| 166 | bool *p_need_qsort, // true if C must be sorted |
| 167 | int *p_Ikind, // kind of I |
| 168 | int64_t *p_nI, // length of I |
| 169 | int64_t Icolon [3], // for GB_RANGE, GB_STRIDE |
| 170 | int64_t *p_nJ, // length of J |
| 171 | // input, not modified |
| 172 | const GrB_Matrix A, |
| 173 | const GrB_Index *I, // index list for C = A(I,J), or GrB_ALL, etc. |
| 174 | const int64_t ni, // length of I, or special |
| 175 | const GrB_Index *J, // index list for C = A(I,J), or GrB_ALL, etc. |
| 176 | const int64_t nj, // length of J, or special |
| 177 | // const bool must_sort, // true if C must be returned sorted |
| 178 | GB_Context Context |
| 179 | ) |
| 180 | { |
| 181 | |
| 182 | //-------------------------------------------------------------------------- |
| 183 | // check inputs |
| 184 | //-------------------------------------------------------------------------- |
| 185 | |
| 186 | ASSERT_MATRIX_OK (A, "A for subref phase 0", GB0) ; |
| 187 | ASSERT (!GB_IS_BITMAP (A)) ; // GB_bitmap_subref is used instead |
| 188 | |
| 189 | ASSERT (p_Ch != NULL) ; |
| 190 | ASSERT (p_Ap_start != NULL) ; |
| 191 | ASSERT (p_Ap_end != NULL) ; |
| 192 | ASSERT (p_Cnvec != NULL) ; |
| 193 | ASSERT (p_nJ != NULL) ; |
| 194 | ASSERT (p_Ikind != NULL) ; |
| 195 | ASSERT (p_nI != NULL) ; |
| 196 | ASSERT (Icolon != NULL) ; |
| 197 | ASSERT (I != NULL) ; |
| 198 | ASSERT (J != NULL) ; |
| 199 | |
| 200 | GrB_Info info ; |
| 201 | GB_WERK_DECLARE (Count, int64_t) ; |
| 202 | int64_t *restrict Ch = NULL ; size_t Ch_size = 0 ; |
| 203 | int64_t *restrict Ap_start = NULL ; size_t Ap_start_size = 0 ; |
| 204 | int64_t *restrict Ap_end = NULL ; size_t Ap_end_size = 0 ; |
| 205 | |
| 206 | (*p_Ch ) = NULL ; |
| 207 | (*p_Ap_start ) = NULL ; |
| 208 | (*p_Ap_end ) = NULL ; |
| 209 | (*p_Cnvec ) = 0 ; |
| 210 | (*p_need_qsort) = false ; |
| 211 | (*p_Ikind ) = 0 ; |
| 212 | (*p_nI ) = 0 ; |
| 213 | (*p_nJ ) = 0 ; |
no test coverage detected