On Nov 8, 2009, at 5:33 AM, Gabor Szabo wrote: > On Wed, Nov 4, 2009 at 3:12 PM, Matthew Kenworthy wrote: >> I'd also add that once I 'got' PDL threading, it completely >> transformed the language for me. It's one of those things that make >> you go 'huh?' at the start, and then when the light bulb appears >> above >> your head, you start realising how powerful it is. > > As I understand it is quite complex to understand especially for > someone > like me who does not understand even the problem domain. Anyway, I > am trying.
The problem domain is simply doing lots of things at once with compact notation -- e.g. "multiply these two numbers" becomes "multiply these giant collections of numbers, componentwise". PDL threading is just a little more complex than that, because it can handle operators that themselves operate on multidimensional data -- e.g. matrix multiplication operates on 2-D data, so if you feed any matrix operator a 3-dimensional PDL, it will treat it as a collection of matrices. Once you introduce the idea of higher dimensional operators, then cross-dimensional operators (like the various collapse operators, which accept a 1-D object and return a scalar) become natural. The trick to grokking threading is to start thinking in terms of which meaning you've assigned to which dimension in the data -- e.g. "dim 0 runs across X in my data, dim 1 runs across Y, dim 2 runs across color, and dim 3 runs across camera". _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
