1 //------------------------------------------------------------------------------
2 // GxB_Scalar_type: return the type of a GxB_Scalar
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_Scalar_type(GrB_Type * type,const GxB_Scalar s)12 GrB_Info GxB_Scalar_type // get the type of a GxB_Scalar
13 (
14 GrB_Type *type, // returns the type of the GxB_Scalar
15 const GxB_Scalar s // GxB_Scalar to query
16 )
17 {
18
19 //--------------------------------------------------------------------------
20 // check inputs
21 //--------------------------------------------------------------------------
22
23 GB_WHERE1 ("GxB_Scalar_type (&type, s)") ;
24 GB_RETURN_IF_NULL_OR_FAULTY (s) ;
25
26 //--------------------------------------------------------------------------
27 // get the type
28 //--------------------------------------------------------------------------
29
30 return (GB_matvec_type (type, (GrB_Matrix) s, Context)) ;
31 }
32
33