Open oxinabox opened 4 years ago
Yay, BroadcastStyle
is a proper trait - it depends only on type.
And since the Composite
differential is type-parametric on it’s primal type. Making them broadcast the same is trivial.
So Composite{<:AbstactArray}
will work as well as a AbstractArray
of differentials .
This is really pleasing.
This directly matters for #85
More generally this issue relates to #92 since operations between single deriviatives and chunked dervatives are broadcasting.
Also #96 is related in that it covers the cases not mentioned in the top of this thread.
Particularlyatyers for
Composite
of subtypes of AbstractArrayFor Thunks we need to
unthunk
at start, by overloadingbroadcasted