On 07/21/2016 12:08 AM, Julien Bect wrote:
I think we have a misunderstanding about what "broadcast" means.
Even if you have a function with four arguments, broadcasting (as I
understand it) doesn't mean that you will end up with a 4-dimensional
(or 8-dimensional ???) array.
You'd get a 4-dimensional tensor if your definition was to use a
direct tensor product, i.e. every dimension in the input arguments
constitutes a dimension of the output.
The templates should be pretty straightforward to modify for
broadcasting. What you'd need to do is first figure out the common
dimensions, then pad everything to the common dimensions, and just
change the calculation and return sections. This only needs to be done
in a single place, namely, the generate_template.sh script.