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