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

Function GxB_Matrix_split

deps/GraphBLAS/Source/GxB_Matrix_split.c:15–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include "GB_split.h"
14
15GrB_Info GxB_Matrix_split // split a matrix into 2D array of matrices
16(
17 GrB_Matrix *Tiles, // 2D row-major array of size m-by-n
18 const GrB_Index m,
19 const GrB_Index n,
20 const GrB_Index *Tile_nrows, // array of size m
21 const GrB_Index *Tile_ncols, // array of size n
22 const GrB_Matrix A, // input matrix to split
23 const GrB_Descriptor desc // unused, except threading control
24)
25{
26
27 //--------------------------------------------------------------------------
28 // check inputs
29 //--------------------------------------------------------------------------
30
31 GB_WHERE1 ("GxB_Matrix_split (Tiles, m, n, Tile_nrows, Tile_ncols, A, "
32 "desc)") ;
33 GB_BURBLE_START ("GxB_Matrix_split") ;
34 GB_RETURN_IF_NULL_OR_FAULTY (A) ;
35 if (m <= 0 || n <= 0)
36 {
37 return (GrB_INVALID_VALUE) ;
38 }
39 GB_RETURN_IF_NULL (Tiles) ;
40 GB_RETURN_IF_NULL (Tile_nrows) ;
41 GB_RETURN_IF_NULL (Tile_ncols) ;
42
43 // get the descriptor
44 GB_GET_DESCRIPTOR (info, desc, xx1, xx2, xx3, xx4, xx5, xx6, xx7) ;
45
46 //--------------------------------------------------------------------------
47 // Tiles = split (A)
48 //--------------------------------------------------------------------------
49
50 info = GB_split (Tiles, m, n, Tile_nrows, Tile_ncols, A, Context) ;
51 GB_BURBLE_END ;
52 return (info) ;
53}
54

Callers 4

mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85

Calls 1

GB_splitFunction · 0.85

Tested by

no test coverage detected