1 //------------------------------------------------------------------------------
2 // GxB_BinaryOp_ytype: return the type of y for z=f(x,y)
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 #include "GB.h"
11
GxB_BinaryOp_ytype(GrB_Type * ytype,GrB_BinaryOp binaryop)12 GrB_Info GxB_BinaryOp_ytype // type of y
13 (
14 GrB_Type *ytype, // return type of input y
15 GrB_BinaryOp binaryop // binary operator to query
16 )
17 {
18
19 //--------------------------------------------------------------------------
20 // check inputs
21 //--------------------------------------------------------------------------
22
23 GB_WHERE1 ("GxB_BinaryOp_ytype (&ytype, binaryop)") ;
24 GB_RETURN_IF_NULL (ytype) ;
25 GB_RETURN_IF_NULL_OR_FAULTY (binaryop) ;
26 ASSERT_BINARYOP_OK (binaryop, "binaryop for ytype", GB0) ;
27
28 //--------------------------------------------------------------------------
29 // return the ytype
30 //--------------------------------------------------------------------------
31
32 (*ytype) = binaryop->ytype ;
33 return (GrB_SUCCESS) ;
34 }
35
36