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