1 //------------------------------------------------------------------------------
2 // GB_split.h: definitions for GB_split and related functions
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 #ifndef GB_SPLIT_H
11 #define GB_SPLIT_H
12 #include "GB.h"
13 #include "GB_ek_slice.h"
14 #define GB_TILE(Tiles,i,j) (*(Tiles + (i) * n + (j)))
15 
16 GrB_Info GB_split                   // split a matrix
17 (
18     GrB_Matrix *Tiles,              // 2D row-major array of size m-by-n
19     const GrB_Index m,
20     const GrB_Index n,
21     const GrB_Index *Tile_nrows,    // array of size m
22     const GrB_Index *Tile_ncols,    // array of size n
23     const GrB_Matrix A,             // input matrix
24     GB_Context Context
25 ) ;
26 
27 GrB_Info GB_split_bitmap            // split a bitmap matrix
28 (
29     GrB_Matrix *Tiles,              // 2D row-major array of size m-by-n
30     const GrB_Index m,
31     const GrB_Index n,
32     const int64_t *restrict Tile_rows,  // size m+1
33     const int64_t *restrict Tile_cols,  // size n+1
34     const GrB_Matrix A,             // input matrix
35     GB_Context Context
36 ) ;
37 
38 GrB_Info GB_split_full              // split a full matrix
39 (
40     GrB_Matrix *Tiles,              // 2D row-major array of size m-by-n
41     const GrB_Index m,
42     const GrB_Index n,
43     const int64_t *restrict Tile_rows,  // size m+1
44     const int64_t *restrict Tile_cols,  // size n+1
45     const GrB_Matrix A,             // input matrix
46     GB_Context Context
47 ) ;
48 
49 GrB_Info GB_split_sparse            // split a sparse matrix
50 (
51     GrB_Matrix *Tiles,              // 2D row-major array of size m-by-n
52     const GrB_Index m,
53     const GrB_Index n,
54     const int64_t *restrict Tile_rows,  // size m+1
55     const int64_t *restrict Tile_cols,  // size n+1
56     const GrB_Matrix A,             // input matrix
57     GB_Context Context
58 ) ;
59 
60 #endif
61 
62