[LLVMdev] SIMD trigonometry/logarithms?

Jose Fonseca jfonseca at vmware.com
Thu Feb 14 06:48:53 PST 2013


FWIW, llvmpipe has C-binding code that generates (inlines) log/exp/pow/sin/cos functions of the fly, for an arbitrary number of elements (in most cases), and uses sse/avx intrinsics as available: 

http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/auxiliary/gallivm/lp_bld_arit.c 

The precision is 20bits, which is enough for 3D. But it wouldn't be difficult to have more (or even variable) precision, by using higher degree approximating functions were appropriate. 

The code is in a permissible license. 

Jose 

----- Original Message -----

> Hi everyone,

> I was looking at loop vectorizer code and wondered if there was any current
> or planned effort to introduce SIMD implementations of sin/cos/exp/log
> intrinsics (in particular for x86-64 backend)?

> Cheers,

> Dimitri.

> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130214/fe71b8dc/attachment.html>


More information about the llvm-dev mailing list