Displaying 20 results from an estimated 501 matches for "pow".
Did you mean:
now
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi,
Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and
llvm.sin.*
For example:
double foo(double x, double y) {
return pow(x,y);
}
will compiled into ll:
define double @foo(double %x, double %y) {
%tmp3 = tail call double @pow( double %x, double %y )
ret double %tmp3
}
This is not consistent with llvm language reference.
--------------...
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
...trou via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>>
>>> On Mon, 9 Jan 2017 11:43:17 -0600
>>> Wei Ding via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>>> Hi,
>>>>
>>>> I want an efficient way to implement function pow in LLVM instead of
>>>> invoking pow() math built-in. For algorithm part, I am clear for the logic.
>>>> But I am not quite sure for which parts of LLVM should I replace built-in
>>>> pow with another efficient pow implementation. Any comments and feedback
>&g...
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
2007/11/22, Duncan Sands <baldrick at free.fr>:
>
> Hi,
>
> > Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and
> > llvm.sin.*
> > For example:
> >
> > double foo(double x, double y) {
> > return pow(x,y);
> > }
> >
> > will compiled into ll:
> >
> > define double @foo(double %x, double %y) {
> > %tmp3 = tail call double @pow( doubl...
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 5:03 AM, Antoine Pitrou via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Mon, 9 Jan 2017 11:43:17 -0600
> Wei Ding via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>> Hi,
>>
>> I want an efficient way to implement function pow in LLVM instead of
>> invoking pow() math built-in. For algorithm part, I am clear for the logic.
>> But I am not quite sure for which parts of LLVM should I replace built-in
>> pow with another efficient pow implementation. Any comments and feedback
>> are appreciated. Than...
2007 Nov 22
0
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi,
> Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and
> llvm.sin.*
> For example:
>
> double foo(double x, double y) {
> return pow(x,y);
> }
>
> will compiled into ll:
>
> define double @foo(double %x, double %y) {
> %tmp3 = tail call double @pow( double %x, double %y )
> ret double %tmp3
> }
>...
2017 Jan 09
5
The most efficient way to implement an integer based power function pow in LLVM
Hi,
I want an efficient way to implement function pow in LLVM instead of
invoking pow() math built-in. For algorithm part, I am clear for the logic.
But I am not quite sure for which parts of LLVM should I replace built-in
pow with another efficient pow implementation. Any comments and feedback
are appreciated. Thanks!
--
Wei Ding
-------------- nex...
2020 Sep 13
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
The transformation in LibCallSimplifier::replacePowWithSqrt with respect to
-Inf uses a select instruction, which based on the observed behaviour,
incorporates the side effects of the unchosen branch. This means that (for
pow) a call to sqrt(-Inf) is materialized. Such a call is specified as
having a domain error (C17 subclause 7.12.7.5) since the o...
2000 Jul 24
1
scoping problems (PR#614)
...submitting this to r-bugs, since Thomas Lumley indicates that it
might be an error:
On Wed, 5 Jul 2000, Thomas Lumley wrote:
> On Wed, 5 Jul 2000, halvorsen wrote:
>
> > Hola!
> >
> > I have the following simple function:
> >
> > > testcar
> > function(pow){
> > ob <- glm(Pound~CG+Age+Vage,data=car,weights=No,
> >
subset=No>0,family=quasi(link=power(pow),var=mu^2))
> >
> > deviance(ob)
> > }
> > But trying to run it gives:
> >
> > > testcar(1/2)
> > Error in power(po...
2005 Apr 28
0
[LLVMdev] SimplifyLibCalls Pass -- Help!
...) you don't understand one
of them or (c) you find a bug in one of them.
Thanks,
Reid
abs:
* abs(cnst) -> cnst'
atan:
* atan(0.0) -> 0.0
* atan(1.0) -> pi/4
cbrt:
* cbrt(constant) -> constant'
* cbrt(expN(X)) -> expN(x/3)
* cbrt(sqrt(x)) -> pow(x,1/6)
* cbrt(sqrt(x)) -> pow(x,1/9)
ceil, ceilf, ceill:
* ceil(constant) -> constant'
cos, cosf, cosl:
* cos(0.0) -> 1.0
* cox(-x) -> cos(x)
exp, expf, expl:
* exp(0.0) -> 1.0
* exp(int) -> contant'
* exp(log(x)) -> x
fabs, fabsf...
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
Sorry - I misread your example and the problem. I see now where
LibCallSimplifier creates the select...but we are immediately erasing that
select with the code from the godbolt example.
Does the real motivating case have no uses of the pow() result value?
On Mon, Sep 14, 2020 at 1:03 PM Sanjay Patel <spatel at rotateright.com> wrote:
> Yes, I mean just bail out on the transform in
> LibCallSimplifier::replacePowWithSqrt() -> getSqrtCall(). If we can't prove
> the call behaves the same with errno, then give up....
2020 Sep 14
2
Invalid transformation in LibCallSimplifier::replacePowWithSqrt?
On Mon, Sep 14, 2020 at 12:45 PM Sanjay Patel <spatel at rotateright.com>
wrote:
> Yes, that looks like a bug. The transform is ok in general for negative
> numbers, but -Inf is a special-case for pow(), right?
> If so, we probably need an extra check of the input with
> "isKnownNeverInfinity()".
>
There is an extra check there already, but it uses "select" instead of
branching. One question is if branching is okay to use instead. Or perhaps
you mean the transform sh...
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
...>>> On Mon, 9 Jan 2017 11:43:17 -0600
>>>>> Wei Ding via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I want an efficient way to implement function pow in LLVM instead of
>>>>>> invoking pow() math built-in. For algorithm part, I am clear for the logic.
>>>>>> But I am not quite sure for which parts of LLVM should I replace built-in
>>>>>> pow with another efficient pow implementation. Any comm...
2000 Jul 05
1
Scoping problem
Hola!
I have the following simple function:
> testcar
function(pow){
ob <- glm(Pound~CG+Age+Vage,data=car,weights=No,
subset=No>0,family=quasi(link=power(pow),var=mu^2))
deviance(ob)
}
But trying to run it gives:
> testcar(1/2)
Error in power(pow) : Object "pow" not found
I have tried to use debug on...
2007 Nov 22
0
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi,
> Sure. But now the question is the llvm-gcc will not emit llvm.pow.* anytime.
indeed there seems to be no code in llvm-gcc to do so, though there is code for
raising to an integer power (in llvm-convert). Please feel free to investigate
and add some. Presumably it should turn gcc's BUILT_IN_POW into llvm.pow.*.
That said, as far as I can see the C front-end...
2006 Sep 21
2
Exponentiate a matrix
Suppose I have a square matrix P
P <- matrix(c(.3,.7, .7, .3), ncol=2)
I know that
> P * P
Returns the element by element product, whereas
> P%*%P
Returns the matrix product.
Now, P^2 also returns the element by element product. But, is there a
slick way to write
P %*% P %*% P
Obviously, P^3 does not return the result I expect.
Thanks,
Harold
[[alternative HTML version
2013 Aug 13
2
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
Hi,
It looks like SimplifyLibCalls has a tendency to emit calls to libm functions without checking with TLI whether these calls are available.
For example, PowOpt has this code:
struct PowOpt : public UnsafeFPLibCallOptimization {
PowOpt(bool UnsafeFPShrink) : UnsafeFPLibCallOptimization(UnsafeFPShrink) {}
virtual Value *callOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) {
Value *Ret = NULL;
if (UnsafeFPShrink &&...
2003 Nov 12
1
Power (^) 10x slower in R since version 1.7.1... What next?
OK, I have made a little search about this "problem" that apparently occurs
only on Windows platform... (but I am sure most of you are already aware of
it): the slow down is due to the adoption of a different algorithm for pow
in mingw 3.x. This is motivated by some other changes in mingw. Here is a
quote of Danny Smith that did this change:
>When mingw changed default FPU settings from 53-bit mantissa
>to 64 bit mantisa, the dll-provided pow function no longer
>returned integral values when both operands were...
2008 May 21
1
colorspace package does not compile on ubuntu 7.04 32 bit
...:
/usr/share/R/include/Rinternals.h:770: error: expected declaration
specifiers or ?...? before ?FILE?
/usr/share/R/include/Rinternals.h:773: error: expected declaration
specifiers or ?...? before ?FILE?
colorspace.c: In function ?gtrans?:
colorspace.c:28: warning: implicit declaration of function ?pow?
colorspace.c:28: warning: incompatible implicit declaration of built-in
function ?pow?
colorspace.c: In function ?ftrans?:
colorspace.c:36: warning: incompatible implicit declaration of built-in
function ?pow?
colorspace.c: In function ?g?:
colorspace.c:92: warning: incompatible implicit declarati...
2012 Jun 25
0
Trouble with starting pow
...by-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/
custom_require.rb:36:in `require''
~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/
custom_require.rb:36:in `require''
~/projects/pantene_us/config.ru:3:in `block in <main>''
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/
nack/builder.rb:4:in `instance_eval''
~/Library/Application Support/Pow/Versions/0.3.2/node_modules/nack/lib/
nack/builder.rb:4:in `initialize''
~/projects/pantene_us/config.ru:1:in `new''
~/projects/pantene_us/config.ru:1:in `<main&g...
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
PS: It is possible that the C front-end doesn't need to
explicitly produce BUILT_IN_POW because it is auto-synthesized
somehow from a call to "pow". I wouldn't know. One way to
find out is to compile a testcase and rummage around inside
the gcc trees when they hit llvm-convert.