similar to: [LLVMdev] unary floating point operations using clang

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] unary floating point operations using clang"

2005 Apr 28
0
[LLVMdev] Floating point instructions patch
On Thu, 28 Apr 2005, Morten Ofstad wrote: > I have been gone for a while, finishing work on my Master's thesis... Hi Morten, congrats! :) > Now that I'm back I updated LLVM to the most recent version and found > that my FP_ABS SelectionDAGNode type and code generation was now > conflicting with the new FABS node type. I brought the rest of my local > modifications in
2005 Apr 29
1
[LLVMdev] Floating point instructions patch
Chris Lattner wrote: > The patches I didn't apply are these: > > 1. Match (Y < 0) ? -Y : Y -> FABS in the SelectionDAGISel.cpp file. We > already catch this at the DAG level. If we aren't, please let me know. OK, no problem - I was just told last time I tried to get my patch in that this was needed because the C++ frontend generated this code, I'm generating
2005 Apr 28
3
[LLVMdev] Floating point instructions patch
Hello, I have been gone for a while, finishing work on my Master's thesis... Now that I'm back I updated LLVM to the most recent version and found that my FP_ABS SelectionDAGNode type and code generation was now conflicting with the new FABS node type. I brought the rest of my local modifications in line with the FABS implementation, so here is my patch that includes sqrt, sin and cos
2005 Jan 04
2
[LLVMdev] Math instructions
Hello, I'm currently adding the floating point math instructions (fabs, fsin, fcos ...) to the x86 instruction set. I'm a bit unsure how to make the back end actually generate these instructions, though. My current plan is to add llvm intrinsics for these instructions but I've noticed that llvm already handles C math library functions to some extent. It feels a bit strange to add
2011 Sep 06
3
[LLVMdev] bug in TableGen when generating RegisterInfo?
Hi everyone, I found some peculiar behavior of TableGen when generating [TARGET]GenRegisterInfo.inc. Some register overlaps are generated twice in this file, leading to a compilation error. I think this is because in RegisterInfoEmitter.cpp, RegisterAliases are declared as "std::map<Record*, std::set<Record*>, LessRecord>" and a requirement for std::map is that the
2011 Sep 07
0
[LLVMdev] bug in TableGen when generating RegisterInfo?
On Tue, Sep 6, 2011 at 9:34 PM, Alexandru Dura <alexdura at gmail.com> wrote: > Hi everyone, > > I found some peculiar behavior of TableGen when generating > [TARGET]GenRegisterInfo.inc. Some register overlaps are generated twice in > this file, leading to a compilation error. Hi, What do you mean "overlapped register"? > I think this is because in
2018 Sep 26
3
[FPEnv] FNEG instruction
On Wed, Sep 26, 2018 at 9:32 AM Sanjay Patel <spatel at rotateright.com> wrote: > > > On Tue, Sep 25, 2018 at 7:47 PM Cameron McInally <cameron.mcinally at nyu.edu> > wrote: > >> >> This is the first time I'm looking at foldShuffledBinop(...), so maybe a >> naive question, but why not do similar shuffle canonicalizations on unary >> (or
2005 Jan 04
0
[LLVMdev] Math instructions
On Tue, 4 Jan 2005, Morten Ofstad wrote: > I'm currently adding the floating point math instructions (fabs, fsin, fcos > ...) to the x86 instruction set. Cool! > I'm a bit unsure how to make the back end actually generate these > instructions, though. My current plan is to add llvm intrinsics for > these instructions but I've noticed that llvm already handles C
2017 Mar 16
4
Support for user defined unary functions
R has long supported user defined binary (infix) functions, defined with `%fun%`. A one line change [1] to R's grammar allows users to define unary (prefix) functions in the same manner. `%chr%` <- function(x) as.character(x) `%identical%` <- function(x, y) identical(x, y) %chr% 100 #> [1] "100" %chr% 100 %identical% "100" #> [1] TRUE
2008 Mar 13
2
Making custom unary operators in R
Hello, Is there a way to define a custom unary operator in R (other than making a class and 'overloading' the normal unary operators in R)? The documentation seems to suggest that only custom binary operators are possible with the ``%abc%``construct but I was wondering whether any one has done so. None of the RSiteSearch or RSeek queries I posed suggested that this question had
2011 Nov 03
1
[LLVMdev] Why there is no unary operator in LLVM?
Hi llvmdev, I've noticed that there is no unary operator in LLVM. For unary operator such as Neg or Or operator, the IR builder just creates a binary operation with one dummy operand, 01823 <http://llvm.org/doxygen/classllvm_1_1BinaryOperator.html#a073c092ce74a122e898e435e60e84599> BinaryOperator <http://llvm.org/doxygen/classllvm_1_1BinaryOperator.html>
2005 Jan 07
1
Creating unary operators
Is it correct (by its lack of mention in the R-Language Definition Manual) that it is impossible to create a user-defined unary operator? Ex: (This doesn't work, but it's an example of what I'm looking for) > "%PLUSONE%" <- function(x) x + 1 > %PLUSONE% 2 [1] 3 And if the above is impossible, am I limited to only the + - ~ ! unary operators for overloading? On
2017 Mar 16
2
Support for user defined unary functions
Gabe, The unary functions have the same precedence as normal SPECIALS (although the new unary forms take precedence over binary SPECIALS). So they are lower precedence than unary + and -. Yes, both of your examples are valid with this patch, here are the results and quoted forms to see the precedence. `%chr%` <- function(x) as.character(x) `%identical%` <- function(x, y)
2003 Mar 13
1
apply() and unary operators
Hi everyone. What's going on here? > a <- matrix(1:4,2,2) > a [,1] [,2] [1,] 1 3 [2,] 2 4 > apply(a,2,sum) [1] 3 7 > apply(a,2,"+") [,1] [,2] [1,] 1 3 [2,] 2 4 > apply(a,1,"+") [,1] [,2] [1,] 1 2 [2,] 3 4 > help(apply) says that "+" should be quoted but is otherwise silent on unary
2013 May 06
1
[LLVMdev] Floating-point FABS - supporting
I posted a similar issue, but this relates to how to keep a function call from being lowered to an ISD:FABS. In this case, I don't want FABS (floating point absolute) to be converted into an operation). In this case, what happens is that clang generates the code for floating point absolute (fabs) as a subroutine call: %5 = load douuble %x, align 8 %call = call double @fabs(double %5)
2012 Oct 30
4
Error unary operator
Hi R - listers, I am receiving an error. Does anyone know what this means? J ggplot(subset(foo, Rayos != "Rayos.NA"), aes(x=HTL, y=DevelopIndex, colour=TotalEggs)) +geom_point() +geom_jitter() + facet_grid(Aeventexhumed ~ Rayos) + geom_smooth(method="lm", fill=NA) + ylim(c(0, 7)) Error in +geom_smooth(method = "lm", fill = NA) : invalid argument to unary
2017 Mar 16
2
Support for user defined unary functions
Martin, Jim can speak directly to his motivations; I don't claim to be able to do so. That said, I suspect this is related to a conversation on twitter about wanting an infix "unquote" operator in the context of the non-standard evaluation framework Hadley Wickham and Lionel Henry (and possibly others) are working on. They're currently using !!! and !! for things related to
2010 Feb 03
1
Proposal unary - operator for factors
Hi all, Why not make the unary minus operator return the factor with levels reversed? This would make it much easier to sort factors in descending order in part of an order statement. Hadley -- http://had.co.nz/
2017 Mar 17
2
Support for user defined unary functions
The unquoting discussion is IMHO separate from this proposal and as you noted probably better served by a native operator with different precedence. I think the main benefit to providing user defined prefix operators is it allows package authors to experiment with operator ideas and gauge community interest. The current situation means any novel unary semantics either need to co-opt existing
2017 Mar 16
2
Support for user defined unary functions
I guess this would establish a separate "namespace" of symbolic prefix operators, %*% being an example in the infix case. So you could have stuff like %?%, but for non-symbolic (spelled out stuff like %foo%), it's hard to see the advantage vs. foo(x). Those examples you mention should probably be addressed (eventually) in the core language, and it looks like people are already able