C Is Not Suited to SIMD
C (C++) is used to write performant software, however it is ill-suited to
SIMD. In particular, its compilation of stepped reduction with lexical scoping opposes parallel execution.As an example, consider the sigmoid,\( x \mapsto \displaystyle \frac{1}{1+e^{-x}} \)In Apple, one can map over an array withλxs. [1%(1+e:(_x))]`{0} xsOne might want to compute \(e^x\) with the system function exp. Arm and x86
have vector instructions for addition, division, &c. but calling a function
entails switching ...
Read more at blog.vmchale.com