|
NAMEflexiblas_switch - switch the currently used FlexiBLAS backend. SYNOPSIS#include <flexiblas/flexiblas_api.h> int flexiblas_switch(int id ); Link with -lflexiblas. DESCRIPTIONflexiblas_switch switches the currently used BLAS backend. The id parameter is the id of the previously loaded backend. This id value is returned by flexiblas_load_backend or flexiblas_load_backend_library. The function is not thread safe and switching the backend inside a threaded environment can cause problems if there is a BLAS call running at the same time. The special id 0 resets the backend to the default backend which is loaded at the initialization before the program starts. RETURN VALUEOn success, it returns zero. ERRORSAll negative return values are errors. This happens if the id is out of range. EXAMPLESThe following example loads the NETLIB BLAS backend and switches to it. Program Source#include <stdio.h>
#include <flexiblas/flexiblas_api.h>
int main ( int argc, char **argv ) {
int netlib_id;
netlib_id = flexiblas_load_backend("NETLIB");
if ( netlib_id < 0 ) {
fprintf(stderr, "Failed to load the NETLIB backend.\n");
return -1;
}
/* Switch to the NETLIB backend */
flexiblas_switch(netlib_id);
/* DGEMM performed with the NETLIB backend. */
dgemm_(.....);
return 0;
}
SEE ALSOflexiblas_load_backend_library(3), flexiblas_load_backend(3) REPORTING BUGSThe current information about the developers and reporting bugs can be found on the FlexiBLAS homepage. FlexiBLAS Homepage: <http://www.mpi-magdeburg.mpg.de/projects/flexiblas> AUTHORSMartin Koehler, Jens Saak COPYRIGHTCopyright (C) 2013-2025 Martin Koehler LICENSELicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
|