Closed boxerab closed 1 week ago
hm, we prefer to avoid invisible conversions, that could have a surprisingly high cost if done often.
I think this would also fail with SVE/RVV: there we'd have svfloat_t * float
, which would require a user-defined overload of svfloat_t, but compilers decided to disallow that and only provide builtin operator*(svfloat_t, svfloat_t)
.
OK, thanks for the explanation, would not want to sacrifice performance for readability
It's nice that operator+ is overloaded, so I can write
(current + res) * Set(d, finalScale)
where current and res are vectors, and finalScale is a scalar. Is it possible to automagically convert finalScale to a vector, so that
(current + res) * finalScale
is compilable ?