Ops(3pm)
π Ops(3pm) β PDL::CCS::Ops π
okay bestie, listen up β this is the manual page for PDL::CCS::Ops, part of the User Contributed Perl Documentation collection. It's giving low-level binary operations for compressed-storage sparse PDLs, and it is so much nerdier than it sounds. π§
β¨ NAME β¨
PDL::CCS::Ops β low-level binary operations for compressed storage sparse PDLs π¦
πΈ SYNOPSIS πΈ
use PDL;
use PDL::CCS::Utils;
##---------------------------------------------------------------------
## ... stuff happens
yeah bestie that's the whole synopsis, the vibes are immaculate and the details are in the functions below π
π₯ FUNCTIONS π₯
π ccs_binop_align_block_mia
Signature:
Signature: (
indx ixa(Ndims,NnzA); indx ixb(Ndims,NnzB); indx istate(State);
indx [o]nzai(NnzC); indx [o]nzbi(NnzC); indx [o]ostate(State);
)
okay so what does it DO β it partially aligns a pair of lexicographically sorted index-vector lists $ixa() and $ixb(). Like, imagine you're doing block-wise incremental computation of binary operations over sparse index-encoded PDLs, and you're assuming that missing indices correspond to annihilators. That's the vibe. That's the whole assignment. β¨
On return, the vectors $nzai and $nzbi hold indices into NnzA and NnzB respectively, and they're constructed such that:
($ixa(,$nzai->slice("0:$nzci_max")) == $ixb(,$nzbi->slice("0:$nzci_max"))
At most NnzC alignments are performed, and alignment ceases as soon as any of the PDLs $ixa(), $ixb(), $nzai(), or $nzbi() has been exhausted. Like, it's done, it's clocked out, no cap. π
The parameters $istate() and $ostate() hold the state of the algorithm, for incremental block-wise computation at the perl level. Each state PDL is a 7-element PDL containing these values:
0,nnzaiβ minimum offset inNnzAof current$ixa()value1,nnzai_nxtβ minimum offset inNnzAof next$ixa()value2,nnzbiβ minimum offset inNnzBof current$ixb()value3,nnzbi_nxtβ minimum offset inNnzBof next$ixb()value4,nnzciβ minimum offset inNnzCof current ($ixa(),$ixb()) value pair5,nnzci_nxtβ minimum offset inNnzCof next ($ixa(),$ixb()) value pair6,cmpvalβ 3-way comparison value for current ($ixa(),$ixb()) value pair
For computation of the first block, $istate() can be safely set to zeroes(long,7). π«Ά
Repetitions may occur in input index PDLs $ixa() and $ixb(). If an index-match occurs on such a "run", all pairs of matching values are added to the output PDLs. Periodt. π
All alignments have been performed if:
$ostate(0)==$NnzA && $ostate(1)==$NnzB
β οΈ WARNING: this alignment method ignores index-vectors which are not present in both$ixa()and$ixb(), which is a Good Thing if you are feeding the aligned values into an operation for which missing values are annihilators:$missinga * $bval == ($missinga * $missingb) for each $bval \in $b, and $aval * $missingb == ($missinga * $missingb) for each $aval \in $aThis ought to be the case for all operations if missing values are"BAD"(see PDL::Bad), but might cause unexpected results if e.g. missing values are zero and the operation in question is addition. π bestie, read this part twice.
ccs_binop_align_block_mia does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. π
π ACKNOWLEDGEMENTS π
- Perl by Larry Wall. πͺ
- PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others. β
π KNOWN BUGS π
No support for (pseudo)-threading. that's it, that's the bug, we said what we said π
π AUTHOR π
Bryan Jurish <moocow@cpan.org> π¦
π Copyright Policy
All other parts Copyright (C) 2007-2024, Bryan Jurish. All rights reserved.
This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself. slay, open source rights preserved, no cap π
πΈ SEE ALSO πΈ
perl(1)PDL(3perl)
okay that's the whole page bestie, you ate it π«Άβ¨ This was rendered by perl v5.40.0, dated 2025-01-04, and the page is Ops(3pm). Go forth and align those sparse indices, icon. π π
π¦ where this page comes from
- debian trixie: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms