[vector] lane-wise operations considered as constants
John Rose
john.r.rose at oracle.com
Thu Jun 20 00:30:19 UTC 2019
On Jun 19, 2019, at 5:22 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> we are doing it for about 90 methods, so it's a net gain
P.S. None of this engages directly with a later concern that
Brian raised, which is that we want a way to *compose*
these operators into optimizable kernels. Today's
operators are just dumb constants. The ADD constant
doesn't even know how to add two numbers together;
it just knows its name, and the lanewise method and
JIT take things from there.
In the future we will (presumably) add more fundamental
support for entities like ADD that know how to apply themselves
to operands. (If a shift operator doesn't know how to apply
itself, does that make it a shiftless operator? Just asking.)
After making real semantic operators, we can then begin
to supply combinators for users to make their own out of
pre-existing parts. And a lambda-cracker can be designed
that breaks a lambda expression down into these standard
parts.
At that point, the existing "lanewise" operators from the
Vector API can be smoothly extended to accept not just
the existing set of "dumb" operator tokens, and not even
a new built-in set of "smart" operators, but an unlimited
space of user-defined composed operators.
I am certain we will get there. I hope the current API is
a stepping stone to that desirable outcome.
More information about the panama-dev
mailing list