lis_vector_set_size(3f)
π lis_vector_set_size(3f) π
okay bestie, so this one lives in the Lis Library Functions manual and it's literally just about telling a vector how big it's gonna be. it's giving β¨glow-upβ¨ but for memory. let's get into it π«Ά
πΈ NAME πΈ
lis_vector_set_size β assign the size of the vector
like. you're setting the size. that's the whole job. icon behavior honestly π
β¨ SYNOPSIS β¨
subroutine lis_vector_set_size(LIS_VECTOR v, LIS_INTEGER local_n,
LIS_INTEGER global_n, LIS_INTEGER ierr);
four arguments, no cap, and one of them is just there to tell you if it worked π
π¦ DESCRIPTION π¦
Assign the size of vector v. that's it, that's the tea π you hand it a vector and you tell it how big it should be, and it becomes that big. main character energy fr fr.
π INPUT π
vβ The vector π the actual little guy you're resizing. she's getting a whole new dimension.local_nβ The size of the partial vector πΈ this is the slice that this particular processing element is holding. her local moment.global_nβ The size of the global vector π the whole entire thing, everybody's slices added up. the big picture.
π NOTE π
okay this is the part where you actually have to pay attention, bestie, because there's a rule:
Eitherlocal_norglobal_nmust be provided. not neither. pick one. the function is not gonna guess for you π
In the case of the serial and multithreaded environments, local_n is equal to global_n. so they're the same number, the vibes are unified, nobody's splitting anything. Therefore, both
lis_vector_set_size(v,n,0)
and
lis_vector_set_size(v,0,n)
create a vector of size n. so in serial/multithreaded land you can pass it either way and you still get a vector of size n. slay β¨
For the multiprocessing environment though, it's a different story and the two calls are not interchangeable:
lis_vector_set_size(v,n,0)creates a partial vector of sizenon each processing element. so every PE gets exactlyn. equal distribution, everyone eats π½οΈlis_vector_set_size(v,0,n)creates a partial vector of sizem_pon the processing elementp. so PEpgetsm_p, and the values ofm_pare determined by the library. you don't pick them, the library picks them, and you just trust the process π§
π₯ SEE ALSO π₯
and that's the whole page, periodt π go forth and size your vectors correctly, i believe in you π«Ά
this has been lis_vector_set_size(3f) from the Lis Library Functions manual, dated 6 Sep 2012, served fresh off the Man Page π byeeee β¨
π¦ where this page comes from
- fedora 43: lis-doc 2.0.21-13.fc41 Β· BSD
- fedora 43: lis-doc 2.1.11-1.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: lis-doc 2.0.21-13.fc41 Β· BSD
- fedora 44: lis-doc 2.1.11-1.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: lis 2.1.10
- nixpkgs unstable: lis 2.1.16
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms