1flexiblas_list(3)            The FlexiBLAS Library           flexiblas_list(3)
2
3
4

NAME

6       flexiblas_list - list available backends.
7
8

SYNOPSIS

10       #include <flexiblas/flexiblas_api.h>
11
12       int  flexiblas_list(char  *name, size_t len, int pos Link with -lflexi‐
13       blas.
14
15

DESCRIPTION

17       flexiblas_list returns information about the available FlexiBLAS  back‐
18       ends.   If the buffer name is set to NULL the function returns the num‐
19       ber of available backends in the FlexiBLAS configuration files.  Other‐
20       wise  the name parameter needs to be a character buffer of size len and
21       the pos arguments specifies the number of the entry to return. The name
22       of the backend is then copy to the buffer name with a length of at most
23       len and the real length of the backend name is returned.  The  name  is
24       copied into the buffer using strncpy with a maximum length of len.
25
26       The  pos parameter is valid in a range from 0..B-1, where B is the num‐
27       ber of backends returned by a first call to flexiblas_list with a  NULL
28       buffer.
29
30       If  the buffer is not large enough, i.e. the return value equals len-1,
31       the returned named can not be used in other FlexiBLAS  API  calls  like
32       flexiblas_load_backend.
33
34

RETURN VALUE

36       On  success, it returns the number of entries in the FlexiBLAS configu‐
37       ration if name==NULL or the length of the returned name using strlen.
38
39       In case of an error, like an out of range index pos, a negative  number
40       is returned.
41
42

ERRORS

44       All negative return values are errors.
45
46

EXAMPLE

48       The following example show how to list all available backends.
49
50   Program Source
51
52       #include <stdio.h>
53       #include <flexiblas/flexiblas_api.h>
54
55       int main ( int argc, char **argv ) {
56            char buffer[512];
57            int n, pos;
58
59            n = flexiblas_list(NULL, 0, 0);
60            for ( pos = 0; pos < n; pos++ ) {
61                 flexiblas_list(buffer, 512, pos);
62                 printf("[%2d] %s\n", pos, buffer);
63            }
64            return 0;
65       }
66

SEE ALSO

68       flexiblas_list_loaded(3), flexiblas_load_backend(3)
69
70

REPORTING BUGS

72       The  current information about the developers and reporting bugs can be
73       found on the FlexiBLAS homepage.
74
75       FlexiBLAS  Homepage:   <http://www.mpi-magdeburg.mpg.de/projects/flexi
76       blas>
77
78

AUTHORS

80        Martin Koehler, Jens Saak
81
82
84       Copyright (C) 2013-2020 Martin Koehler
85

LICENSE

87       License      GPLv3+:     GNU     GPL     version     3     or     later
88       <http://gnu.org/licenses/gpl.html>.  This is  free  software:  you  are
89       free  to  change  and  redistribute  it.   There is NO WARRANTY, to the
90       extent permitted by law.
91
92
93
94
95M. Koehler                         Mar. 2017                 flexiblas_list(3)
Impressum