| 10 | #include "GB.h" |
| 11 | |
| 12 | GrB_Info GrB_Vector_size // get the dimension of a vector |
| 13 | ( |
| 14 | GrB_Index *n, // dimension is n-by-1 |
| 15 | const GrB_Vector v // vector to query |
| 16 | ) |
| 17 | { |
| 18 | |
| 19 | //-------------------------------------------------------------------------- |
| 20 | // check inputs |
| 21 | //-------------------------------------------------------------------------- |
| 22 | |
| 23 | GB_WHERE1 ("GrB_Vector_size (&n, v)") ; |
| 24 | GB_RETURN_IF_NULL (n) ; |
| 25 | GB_RETURN_IF_NULL_OR_FAULTY (v) ; |
| 26 | ASSERT (GB_VECTOR_OK (v)) ; |
| 27 | |
| 28 | //-------------------------------------------------------------------------- |
| 29 | // get the size |
| 30 | //-------------------------------------------------------------------------- |
| 31 | |
| 32 | (*n) = v->vlen ; |
| 33 | #pragma omp flush |
| 34 | return (GrB_SUCCESS) ; |
| 35 | } |
| 36 |
no outgoing calls
no test coverage detected