| 10 | #include "../../util/rmalloc.h" |
| 11 | |
| 12 | static void _copyMatrix |
| 13 | ( |
| 14 | const GrB_Matrix in, |
| 15 | GrB_Matrix out |
| 16 | ) { |
| 17 | GrB_Index nvals; |
| 18 | GrB_Info info = GrB_SUCCESS; |
| 19 | |
| 20 | UNUSED(info); |
| 21 | |
| 22 | info = GrB_Matrix_nvals(&nvals, in); |
| 23 | ASSERT(info == GrB_SUCCESS); |
| 24 | |
| 25 | if(nvals > 0) { |
| 26 | info = GrB_Matrix_apply(out, NULL, NULL, GrB_IDENTITY_BOOL, in, |
| 27 | GrB_DESC_R); |
| 28 | } |
| 29 | else { |
| 30 | GrB_Matrix_clear(out); |
| 31 | } |
| 32 | |
| 33 | ASSERT(info == GrB_SUCCESS); |
| 34 | } |
| 35 | |
| 36 | GrB_Info RG_Matrix_copy |
| 37 | ( |
no test coverage detected