-
Bhatu authored
We add broadcasting support for add, sub, mul and equal. The broadcasting semantics are specified here https://numpy.org/doc/stable/user/basics.broadcasting.html Say we are given input A (4d array): 8 x 1 x 6 x 1 B (3d array): 7 x 1 x 5 We generate a loop with Result (4d array): 8 x 7 x 6 x 5 for i0=[0:8] for i1=[0:7] for i2=[0:6] for i3=[0:8] Result[i0][i1][i2][i3] = A[i0][0][i2][0] {+,*,-,==} B[i1][0][i3]
Bhatu authoredWe add broadcasting support for add, sub, mul and equal. The broadcasting semantics are specified here https://numpy.org/doc/stable/user/basics.broadcasting.html Say we are given input A (4d array): 8 x 1 x 6 x 1 B (3d array): 7 x 1 x 5 We generate a loop with Result (4d array): 8 x 7 x 6 x 5 for i0=[0:8] for i1=[0:7] for i2=[0:6] for i3=[0:8] Result[i0][i1][i2][i3] = A[i0][0][i2][0] {+,*,-,==} B[i1][0][i3]