flexiblas_list(3)

NAME
flexiblas_list - list available backends.

SYNOPSIS
#include <flexiblas/flexiblas_api.h> int flexiblas_list(char *name, size_t len, int pos Link with -lflexiblas.

DESCRIPTION
flexiblas_list returns information about the available FlexiBLAS backends. If the buffer name is set to NULL the function returns the number of available backends in the FlexiBLAS configuration files. Otherwise the name parameter needs to be a character buffer of size len and the pos arguments specifies the number of the entry to return. The name of the backend is then copy to the buffer name with a length of at most len and the real length of the backend name is returned. The name is copied into the buffer using strncpy with a maximum length of len. The pos parameter is valid in a range from 0..B-1, where B is the number of backends returned by a first call to flexiblas_list with a NULL buffer. If the buffer is not large enough, i.e. the return value equals len-1, the returned named can not be used in other FlexiBLAS API calls like flexiblas_load_backend.

RETURN VALUE
On success, it returns the number of entries in the FlexiBLAS configuration if name==NULL or the length of the returned name using strlen. In case of an error, like an out of range index pos, a negative number is returned.

ERRORS
All negative return values are errors.

EXAMPLE
The following example show how to list all available backends.

  Program Source
#include <stdio.h>
#include <flexiblas/flexiblas_api.h>
int main ( int argc, char **argv ) {
	char buffer[512];
	int n, pos;
	n = flexiblas_list(NULL, 0, 0);
	for ( pos = 0; pos < n; pos++ ) {
		flexiblas_list(buffer, 512, pos);
		printf("[%2d] %s\n", pos, buffer);
	}
	return 0;
}

SEE ALSO
flexiblas_list_loaded(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/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.