On Tue, Jan 3, 2012 at 4:08 PM, Craig DeForest <[email protected]> wrote: > ...snip... > > The threading engine needs to be thought about if full support is implemented > for generic empty PDLs. In particular, I believe empty dimensions should > fail to match anything other than empty dimensions -- so, e.g., if $a is 2x0 > and $b is 2x1, then "$a*$b" should throw an error, which it doesn't currently: > > $a = whichND(pdl(0))->(*2); > $b = sequence(2,1); > sub PDL::xdims { join("x",$_[0]->dims) } > printf "%s * %s ==> %s\n", map { xdims $_ } ($a,$b,$a*$b); > > yields > 2x0 * 2x1 ==> 2x0 > > rather than (more correctly) something like: > PDL: PDL::Ops::mult(a,b,c): Parameter 'b': > Mismatched implicit thread dimension 1: should be 0, is 1
Hmm, that seems to special case the empty piddle rather that following the standard rule that dims of size 1 match anything for threading. I don't know if that breaks something but having an explicit error that is not required means that coding always has to check for that case. Cheers, Chris _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
