qutil_double_mult(3)
π 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
checkfebis 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:
qutil_double_sum(3)qutil_double_max(3)qutil_double_min(3)qutil_uint_sum(3)qutil_uint_max(3)qutil_uint_min(3)qutil_int_sum(3)qutil_int_max(3)qutil_int_min(3)qutil_mergesort(3)qutil_qsort(3)
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
- fedora 43: qthreads-devel 1.22^20251007gitcedb1fc-1.fc43 Β· BSD-3-Clause AND MIT AND dtoa
- fedora 44: qthreads-devel 1.22^20251007gitcedb1fc-2.fc44 Β· BSD-3-Clause AND MIT AND dtoa
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms