data block operations (aka simd)
-
Alright, so this works since
block
has a*=
operatorvoid processBlock(block& d) { d *= gain; }
But obviously, this doesn't
void processBlock(block& d) { d = Math.tanh(d * gain); }
Question, would there be a way to optimise vector operations with more complex algorithm than
*=
,+=
, etc...? -
@ustk yes but with diminishing returns. If the complexity of the calculation increases, the performance benefit of vectorization gets less important.
Not super worth it IMHO.
-
@Christoph-Hart Ok I let it go then! Thanks!