power up skvx::map

Rewrite map() to allow any number of arguments,
now also used for 2-argument (pow) and 3-argument (fma) operations.

I left a note about fma()... I can't understand why, but calling as
map(fmaf, x,y,z) ends up with scalar calls to fmaf(), but with the
lambda indirection we see perfect vector codegen.

I had to break map() back into two parts. I don't see any way to pass
both a variadic number of arguments and play our trick with the default
std::index_sequence parameter.  The lane lambda similarly exists only to
split up the expansion of the Rest... type pack from the I... index
pack; you can't use two pack expansions in the same expression.

Change-Id: Ia156a7fd846237f687d6018a7f95550c9fd4a56d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325736
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2 files changed