qutil_double_mult(3)

πŸ“¦ version 1.22^20251007gitcedb1fc, in fedora 43, fedora 44

πŸ’– qutil_double_mult(3) πŸ’–

okay bestie, welcome to the libqthread page for qutil_double_mult β€” and her two sisters, qutil_uint_mult and qutil_int_mult. this is the (3) section, so it's a library function situation, and it's literally all about multiplying a whole array at once. parallel girlboss behavior. no cap. ✨


🌈 SYNOPSIS 🌈

like, here's how you summon them:

#include <qthread.h>
#include <qthread/qutil.h>

double
qutil_double_mult (double *array, size_t length, int checkfeb);

unsigned int
qutil_uint_mult (unsigned int *array, size_t length, int checkfeb);

int
qutil_int_mult (int *array, size_t length, int checkfeb);

three flavors, same vibe: double, unsigned int, and plain old int. pick your fighter πŸ’…


✨ DESCRIPTION ✨

so basically, these functions take an array that has length numbers in it, and they hand you back the product of all of them. like, multiplied together. the whole thing. 🧚

the way they do it is in parallel β€” it's a chained-loop structure, and they use qthreads to compute the products in fixed chunks. so instead of one sad little thread doing all the math, it's a whole squad. main character energy fr fr.

now, the checkfeb argument. this is the important part, don't skip it:

  • if checkfeb is non-zero, these functions will wait for the entries in the array to be full before they multiply them.

and here's the part where you gotta be careful, bestie:

They DO NOT check whether the array entries are properly aligned. like, zero checks. none. it's giving "trust falls but nobody catches you" 😭
and if the datatype is too small to do a FEB operation on, they will abort β€” but only if sanity checks are turned on. so like, if the sanity checks are off, who even knows. be normal about it pls.

πŸŽ€ RETURN VALUE πŸŽ€

the product of the first length entries of array. that's it. that's the whole thing. πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, go say hi:


and that's the page!! this one came from libqthread, dated APRIL 2011 β€” yeah she's an elder but she still slays 🫢 multiply responsibly, stay aligned, and don't let the sanity checks be off when it matters. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from