Hi Eric On July 5, 2022 11:19:58 PM CDT, Eric Wheeler <p...@lists.ewheeler.net> wrote: >On Fri, 1 Jul 2022, Luis Mochan wrote: >> ... >> my $Sm=$S->mv(0,-1) # position, filerow >> ->reshape(2,2, $rows); # column, row, filerow > >Can you explain what $S->mv(0,-1) does with respect to the -1 value? The >pdl docs don't cover what -1 means (or at least its not covered near the >`mv` function). Maybe -1 is has a standard meaning in PDL terminology? >
'mv(0,-1)' moves the first to the last dimension. In this case there are only two dimensions before the reshape, so you could also use 'mv(0,1)', 'transpose', 'xchg(0,1)'. >I think I have it working for our dataset. The resulting code is more >complicated than your beautiful example because I had to handle touchstone >edge cases (like 2-port is col-major and all others are row-major) as well >as arbitrary matrix sizes (2x2, 4x4, etc)---but it works! Great! > >Questions: > >Does PDL parallelize vector arithmetic somehow or do I need to do >something further to enable threading? > >If so, how does it parallelize the work? > >Is there anything to consider when building PDL code so it scales for >parallelization? > I understand that in your case, the range of your row index, the 'broadcast' dimension, would be split into subranges and each fed to a different core. Look at the documentation of PDL::ParallelCPU Regards, Luis -- Enviado desde mi celular; disculpe la horrografía _______________________________________________ pdl-general mailing list pdl-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-general