[Libclc-dev] [PATCH 3/3] Implementations for exp(float) and exp(double)

Daniel Liew daniel.liew at imperial.ac.uk
Sun May 11 04:45:57 PDT 2014


> Thanks for spotting the mistake.

No problem.

> Irrespective of this mistake. I’m wondering if this is the best way to separate the float from double behaviour or whether there’s a clearer way to do this.

It's not the easiest of code to follow due to all the macros but
that's probably because I'm not that familiar with libclc's code base.

Maybe this is a dumb question but would it be possible to just always
use the high precision constant (LOG2E) and rely on the compiler to
implicitly cast down to float (32-bit) for the float types? This would
simplify the implementation.

Thanks,
Dan.




More information about the Libclc-dev mailing list