| 105 | //------------------------------------------------------------------------------ |
| 106 | |
| 107 | GrB_Info GrB_Matrix_select_UDT |
| 108 | ( |
| 109 | GrB_Matrix C, // input/output matrix for results |
| 110 | const GrB_Matrix M, // optional mask for C, or NULL |
| 111 | const GrB_BinaryOp accum, // optional accum for Z=accum(C,T) |
| 112 | const GrB_IndexUnaryOp op, // operator to select the entries |
| 113 | const GrB_Matrix A, // first input: matrix A |
| 114 | const void *thunk, // optional input for select operator |
| 115 | const GrB_Descriptor desc // descriptor for C, M, and A |
| 116 | ) |
| 117 | { |
| 118 | GB_WHERE (C, "GrB_Matrix_select_UDT (C, M, accum, op, A, thunk, desc)") ; |
| 119 | GB_SCALAR_WRAP_UDT (Thunk, thunk, (op == NULL) ? NULL : op->ytype) ; |
| 120 | return (GB_sel (C, M, accum, op, A, Thunk, desc, Context)) ; |
| 121 | } |
| 122 | |
| 123 | //------------------------------------------------------------------------------ |
| 124 | // GrB_Matrix_select_Scalar: select entries from a matrix (thunk is GrB_Scalar) |