1 //------------------------------------------------------------------------------
2 // GB_reduce.h: definitions for GB_reduce
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_REDUCE_H
11 #define GB_REDUCE_H
12 #include "GB.h"
13 
14 GrB_Info GB_reduce_to_scalar    // s = reduce_to_scalar (A)
15 (
16     void *c,                    // result scalar
17     const GrB_Type ctype,       // the type of scalar, c
18     const GrB_BinaryOp accum,   // for c = accum(c,s)
19     const GrB_Monoid reduce,    // monoid to do the reduction
20     const GrB_Matrix A,         // matrix to reduce
21     GB_Context Context
22 ) ;
23 
24 GrB_Info GB_reduce_to_vector        // C<M> = accum (C,reduce(A))
25 (
26     GrB_Matrix C,                   // input/output for results, size n-by-1
27     const GrB_Matrix M,             // optional M for C, unused if NULL
28     const GrB_BinaryOp accum,       // optional accum for z=accum(C,T)
29     const GrB_Monoid monoid,        // reduce monoid for T=reduce(A)
30     const GrB_Matrix A,             // first input:  matrix A
31     const GrB_Descriptor desc,      // descriptor for C, M, and A
32     GB_Context Context
33 ) ;
34 
35 #endif
36 
37