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

NAME

6       flexiblas_switch - switch the currently used FlexiBLAS backend.
7
8

SYNOPSIS

10       #include <flexiblas/flexiblas_api.h>
11
12       int flexiblas_switch(int id );
13
14       Link with -lflexiblas.
15
16

DESCRIPTION

18       flexiblas_switch  switches  the currently used BLAS backend. The id pa‐
19       rameter is the id of the previously loaded backend. This  id  value  is
20       returned  by  flexiblas_load_backend or flexiblas_load_backend_library.
21       The function is not thread safe and  switching  the  backend  inside  a
22       threaded environment can cause problems if there is a BLAS call running
23       at the same time.
24
25       The special id 0 resets the backend to the  default  backend  which  is
26       loaded at the initialization before the program starts.
27
28
29

RETURN VALUE

31       On success, it returns zero.
32
33

ERRORS

35       All negative return values are errors. This happens if the id is out of
36       range.
37
38

EXAMPLES

40       The following example loads the NETLIB BLAS backend and switches to it.
41
42   Program Source
43
44       #include <stdio.h>
45       #include <flexiblas/flexiblas_api.h>
46
47       int main ( int argc, char **argv ) {
48            int netlib_id;
49
50            netlib_id = flexiblas_load_backend("NETLIB");
51            if ( netlib_id < 0 ) {
52                 fprintf(stderr, "Failed to load the NETLIB backend.\n");
53                 return -1;
54            }
55            /* Switch to the NETLIB backend */
56            flexiblas_switch(netlib_id);
57
58            /* DGEMM performed with the NETLIB backend. */
59            dgemm_(.....);
60
61            return 0;
62       }
63
64

SEE ALSO

66       flexiblas_load_backend_library(3), flexiblas_load_backend(3)
67
68

REPORTING BUGS

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

AUTHORS

78        Martin Koehler, Jens Saak
79
80
82       Copyright (C) 2013-2022 Martin Koehler
83

LICENSE

85       License  GPLv3+:  GNU  GPL  version  3  or  later   <http://gnu.org/li
86       censes/gpl.html>.   This  is  free software: you are free to change and
87       redistribute it.  There is NO WARRANTY, to the extent permitted by law.
88
89
90
91
92M. Koehler                         2013-2022               flexiblas_switch(3)
Impressum