flexiblas_list - Man Page

list available backends.

Synopsis

#include <flexiblas/flexiblas_api.h>

int flexiblas_list(char *name, size_t len, int posRB);

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

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.

Referenced By

flexiblas_current_backend(3), flexiblas_list_loaded(3), flexiblas_load_backend(3), flexiblas_load_backend_library(3).

2013-2022 M. Koehler The FlexiBLAS Library