[PROJ] Vector/SIMD acceleration

Even Rouault even.rouault at spatialys.com
Mon Apr 20 01:41:05 PDT 2020


Johan,

> Joris Van Den Bossche drew my attention on this thread as I co-authored
> xsimd. I am not here to advertise my own library, but rather to give a bit
> of context about xsimd.

Advertizing open source software is always fine :-) Thanks for all this information.

> By the way, most of the advanced mathematical functions come from there.

Do you know if there have been assessments of the accuracy of those functions, in terms of 
input range, ULP ? 

> However,
> we see more an more interest in having the possibility to instantiate
> vectors that map to more than one register withouth requiring to pull
> another complex library with totally unrelated features. So we are
> considering implementing this feature as well in xsimd.

I think that could be useful indeed. Perhaps through a dedicated type, so
that the user really knows what they do (and potentially have to check impact on register use 
by looking at assembly)

For the use case I've in mind for PROJ, a potential point of caution for, let's say a 
MY_VECTOR_TYPE<double, 4>, would be to make sure it is possible to have the same code 
compiled once with SSE2 (in which case this would be 2 SSE registers) and once with AVX 
(would be a AVX register) within the same library, when one wants to generate generic 
binaries with runtime selection of the implementation. If the type has exactly the same name 
in the -msse and -mavx enabled objects, that could result in One-Definition-Rule violation, 
and, beyond that theoretical concern, in real symbol clashes if some big functions aren't 
inlined. I can imagine that could be solved by allowing some way to override / add something 
to the namespace of the header that would define such type. Or maybe something smarter :-)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200420/7a367900/attachment.html>


More information about the PROJ mailing list