flexiblas_l...end_library(3)

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

πŸ’– flexiblas_load_backend_library πŸ’–

okay bestie, welcome to the FlexiBLAS Library manual β€” this one's about flexiblas_load_backend_library, and it's genuinely one of the most useful little gremlins in the whole API. buckle up. πŸŽ€


✨ NAME ✨

flexiblas_load_backend_library β€” load a backend from a shared library.

no cap, that's the whole vibe. you point it at a shared library, it gives you a backend. πŸ’…


🌸 SYNOPSIS 🌸

#include <flexiblas/flexiblas_api.h>

int flexiblas_load_backend_library(const char * libname );

and when you compile, you link with -lflexiblas, obviously. don't forget it, or the linker will simply not let you live. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: flexiblas_load_backend_library loads a backend from a shared library. simple as that.

the libname parameter is where you spill β€” it specifies either a relative or an absolute path of a shared library containing a BLAS implementation. your call, both are valid, you're free.

and then β€” the important bit β€” except of some special backends, like the upcoming CUBLAS backend, the backend is initialized during the load. so for basically every normal case, it's loaded and spun up in one go. main character behaviour, honestly. πŸ‘‘


⭐ RETURN VALUE ⭐

on success, it returns the id of the loaded backend β€” and that id is exactly what you feed into a later call to flexiblas_switch to actually change the backend. so like, keep it. don't lose it. it's your little ticket. 🎟️

if the requested backend can not be found in the configuration, an error is returned. sad girl hours. 😭


πŸ’€ ERRORS πŸ’€

listen up because this one matters:

all negative return values are errors and can not be used as an id for flexiblas_switch. periodt.

so if you get a negative number back, do not β€” I repeat, do not β€” pass it to flexiblas_switch. that's not a backend id, bestie, that's the universe telling you something went wrong. πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

go read them, they're the friend group. ✨


πŸ’œ REPORTING BUGS πŸ’œ

the current information about the developers and reporting bugs can be found on the FlexiBLAS homepage. iykyk.

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, babe. this icon was brought to you by M. Koehler, 2013-2025, and it lives at flexiblas_l...end_library(3). slay, go load a backend. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from