| 10 | #include "GB.h" |
| 11 | |
| 12 | GrB_Info GxB_Matrix_fprint // print and check a GrB_Matrix |
| 13 | ( |
| 14 | GrB_Matrix A, // object to print and check |
| 15 | const char *name, // name of the object |
| 16 | GxB_Print_Level pr, // print level |
| 17 | FILE *f // file for output |
| 18 | ) |
| 19 | { |
| 20 | |
| 21 | //-------------------------------------------------------------------------- |
| 22 | // check inputs |
| 23 | //-------------------------------------------------------------------------- |
| 24 | |
| 25 | GB_WHERE1 ("GxB_Matrix_fprint (A, name, pr, f)") ; |
| 26 | |
| 27 | //-------------------------------------------------------------------------- |
| 28 | // print and check the object |
| 29 | //-------------------------------------------------------------------------- |
| 30 | |
| 31 | GrB_Info info = GB_Matrix_check (A, name, pr, f) ; |
| 32 | |
| 33 | //-------------------------------------------------------------------------- |
| 34 | // return result |
| 35 | //-------------------------------------------------------------------------- |
| 36 | |
| 37 | if (info == GrB_INDEX_OUT_OF_BOUNDS) |
| 38 | { |
| 39 | // indices out of order |
| 40 | return (GrB_INVALID_OBJECT) ; |
| 41 | } |
| 42 | else |
| 43 | { |
| 44 | return (info) ; |
| 45 | } |
| 46 | } |
| 47 | |