<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 3:36 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:monospace;font-size:9pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">On vendredi 17 avril 2020 13:29:17 CEST Charles Karney wrote:</p>
<p style="margin:0px;text-indent:0px">> I wonder whether it's possible to get the benefits of vectorization</p>
<p style="margin:0px;text-indent:0px">> without massive of changes to the code. </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">That's exactly what I had in mind.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> Perhaps the basic projection</p>
<p style="margin:0px;text-indent:0px">> functions could be templated to allow Eigen arrays of PJ_LP's to be</p>
<p style="margin:0px;text-indent:0px">> passed.  Eigen already has overloads for componentwise arithmetic</p>
<p style="margin:0px;text-indent:0px">> operations and handles SIMD vectorization automatically.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">I didn't know Eigen, but from a quick look & try, it seems I've done something similar.</p>
<p style="margin:0px;text-indent:0px">At least for types like Vector2d, Vector4d. But Eigen is quite limited in the operations it supports. Just +, -, *, /. No comparisons, sqrt, sin, cos, etc.</p>
<p style="margin:0px;text-indent:0px">Which my prototype supports (through sleef for sin, cos, etc).</p></div></blockquote><div> </div><div><a href="https://eigen.tuxfamily.org/dox/group__CoeffwiseMathFunctions.html">https://eigen.tuxfamily.org/dox/group__CoeffwiseMathFunctions.html</a> <br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div></div>