similar to: [LLVMdev] complex library functions (creal and cimag)

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] complex library functions (creal and cimag)"

2012 Apr 27
0
[LLVMdev] complex library functions (creal and cimag)
On Fri, Apr 27, 2012 at 12:09 PM, Akira Hatanaka <ahatanak at gmail.com> wrote: > When I compile this code which includes call to crealf, > > $ cat foo1.c > #include <complex.h> > > float foo1(complex float z) { return crealf(z); } > > clang emits a call to crealf, > > $ clang  foo1.c -S -o - -O3 > foo1:                                   # @foo1 >
2012 Apr 28
1
[LLVMdev] complex library functions (creal and cimag)
On Apr 27, 2012, at 2:02 PM, Eli Friedman wrote: > On Fri, Apr 27, 2012 at 12:09 PM, Akira Hatanaka <ahatanak at gmail.com> wrote: >> while gcc does it in two move instructions: >> >> $ gcc foo1.c -S -o -O3 >> foo1: >> .LFB0: >> .cfi_startproc >> movq %xmm0, -8(%rsp) >> movss -8(%rsp), %xmm0 >> >>
2017 May 18
2
[cfe-dev] Struct padding
Hi Mats, When the struct is packed, explicit byte array is introduced to pad the struct. (I saw this happened in clang 3.9.) I want to check if a byte or byte array in an LLVM struct is introduce for explicit padding or not. I don't need to worry about this problem in case the newest clang do not introduce byte array anymore. Thanks Hongbin On Thu, May 18, 2017 at 1:03 AM, mats petersson
2010 Apr 27
1
suggestion on method dispatch
Dear all, I have define a function and its methods as follows: ######## beginning of code fn <- function(x,...){ UseMethod("fn") } fn.foo1 <- function(x, commonA=1, ...){ print("fn.foo1 is called.") } fn.foo2 <- function(x, uniqueFoo2, common=1, ...){ ## uniqueFoo2 is a unique argument in fn.foo2 x <- uniqueFoo2; class(x) <- "foo1" ## use uniqueFoo2
2006 Jul 02
4
Test for argument in ...
Hello! Say I have a function foo1, which has argument ... to pass various arguments to foo2 i.e. foo1 <- function(x, ...) { foo2(x, ...) } Say that foo2 accepts argument arg1 and I would like to do the following: - if foo1 is called as foo1(x) then I would like to assign some value to arg1 inside foo1 before calling foo2 arg1 <- "some value" foo2(x, arg1=arg1) - if foo1 is
2005 Apr 21
1
[LLVMdev] a packed constant cannot be referenced in the arithmetic instruction?
%foo1 = constant <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>; void %main() { %x = mul <4 x float> %foo1, %foo1 ret void } llvm-as complained " Reference to an invalid definition: 'foo1' of type '<4 x float>' ". I searched all test script in llvm/test, and I found the only way to use packed constant is: %foo1 = uninitialized
2006 Apr 11
2
About list to list - thanks
Thank you very much for your useful suggestions. These are exactly what I was looking for. foo <- list(foo1, foo2, foo3) lapply(foo, function(x) matrix(unlist(x), nrow = length(x), byrow = TRUE)) or lapply(foo, function(x) do.call('rbind', x)) Best, Muhammad Subianto On 4/11/06, Muhammad Subianto <msubianto at gmail.com> wrote: > Dear all, > I have a result my experiment
2015 Dec 17
2
Multiple IPs and hostname
Hi, I'm running postfix as SMTP-server and dovecot as IMAP-server. The server has multiple IPs, and postfix is configured that every domain is using a separate IPv4-address. Examle: foo1.com --> 11.22.33.44 foo2.com --> 22.33.44.55 foo3.com --> 33.44.55.66 bar.org --> 66.77.88.99 The hostname of the server is: mail.bar.org Now I have a request from one of my customers,
2006 Apr 11
2
About list to list
Dear all, I have a result my experiment like this below (here my toy example): foo1 <- list() foo1[[1]] <- c(10, 20, 30) foo1[[2]] <- c(11, 21, 31) foo2 <- list() foo2[[1]] <- c(100, 200, 300) foo2[[2]] <- c(110, 210, 310) foo3 <- list() foo3[[1]] <- c(1000, 2000, 3000) foo3[[2]] <- c(1100, 2100, 3100) list(foo1,foo2,foo3) The result: > list(foo1,foo2,foo3) [[1]]
2010 Nov 15
2
How to move an internal function to external keeping same environment?
Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as "external". This foo2 was using arguments within the foo1 environment that were not declared as inputs of foo2, which works as long as foo2 is within foo1, but not anymore if foo2 is external, as is the case now. Now, I could add all those
2018 Apr 05
1
potential file.copy() or documentation bug when copy.date = TRUE
This is a recent R-devel. file.copy() is not vectorized if multiple destinations succeed: cat("foo1\n", file = "foo1") cat("foo2\n", file = "foo2") unlink(c("copy1", "copy2"), recursive = TRUE) file.copy(c("foo1", "foo2"), c("copy1", "copy2"), copy.date = TRUE) #> Error in
2014 May 02
1
Authors@R: and Author field
Hi to all Authors@R: c(person("fooa","foob", role = c("aut","cre"), email = "fooa.foob@fooc.de"), person("foo1","foo2", role = c("ctb"), email = "foo1.foo2@foo3.de")) Author: fooa foob, with contributions from foo1 foo2 using r CMD check --as-cran .. (R 3.1
2008 Oct 05
1
plyr package: passing further arguments fail
Dear list and Hadley, The new plyr package seems to provide a clean and consistent way to apply a function on several arguments. However, I don't understand why the following example does not work like the standard mapply, library(plyr) df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b, cc=0, d=0){ a + b + cc + d } mdply(df, foo1, cc=1) # fine mdply(df, foo1, d=1) #
2012 Oct 17
1
Do *not* pass '...' to NextMethod() - it'll do it for you; missing documentation, a bug or just me?
Hi, although I've done S3 dispatching for more than a decade now, I think I managed to overlook/avoid the following pitfall when using NextMethod(): If you explicitly pass argument '...' to NextMethod(), you will effectively pass those argument twice to the "next" method! EXAMPLE: foo0 <- function(...) UseMethod("foo0"); foo1 <- function(...)
2017 May 18
2
[cfe-dev] Struct padding
the packed + aligned attribute will automatically introduce explicit padding byte array: https://godbolt.org/g/TlHX2g Sometimes Clang will decide to automatically pack the struct/class in C++, I don't know the details here, but looks like it is related to inheritance. Thanks Hongbin On Thu, May 18, 2017 at 1:32 AM, mats petersson <mats at planetcatfish.com> wrote: > How do you
2008 Mar 25
1
Passing (Optional) Arguments
Dear List: In short, I am writing a number of functions as building blocks for other functions and have some questions about scoping and passing arguments. Suppose I have functions foo1, foo2, and foo3 such that: foo1<-function(a=1,b=TRUE,c=FALSE){#do stuff}; foo2<-function(x=1,y=FALSE,z=c(1,2,3,4)){#do stuff}; foo3<-function(lambda,...){lambda*foo1()*foo2()}; I want to be able to
2010 Mar 15
2
Strange behavior of assign in a S4 method.
Hi the list, I define a method that want to change an object without assignation (foo(x) and not x<-foo(x)) using deparse and assign. But when the argument of the method does not match *exactly* with the definition of the generic function, assign does not work... Anything wrong? Christophe #------ Does not work ------#
2011 Jul 01
4
require => Class
Hi I have been trying to use class dependency and had no luck so far. following are the two classes i am trying to use [root@puppet]#cat libreoffice.pp class libreoffice { case $hostname { "foo": { package { "libreoffice": ensure => present, require => Class["foo1"] } } } } [root@puppet]#cat foo.pp class foo1 { package {
2014 Dec 08
2
CRAN packages mis-using \donttest : falsy
On Mon, Dec 8, 2014 at 3:32 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: [...] > Why not declare colorspace as a "Suggests:" kind of dependency? I guess that is a solution. :/ In another example in the 'disposables' package I have: \donttest{ pkg <- make_packages( foo1 = { f <- function() print("hello!") ; d <- 1:10 }, foo2 = { f
2012 Jul 27
1
C code validation
Dear R-devel, I'm trying to validate the results from a C function, against a (trial and tested) older R function. For reasons unknown to me, the C function seems to give different result sometimes at each trial, even with the very same data. These are the relevant outputs from R: > library(QCA) Loading required package: lpSolve > benchmark <- function(x, y) { + index <- 0