MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / GB_concat_bitmap

Function GB_concat_bitmap

deps/GraphBLAS/Source/GB_concat_bitmap.c:21–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "GB_unused.h"
20
21GrB_Info GB_concat_bitmap // concatenate into a bitmap matrix
22(
23 GrB_Matrix C, // input/output matrix for results
24 const bool C_iso, // if true, construct C as iso
25 const GB_void *cscalar, // iso value of C, if C is io
26 const int64_t cnz, // # of entries in C
27 const GrB_Matrix *Tiles, // 2D row-major array of size m-by-n,
28 const GrB_Index m,
29 const GrB_Index n,
30 const int64_t *restrict Tile_rows, // size m+1
31 const int64_t *restrict Tile_cols, // size n+1
32 GB_Context Context
33)
34{
35
36 //--------------------------------------------------------------------------
37 // allocate C as a bitmap matrix
38 //--------------------------------------------------------------------------
39
40 GrB_Info info ;
41 GrB_Matrix A = NULL ;
42 GB_WERK_DECLARE (A_ek_slicing, int64_t) ;
43 struct GB_Matrix_opaque T_header ;
44 GrB_Matrix T = NULL ;
45
46 GrB_Type ctype = C->type ;
47 int64_t cvlen = C->vlen ;
48 int64_t cvdim = C->vdim ;
49 bool csc = C->is_csc ;
50 size_t csize = ctype->size ;
51 GB_Type_code ccode = ctype->code ;
52 if (!GB_IS_BITMAP (C))
53 {
54 // set C->iso = C_iso OK
55 GB_phybix_free (C) ;
56 GB_OK (GB_bix_alloc (C, GB_nnz_full (C), GxB_BITMAP, true, true, C_iso,
57 Context)) ;
58 C->plen = -1 ;
59 C->nvec = cvdim ;
60 C->nvec_nonempty = (cvlen > 0) ? cvdim : 0 ;
61 }
62 ASSERT (GB_IS_BITMAP (C)) ;
63 GB_GET_NTHREADS_MAX (nthreads_max, chunk, Context) ;
64
65 int64_t nouter = csc ? n : m ;
66 int64_t ninner = csc ? m : n ;
67
68 if (C_iso)
69 {
70 memcpy (C->x, cscalar, csize) ;
71 }
72
73 //--------------------------------------------------------------------------
74 // concatenate all matrices into C
75 //--------------------------------------------------------------------------
76
77 for (int64_t outer = 0 ; outer < nouter ; outer++)
78 {

Callers 1

GB_concatFunction · 0.85

Calls 6

GB_phybix_freeFunction · 0.85
GB_bix_allocFunction · 0.85
GB_transpose_castFunction · 0.85
GB_cast_factoryFunction · 0.85
GB_nnz_fullFunction · 0.50
GB_nnz_heldFunction · 0.50

Tested by

no test coverage detected