fi_version(3)

πŸ’– fi_version(3) β€” the Libfabric v2.5.1 glam era πŸ’–

okay bestie, so this is the fi_version page from the Libfabric v2.5.1 manual, and honestly? it's short, it's sweet, it's giving "one job and she does it perfectly." let's get into it πŸŽ€


✨ NAME ✨

fi_version β€” literally just: the version of the library interfaces. that's it. that's the whole assignment πŸ’…


🌸 SYNOPSIS 🌸

#include <rdma/fabric.h>

uint32_t fi_version(void);

FI_MAJOR(version)

FI_MINOR(version)

like, look at her. three little lines and a header. iconic. the way she doesn't need a single argument... we love a low-maintenance queen πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so you call this thing β€” fi_version() β€” and it hands you back the current version of the library interfaces. no cap ✨

and the version isn't some vague vibe, it's got two parts: a major number and a minor number. and here's the cute part β€” you don't have to do the math yourself, because you can pull them out of the returned value with the FI_MAJOR() and FI_MINOR() macros 🧚

so: call it, get a number, split it with the macros, know your version. slay, done πŸ’œ


⭐ NOTES ⭐

ngl this is important: the library may support older versions of the interfaces. so the version you get back isn't necessarily the only version in the building β€” she's just the current one, and she's got range 🫢


πŸ”₯ RETURN VALUE πŸ”₯

returns the current library version. periodt. πŸ’€

but wait, the bit-packing lore β€” the upper 16-bits of the returned value correspond to the major number, and the lower 16-bits correspond with the minor number. so it's all packed into one uint32_t like a little gift box 🎁

bestie if you ever try to eyeball the raw number and guess the version, please just use FI_MAJOR() / FI_MINOR() instead. that's what they're FOR πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go read those next, iykyk 🌈


πŸ’ AUTHORS πŸ’

OpenFabrics. β€” the whole OpenFabrics crew, respectfully, ate πŸ“


and that's the page, bestie! 🌸 this little gem comes to you from the Libfabric Programmer's Manual, dated 2024-12-10, and it's β€” say it with me β€” fi_version(3) πŸ’–βœ¨πŸ¦‹ mwah, go call the function, love u, bye πŸŽ€

πŸ“¦ where this page comes from