Basically the ( , ) is getting around the issue that Raul has nicely
described - we want to turn the shape of the boxes into a simple list

u&v applies the verb v to x and y before running x u y
i.e. x u&v y  <==>  (v x) u (v y)

where u =: +/ .*&.>/
and   v =: ,

The last ( / ) is the dyadic form - Table [1] and applies each cell of
x to the whole of y
An alternative formulation that does the same thing is:
   (,tA) +/ .*&.>"0 _  (,tB)

[1] http://www.jsoftware.com/docs/help701/dictionary/d420.htm

On Tue, Nov 8, 2011 at 11:17 AM, Jan Jacobs <[email protected]> wrote:
> Wow, that is exactly what I wanted, it is "equivalent" with +/ . *
> applied the unpartitioned matrices A and B.
> Can you explain why you've added /&, ?
> Thanks for the help!
>
> On Mon, Nov 7, 2011 at 9:50 PM, Ric Sherlock <[email protected]> wrote:
>> or did you want
>>   tA +/ .*&.>/&, tB
>> ┌─────────┬─────────┬─────────┐
>> │330 345  │360  375 │ 390  405│
>> │870 921  │972 1023 │1074 1125│
>> ├─────────┼─────────┼─────────┤
>> │1410 1497│1584 1671│1758 1845│
>> │1950 2073│2196 2319│2442 2565│
>> ├─────────┼─────────┼─────────┤
>> │2490 2649│2808 2967│3126 3285│
>> │3030 3225│3420 3615│3810 4005│
>> └─────────┴─────────┴─────────┘
>>
>>
>> On Tue, Nov 8, 2011 at 9:40 AM, Ric Sherlock <[email protected]> wrote:
>>> (,tA) +/ .*&.> (,tB)
>>>
>>> On Tue, Nov 8, 2011 at 9:09 AM, Jan Jacobs <[email protected]> wrote:
>>>> ls,
>>>> for educational purposes I want to breakdown a CUDA matrix
>>>> multiplication in smaller parts.
>>>> What I do not understand is that for B=:A =: i.6 6
>>>>  tA =: (2 2,:2 2)<;._3 A
>>>>  tB =: (2 2,:2 2)<;._3 B
>>>>  tA (+/ . *)&.> tB
>>>> works fine, but
>>>>  tA =: (2 6,:2 6)<;._3 A
>>>>  tB =: (6 2,:6 2)<;._3 B
>>>>  tA (+/ . *)&.> tB
>>>> does not:
>>>> |length error
>>>> |   tA    (+/ .*)"1&.>tB
>>>>
>>>> The shapes of the various boxes are as expected.
>>>> What is going wrong?
>>>> Thanks in advance for the help.
>>>> Jan.
>>>>
>>>>
>>>> --
>>>> Jan Jacobs
>>>> Esdoornstraat 33
>>>> 5995AN Kessel
>>>> W: www.sommaps.com
>>>> T: +31 77 462 1887
>>>> M: +31 6 23 82 55 21
>>>> E: [email protected]
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
>
> --
> Jan Jacobs
> Esdoornstraat 33
> 5995AN Kessel
> W: www.sommaps.com
> T: +31 77 462 1887
> M: +31 6 23 82 55 21
> E: [email protected]
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to