Displaying 3 results from an estimated 3 matches for "uniform_real_distribut".
2016 Apr 04
2
RFC: Constant folding math functions for long double
Hi Joerg,
> IMO if constant folding of transcendental functions makes a significant
difference for your program, you likely are doing something strange
already.
Alas it's not as simple as that. Currently, if you declare:
std::uniform_real_distribution<float> x;
LLVM emits two calls to logl() with constant arguments, a fdiv and a fptoui.
Libc++'s implementation is consumed and folded much more nicely by LLVM,
but at the moment anyone comparing LLVM and GCC will think that GCC is
around 40% better for some workloads.
James
On Mon,...
2016 Apr 04
3
RFC: Constant folding math functions for long double
...m.org> wrote:
>
> Hi Joerg,
>
> > IMO if constant folding of transcendental functions makes a significant
> difference for your program, you likely are doing something strange
> already.
>
> Alas it's not as simple as that. Currently, if you declare:
>
> std::uniform_real_distribution<float> x;
>
> LLVM emits two calls to logl() with constant arguments, a fdiv and a
> fptoui.
>
> Libc++'s implementation is consumed and folded much more nicely by LLVM,
> but at the moment anyone comparing LLVM and GCC will think that GCC is
> around 40% better fo...
2016 Apr 04
9
RFC: Constant folding math functions for long double
Hi,
Clang is currently unable to constant fold calls to math.h functions such
as logl(), expl() etc.
The problem is that APFloat doesn't have these functions, so Clang is
forced to rely on the host math library. Because long double isn't
portable, we only ever query the host math library for double or float
results.
I can see three methods for allowing constant folding for types that