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

NAME

6       flexiblas_list_loaded - list all loaded backends.
7
8

SYNOPSIS

10       #include <flexiblas/flexiblas_api.h>
11
12       int flexiblas_list_loaded(char *name, size_t len, int pos);
13
14       Link with -lflexiblas.
15
16

DESCRIPTION

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

RETURN VALUE

37       On success, it returns the number of loaded backends if  name==NULL  or
38       the length of the returned name using strlen.
39
40       In  case of an error, like an out of range index pos, a negative number
41       is returned.
42
43

ERRORS

45       All negative return values are errors.
46
47

EXAMPLE

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

SEE ALSO

69       flexiblas_list(3), flexiblas_load_backend(3)
70
71

REPORTING BUGS

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

AUTHORS

81        Martin Koehler, Jens Saak
82
83
85       Copyright (C) 2013-2020 Martin Koehler
86

LICENSE

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