1 //------------------------------------------------------------------------------ 2 // GB_select.h: definitions for GrB_select and related functions 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 #ifndef GB_SELECT_H 11 #define GB_SELECT_H 12 #include "GB.h" 13 #include "GB_is_nonzero.h" 14 15 GrB_Info GB_select // C<M> = accum (C, select(A,k)) or select(A',k) 16 ( 17 GrB_Matrix C, // input/output matrix for results 18 const bool C_replace, // C descriptor 19 const GrB_Matrix M, // optional mask for C, unused if NULL 20 const bool Mask_comp, // descriptor for M 21 const bool Mask_struct, // if true, use the only structure of M 22 const GrB_BinaryOp accum, // optional accum for Z=accum(C,T) 23 const GxB_SelectOp op, // operator to select the entries 24 const GrB_Matrix A, // input matrix 25 const GxB_Scalar Thunk_in, // optional input for select operator 26 const bool A_transpose, // A matrix descriptor 27 GB_Context Context 28 ) ; 29 30 GrB_Info GB_selector 31 ( 32 GrB_Matrix C, // output matrix, NULL or static header 33 GB_Select_Opcode opcode, // selector opcode 34 const GxB_SelectOp op, // user operator 35 const bool flipij, // if true, flip i and j for user operator 36 GrB_Matrix A, // input matrix 37 int64_t ithunk, // (int64_t) Thunk, if Thunk is NULL 38 const GxB_Scalar Thunk, // optional input for select operator 39 GB_Context Context 40 ) ; 41 42 GrB_Info GB_bitmap_selector 43 ( 44 GrB_Matrix C, // output matrix, static header 45 GB_Select_Opcode opcode, // selector opcode 46 const GxB_select_function user_select, // user select function 47 const bool flipij, // if true, flip i and j for user operator 48 GrB_Matrix A, // input matrix 49 const int64_t ithunk, // (int64_t) Thunk, if Thunk is NULL 50 const GB_void *restrict xthunk, 51 GB_Context Context 52 ) ; 53 54 //------------------------------------------------------------------------------ 55 // compiler diagnostics 56 //------------------------------------------------------------------------------ 57 58 // Some parameters are unused for some uses of the Generated/GB_sel_* functions 59 #include "GB_unused.h" 60 61 #endif 62 63