flexiblas_list_loaded(3)

πŸ“¦
version 3.5.0 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– flexiblas_list_loaded(3) β€” the FlexiBLAS girlie's guide to seeing which backends are loaded πŸ’–

okay so bestie, this is a page from The FlexiBLAS Library, and it's about flexiblas_list_loaded β€” literally the function that tells you every backend that's currently loaded. no cap. let's get into it ✨


🌸 NAME 🌸

flexiblas_list_loaded β€” list all loaded backends.


πŸŽ€ SYNOPSIS πŸŽ€

#include <flexiblas/flexiblas_api.h>

int flexiblas_list_loaded(char *name, size_t len, int pos);

Link with -lflexiblas.


✨ DESCRIPTION ✨

flexiblas_list_loaded hands you the tea about all the loaded FlexiBLAS backends. πŸ«–

If you set the buffer name to NULL, the function just returns the number of loaded backends. simple as that.

Otherwise, the name parameter has to be a character buffer of size len, and the pos argument says which entry you want back. The backend's name then gets copied into 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 you got back from a first call to flexiblas_list_loaded with a NULL buffer. (so like… count first, then index. the way that makes sense πŸ’…)

🚨 okay this part matters: if the buffer is not large enough β€” i.e. the return value equals len-1 β€” the returned name can not be used in other FlexiBLAS API calls like flexiblas_load_backend. so like, it's giving truncated. don't pass it around, bestie. 😭

πŸ‘‘ RETURN VALUE πŸ‘‘

On success, it returns the number of loaded backends 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. every single one. periodt.


🌈 EXAMPLE 🌈

The following example show how to list all loaded 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_loaded(NULL, 0, 0);
     for ( pos = 0; pos < n; pos++ ) {
          flexiblas_list_loaded(buffer, 512, pos);
          printf("[%2d] %s\n", pos, buffer);
     }
     return 0;
}

πŸ”₯ SEE ALSO πŸ”₯


πŸ› 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 (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.


okay that's the whole page, you ate that 🫢 this lil gem was brought to you by M. Koehler, dated 2013-2025, and yes it's literally flexiblas_list_loaded(3) β€” go forth and list those loaded backends, main character πŸ’–βœ¨

πŸ“¦ where this page comes from