Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
flexiblas_switch(3)	      The FlexiBLAS Library	     flexiblas_switch(3)

NAME
     flexiblas_switch - switch the currently used FlexiBLAS backend.

SYNOPSIS
     #include <flexiblas/flexiblas_api.h>

     int flexiblas_switch(int id );

     Link with -lflexiblas.

DESCRIPTION
     flexiblas_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 VALUE
     On success, it returns zero.

ERRORS
     All negative return values are errors. This happens if the  id  is  out  of
     range.

EXAMPLES
     The 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 ALSO
     flexiblas_load_backend_library(3), flexiblas_load_backend(3)

REPORTING BUGS
     The  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>

AUTHORS
      Martin Koehler, Jens Saak

COPYRIGHT
     Copyright (C) 2013-2025 Martin Koehler

LICENSE
     License  GPLv3+:  GNU  GPL   version   3	or   later   <http://gnu.org/li-
     censes/gpl.html>.	This is free software: you are free to change and redis-
     tribute it.  There is NO WARRANTY, to the extent permitted by law.

M. Koehler			    2013-2025		     flexiblas_switch(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=flexiblas_switch&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help