S09 states (in Parallelized parameters and autothreading) that if you
use a parameter as an array subscript in a closure, the closure is a
candidate for autothreading.
- $x, $y { @foo[$x;$y] }
Means:
- ?$x = @foo.shape[0].range,
?$y = @foo.shape[1].range { @foo[$x;$y] }
And each
Quoth Luke Palmer on Monday 31 January 2005 03:46 pm,
C_{ijkl} = A_{ij} * B_{kl}
You write either of:
@C[$^i; $^j; $^k; $^l] = @A[$^i; $^j] * @B[$^k; $^l]
@C = @A[$^i; $^j] * @B[$^k; $^l]
Hmm... This is both insanely great and also greatly insane.
The issue is that,
Luke Palmer writes:
Or to write another typical tensor product:
a^j = L_i^j b^i
You write either of:
@a[$^j] = @L[$^i; $^j] * @b[$^i]
@a = @L * @b;
Or not. There's that implicit Einstein summation involved, and a
general purpose programming language isn't about to give
Craig DeForest writes:
Quoth Luke Palmer on Monday 31 January 2005 03:46 pm,
C_{ijkl} = A_{ij} * B_{kl}
You write either of:
@C[$^i; $^j; $^k; $^l] = @A[$^i; $^j] * @B[$^k; $^l]
@C = @A[$^i; $^j] * @B[$^k; $^l]
Hmm... This is both insanely great and also greatly