This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: sqrt via SSE2 registers
On Monday 18 February 2002 13:06, Tom Womack wrote:
> There's then the issue, though it's probably more one for the next glibc
> release after gcc-3.1 appears, of whether a sin() implementation using SSE2
> code and a suitable rational-function approximation could get adequate
> results in less than the 190-or-so cycles that fsin takes: I'm pretty sure
> it's possible, even given that the necessary two divides can't take less
> than 70 ticks and that one might want a table-lookup for argument
> reduction.
>
> Annoyingly, I suspect Intel have done this already though not under a
> GPL-compatible license:
The scheme with Intel C is not so good; if you wish to employ the sqrt
instructions in line, while referring to their SSE library for the others,
you must #include a table which specifies which functions are to link to the
library. AFAIK it does not work with C++. In principle, you could link with
gcc to the Intel math libraries, both the parallel versions in libsvml, and
the single copy versions, by writing in the Intel mangled function name.