similar to: [LLVMdev] mixing static/dynamic code

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] mixing static/dynamic code"

2009 May 24
0
[LLVMdev] mixing static/dynamic code
Paul Martin wrote: > Hi, > I have the following code, the lines preceded by `>` being added at > runtime (the snipped was also printed at runtime) > > define i32 @myfunc(i32 %pi) { > entry: > %pi_addr = alloca i32 ; <i32*> [#uses=3] > %retval = alloca i32 ; <i32*> [#uses=2] > %tmp = alloca i32 ;
2009 May 24
2
[LLVMdev] mixing static/dynamic code
Nick, Thanks for the quick answer. Dereferencing the pointer does yield the same result in both cases but that's not what I want to do. I want to instrument the program dynamically and keep track of certain memory locations which is a problem if the same variable has different addresses for the static/dynamic code - as far I see this is what it's happening but I have no clue why. Paul On
2009 May 24
0
[LLVMdev] mixing static/dynamic code
Paul Martin wrote: > > Nick, > Thanks for the quick answer. > Dereferencing the pointer does yield the same result in both cases but > that's not what I want to do. I want to instrument the program > dynamically and keep track of certain memory locations which is a > problem if the same variable has different addresses for the > static/dynamic code - as far I see
2009 May 24
1
[LLVMdev] mixing static/dynamic code
Nick, Your solution works well if there is a store instruction in the function but in the case where there is none (i.e. the argument is passed on directly to another function), creating a store does not help to get the memory address of the variable which takes me back to my initial question at http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-May/022590.html - isn't there a way to obtain the
2011 Oct 29
1
How to plot survival data from multiple trials (simulations)?
Dear all: Could anyone please provide some R codes to plot the below survival data to compare two groups (0 vs 1) after 2 simulations (TRL)? need 95% prediction interval on the plot from these 2 trials. I would like to simulate 1000 trials later. Thanks a lot for your great help and consideration! yan TRL ID ECOG BASE PTR8 GROUP POP ST ind 1 1 1 1 2.2636717 0.255634126 1 1 99.4 F 3 1 2 1
2015 Jun 28
3
[LLVMdev] Legalizing SelectionDAGs with illegal pointer type
On 27 Jun 2015, at 16:13, escha <escha at apple.com> wrote: > >> >> Hi, >> >> I recently started helping with the LLVM AVR backend [1]. The AVR is an 8 bit core with pointer type i16. That makes pointers illegal in the SelectionDAG. As far as I understand it, it is the backends job to legalize these nodes by using the ReplaceNodeResults/LowerOperation callbacks.
2017 Apr 29
0
How to pass a StringRef to a function call inserted as instrumentation?
Hi, Dipanjan, On 28 April 2017 at 16:32, Dipanjan Das via llvm-dev <llvm-dev at lists.llvm.org> wrote: > I am wriitng an LLVM pass to insert instrumentation at certain points of the > program. I want to pass the `StringRef` obtained from `getName()` as a > parameter to a function `func(char* s)`. I can allocate some space on stack > using `AllocaInst` to generate an `alloca`
2010 Mar 31
2
Simplifying particular piece of code
Hello, everyone I have a piece of code that looks like this: mrets <- merge(mrets, BMM.SR=apply(mrets, 1, MyFunc, ret="BMM.AV120", stdev="BMM.SD120")) mrets <- merge(mrets, GM1.SR=apply(mrets, 1, MyFunc, ret="GM1.AV120", stdev="GM1.SD120")) mrets <- merge(mrets, IYC.SR=apply(mrets, 1, MyFunc, ret="IYC.AV120",
2012 Jul 20
3
Execute a function
Hi, I would like to evaluate a function, with 3 arguments, for instance, myfunc<-function(a,b,c) { sqrt(a)-exp(b)+4*c } How to execute myfunc(x,y,z), for all x, all y and all z, where x,y,z are vectors? Thank you very much in advance -- View this message in context: http://r.789695.n4.nabble.com/Execute-a-function-tp4637182.html Sent from
2004 Sep 09
4
scoping rules
Can someone help me with this simple example? sq <- function() { y <- x^2 y } myfunc <- function() { x <- 10 sq() } myfunc() executing the above in R yields: > myfunc() Error in sq() : Object "x" not found I understand that R's scoping rules cause it to look for "x" in the environment in which "sq" was defined (the global environment in
2012 Aug 29
5
Extracting the name of a function (inverse of match.fun("myFun"))
Hi all, is there a way to extract the name of a function, i.e. do the reverse of match.fun applied to a character string? I would like to print out the name of a function supplied to another function as an argument. For example: myFunc = function(x) { x+1 } applyFunc = function(fnc, x) { fnc = match.fun(fnc) fnc(x) } Is there a way to obtain "myFunc" from the argument fnc in
2007 Jan 10
2
[DTrace] using C preprocessor in dtrace scripts
Hi Max/DTrace list, > At any rate, without the -C, I can''t use #include <sys/stream.h>. > Without the #include <sys/stream.h>, I can''t use the M_DATA. > As it is, I get the following: > > # ./strrput.d 0xd595a6c0 <-- this is a vnode for a socket > ftp is using (not important here) > dtrace: failed to compile script ./strrput.d: line 7: >
2006 Nov 09
3
function
R-help, I am trying to create a function that i pass a data set to and have the function return some calculations based on data. Allow me to illustrate: myfunc <- function(lst,mn,sd){ lst <- sort(lst) mn <- mean(lst) sd <- sqrt(var(lst)) return(lst,mn,sd) } data1 <-c (1,2,3,4,5) data2 <- c(6,7,8,9,10) myfunc(data1,data1mn,data1sd) myfunc(data2,data2mn,data2sd)
2011 Jan 10
2
Integration in R
Dear all, It has been ages since I studied integration in college. Right now I try to recover all this kind of knowledge and then try to understand how integration works. Thus I am doing some first 'experiments' and I would like to request your help and comments. I have the function: p2<-function(x){0.5*(3*x^2-1)} # I found the square of p2 by using some pencil and
2007 Jul 26
5
ROC curve in R
Hi, I need to build ROC curve in R, can you please provide data steps / code or guide me through it. Thanks and Regards Rithesh M Mohan [[alternative HTML version deleted]]
2002 May 06
3
Using Object's Name in Function
Hi, Suppose I have a function: myfunc <- function(x, y) { ... } And within the function I want to print out the name of the x, y vectors. For example, if I do: > myfunc(foo, goo) [1] "foo" "goo" It shall return "foo", "goo" (with or without quotes is fine), where foo and goo are two vectors with numbers. I know this sounds strange, but I'd
2017 Apr 28
4
How to pass a StringRef to a function call inserted as instrumentation?
I am wriitng an LLVM pass to insert instrumentation at certain points of the program. I want to pass the `StringRef` obtained from `getName()` as a parameter to a function `func(char* s)`. I can allocate some space on stack using `AllocaInst` to generate an `alloca` instruction. But, how can I copy the `StringRef` to the stack space? -- Thanks & Regards, Dipanjan -------------- next part
2003 Sep 16
7
Retrieve ... argument values
Dear R users, I want to retrieve "..." argument values within a function. Here is a small exmaple: myfunc <- function(x, ...) { if (hasArg(ylim)) a <- ylim plot(x, ...) } x <- rnorm(100) myfunc(x, ylim=c(-0.5, 0.5)) Error in myfunc(x, ylim = c(-0.5, 0.5)) : Object "ylim" not found > I need to retrieve values of "ylim" (if it is defined
2013 Apr 29
3
Function for Data Frame
Dear R Helpers, I have about 20 data frames that I need to do a series of data scrubbing steps to. I have the list of data frames in a list so that I can use lapply. I am trying to build a function that will do the data scrubbing that I need. However, I am new to functions and there is something fundamental that I am not understanding. I use the return function at the end of the function and
2005 Dec 15
3
Name conflict between Epi and ROC packages
The name conflicts in Epi and ROC packages (2 'ROC' functions are the problem) cause the following code to work once, but not twice: library(MASS); data(cats); x = cats[,2] y = ifelse(cats[,1]=='F',0,1) library(Epi); ROC(x,y,grid=0)$AUC library(ROC); AUC(rocdemo.sca(y, x, dxrule.sca)) What is the standard way of resolving name conflicts? Ask maintainers to resolve