1 //------------------------------------------------------------------------------
2 // GxB_SelectOp_new: create a new user-defined select operator
3 //------------------------------------------------------------------------------
4
5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
6 // SPDX-License-Identifier: Apache-2.0
7
8 //------------------------------------------------------------------------------
9
10 // GxB_SelectOp_new is implemented both as a macro and a function. Both are
11 // user-callable. The macro is used by default since it can capture the name
12 // of the select function.
13
14 #include "GB.h"
15
16 // the macro version of this function must first be #undefined
17 #undef GxB_SelectOp_new
18 #undef GxM_SelectOp_new
19
GXB(SelectOp_new)20 GrB_Info GXB (SelectOp_new) // create a new user-defined select operator
21 (
22 GxB_SelectOp *selectop, // handle for the new select operator
23 GxB_select_function function, // pointer to the select function
24 GrB_Type xtype, // type of input x, or NULL if type-generic
25 GrB_Type ttype // type of input thunk, or NULL if not used
26 )
27 {
28 return (GB_SelectOp_new (selectop, function, xtype, ttype, NULL)) ;
29 }
30
31