flexiblas_list(3)

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

πŸ’– flexiblas_list(3) β€” The FlexiBLAS Library πŸ’–

okay bestie, pull up a chair, because we're about to talk about flexiblas_list, and honestly? she's a whole vibe. this page is from the FlexiBLAS manual, section 3, and she's here to tell you exactly which backends you've got chilling in your config. no gatekeeping. πŸ’…


✨ NAME ✨

flexiblas_list β€” list available backends. that's it, that's the job. iconic behavior fr fr πŸŽ€


🌸 SYNOPSIS 🌸

#include <flexiblas/flexiblas_api.h>

int flexiblas_list(char *name, size_t len, int pos Link with
-lflexiblas.

(yeah, the line wrapping on that last bit is a little feral, but it's what the page says, so we're keeping it exactly. no notes. πŸ™ˆ)


πŸ¦‹ DESCRIPTION πŸ¦‹

so, flexiblas_list hands you the tea about all the available FlexiBLAS backends. here's the lowdown:

  • if you set the buffer name to NULL, she doesn't give you a name β€” she gives you the number of available backends in the FlexiBLAS configuration files. like a little headcount. ✨
  • otherwise, name has to be a character buffer of size len, and pos tells her which entry you want back. she copies the backend name into your buffer name with a length of at most len, and returns the real length of the backend name. the copy itself happens with strncpy, with a maximum length of len. no cap. 🫢
the pos parameter is valid in a range from 0..B-1, where B is the number of backends you got back from your first call to flexiblas_list with a NULL buffer. so do the headcount first, bestie, don't just start guessing indexes. πŸ’€
⚠️ and listen β€” if your buffer is not large enough, meaning the return value equals len-1, then the name you got back can not be used in other FlexiBLAS API calls like flexiblas_load_backend. it's giving truncated. don't do it. 😭

πŸ”₯ RETURN VALUE πŸ”₯

on success, she returns the number of entries in the FlexiBLAS configuration if name==NULL, or the length of the returned name using strlen. slay. πŸ‘‘

in case of an error, like an out-of-range index pos, a negative number comes back. that's your sign something went wrong. 🚨


πŸ’€ ERRORS πŸ’€

all negative return values are errors. every single one. if it's negative, it's not cute, it's a problem. periodt. πŸ’…


🌈 EXAMPLE 🌈

here's how you list all available backends, bestie. chef's kiss. 😌

πŸ“ 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 πŸ‘‘


🧚 REPORTING BUGS 🧚

the current info about the developers and reporting bugs can be found on the FlexiBLAS homepage. go say hi, they're lovely.

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.


and that's the whole page, bestie!! πŸ’– this one was written by M. Koehler, and the page is dated 2013-2025, living under the name flexiblas_list(3). go forth and list those backends, you absolute main character. πŸ¦‹βœ¨πŸŒΈ

πŸ“¦ where this page comes from