1function [nth chnk] = grbinfo
2%GRBINFO print info about the GraphBLAS version
3%
4% nthreads = grbinfo
5
6% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
7% SPDX-License-Identifier: Apache-2.0
8
9[nthreads, format, hyper_switch, ...
10name, version, date, about, license, compiledate, compiletime, api, ...
11api_about, chunk, bitmap_switch ] = GB_mex_init ;
12
13d = stat ;
14
15fprintf ('\n%s version: %d.%d.%d\n', name, version) ;
16
17if (d)
18    fprintf ('    malloc debug: on\n') ;
19else
20    fprintf ('    malloc debug: off\n') ;
21end
22
23ncores = feature ('numcores') ;
24[nthreads2 chunk2] = nthreads_get ;
25
26fprintf ('    # of threads to use:   %d (%d)\n', nthreads, nthreads2) ;
27fprintf ('    chunk:                 %g (%g)\n', chunk, chunk2) ;
28
29fprintf ('    OpenMP max threads:    %d\n', GB_mex_omp_max_threads) ;
30fprintf ('    # of cores for MATLAB: %d\n', ncores) ;
31
32switch (format)
33    case {0}
34        fprintf ('    default format: CSR\n') ;
35    case {1}
36        fprintf ('    default format: CSC\n') ;
37    otherwise
38        error ('?') ;
39end
40
41fprintf ('    hyper_switch: %g\n', hyper_switch) ;
42fprintf ('    bitmap_switch: %g\n', bitmap_switch) ;
43fprintf ('    date: %s\n', date) ;
44fprintf ('    compile date: %s\n', compiledate) ;
45fprintf ('    compile time: %s\n\n', compiletime) ;
46
47if (nargout > 0)
48    fprintf ('\n---------------------------------\n%s', about) ;
49    fprintf ('\n---------------------------------\n%s', license) ;
50    fprintf ('\n---------------------------------\n%s\n', api_about) ;
51    fprintf ('API version: %d.%d.%d\n', api) ;
52    nth = nthreads ;
53    chnk = chunk ;
54end
55
56