1 //------------------------------------------------------------------------------
2 // GxB_Matrix_import_BitmapR: import a matrix in bitmap format, held by row
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_export.h"
11
GxB_Matrix_import_BitmapR(GrB_Matrix * A,GrB_Type type,GrB_Index nrows,GrB_Index ncols,int8_t ** Ab,void ** Ax,GrB_Index Ab_size,GrB_Index Ax_size,bool is_uniform,GrB_Index nvals,const GrB_Descriptor desc)12 GrB_Info GxB_Matrix_import_BitmapR // import a bitmap matrix, held by row
13 (
14 GrB_Matrix *A, // handle of matrix to create
15 GrB_Type type, // type of matrix to create
16 GrB_Index nrows, // number of rows of the matrix
17 GrB_Index ncols, // number of columns of the matrix
18
19 int8_t **Ab, // bitmap
20 void **Ax, // values
21 GrB_Index Ab_size, // size of Ab in bytes
22 GrB_Index Ax_size, // size of Ax in bytes
23 bool is_uniform, // if true, A has uniform values (TODO:::unsupported)
24
25 GrB_Index nvals, // # of entries in bitmap
26 const GrB_Descriptor desc
27 )
28 {
29
30 //--------------------------------------------------------------------------
31 // check inputs and get the descriptor
32 //--------------------------------------------------------------------------
33
34 GB_WHERE1 ("GxB_Matrix_import_BitmapR (&A, type, nrows, ncols, "
35 "&Ab, &Ax, Ab_size, Ax_size, is_uniform, nvals, desc)") ;
36 GB_BURBLE_START ("GxB_Matrix_import_BitmapR") ;
37 GB_GET_DESCRIPTOR (info, desc, xx1, xx2, xx3, xx4, xx5, xx6, xx7) ;
38
39 //--------------------------------------------------------------------------
40 // import the matrix
41 //--------------------------------------------------------------------------
42
43 info = GB_import (A, type, ncols, nrows, false,
44 NULL, 0, // Ap
45 NULL, 0, // Ah
46 Ab, Ab_size, // Ab
47 NULL, 0, // Ai
48 Ax, Ax_size, // Ax
49 nvals, false, 0, // nvals for bitmap
50 GxB_BITMAP, false,
51 is_uniform, Context) ; // bitmap by row
52
53 GB_BURBLE_END ;
54 return (info) ;
55 }
56
57