THis PR introduces the concept of a buffer Spec. This type is a kind of "lifted" representation for a buffer B: Buffer that aims to reduces compute/memory overhead. Namely, if B is a homogeneous array, then we can need only know it's shape and one present value to perform our typical operations.
With this in mind, we extend the Function trait to allow users to return a Spec in place of a buffer. This facilitates optimised execution up the tree, by avoiding costly operations when the output is guaranteed to be a special case.
THis PR introduces the concept of a buffer
Spec
. This type is a kind of "lifted" representation for a bufferB: Buffer
that aims to reduces compute/memory overhead. Namely, ifB
is a homogeneous array, then we can need only know it's shape and one present value to perform our typical operations.With this in mind, we extend the
Function
trait to allow users to return aSpec
in place of a buffer. This facilitates optimised execution up the tree, by avoiding costly operations when the output is guaranteed to be a special case.