Displaying 20 results from an estimated 4000 matches similar to: "subset"
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
hi all,
i would like insert a fucntion call at the end of each basic bloc
the fucntion i have defined and declared at the begining of the module
ie i have written a pass derived from a module pass
virtual bool runOnModule(Module & M){
// i declared the fucntion and defined it
for (Module::iterator a = M.begin(), b = M.end(); a != b;
for (Function::iterator i = a->begin(), e =
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/25 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
> > i would like insert a fucntion call at the end of each basic bloc
>
> you can't, because only terminators are allowed at the end of a basic
> block.
> However you can try to insert the call before the terminator.
>
Yes, i mean before the termininator,
My problem is how to call a method
suppose
2011 Feb 17
2
convert the sas file into csv in R
i am trying to convert sas file into csv. I used write.csv(a,
file="cool.csv") but nothing come out. i don't know why. Thanks.
library(Hmisc)
a<- sasxport.get("C:\\Users\.....")
write.csv(a, file="cool.csv")
--
View this message in context: http://r.789695.n4.nabble.com/convert-the-sas-file-into-csv-in-R-tp3311769p3311769.html
Sent from the R help mailing
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> My problem is how to call a method
> suppose this fucntion
> void A(int x)
> {
> x=x+1;
>
> }
>
> should i define this function and declare it at the beginig of the module and
> create for it a basic bloc?
you can just declare the function (i.e. no need to give it a body), and call it.
You can then link with an object file that defines it. This is
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
I have defined the fucntion in another object file and linked it to the
in fact the fucntion is :
void consume(int , int * );
std::vector<Value*> int32_16_params;
int32_16_params.push_back(inValue);//inValue is ConstantInt* inValue
int32_16_params.push_back(gvar_int32_y);
CallInst* int32_16 = CallInst::Create(func_consume, int32_16_params.begin(),
int32_16_params.end(), "",
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> i would like insert a fucntion call at the end of each basic bloc
you can't, because only terminators are allowed at the end of a basic block.
However you can try to insert the call before the terminator.
...
> i tried to see an example with the demo, i saw that it instead of calling the
> function, it repeats all the instruction that are existing in the function
>
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/26 Duncan Sands <baldrick at free.fr>
> Hi Nabila,
>
>
> Now when i tried this pass an error says:
>> Wrong type for attribute noalias
>> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>>
>
> noalias is only for arguments of pointer type. You probably meant it to
> be on the second argument rather than the first. I suggest you
2011 Feb 17
3
sampling
I want to sample from the ID. For each ID, i want to have 2 set of data. I
try the sample() function but it didn't work.
> x<-data.frame(id=c(1,1,1,2,2,2,2,3,3,3,4,4), v1=c(1:12), V2=c(12:23))
> x
id v1 V2
1 1 1 12
2 1 2 13
3 1 3 14
4 2 4 15
5 2 5 16
6 2 6 17
7 2 7 18
8 3 8 19
9 3 9 20
10 3 10 21
11 4 11 22
12 4 12 23
--
View this message in
2011 Sep 03
3
question with uniroot function
Dear all,
I have the following problem with the uniroot function. I want to find
roots for the fucntion "Fp2" which is defined as below.
Fz <- function(z){0.8*pnorm(z)+p1*pnorm(z-u1)+(0.2-p1)*pnorm(z-u2)}
Fp <- function(t){(1-Fz(abs(qnorm(1-(t/2)))))+(Fz(-abs(qnorm(1-(t/2)))))}
Fp2 <- function(t) {Fp(t)-0.8*t/alpha}
th <- uniroot(Fp2, lower =0, upper =1,
2009 Jan 08
2
VaR-Monte carlo Simulation, Historic simulation, Variance-Covariance Simulation
Dear R helpers
Suppose I have a portfolio of securities with exposure to Equity, Bonds and Forex (say $ 1000000 each).
Is there any fucntion in R that will help me calculate Value at Risk (VaR) using Monte carlo Simulation , Historic simulation and Variance - Covariance Simulation.
With regards
Maithili
2005 Jun 27
2
Reconstructing LD function
Dear all,
in an LDA analysis with n groups n-1 LD functions result. Implicitly this
defines an LD fucntion for the last group. Does there exist code already
to explictly construct this LD function?
Thanks, Stefan
2011 Feb 02
2
matrix and a function - apply function
Hi
I have this function and this matrix:
function(x,y) x+y/x
m<-matrix(c(1,2,4,2,10,8),3,2)
> m
[,1] [,2]
[1,] 1 2
[2,] 2 10
[3,] 4 8
each row represent a point (x,y) in a chart and I want via my fucntion to
calculate the image in order to get this results:
for point (1,2) I would get 1+2/1 = 3
for point (2,10) I would get 2+10/2 = 7
for point (4,8) I would get
2005 Nov 16
2
Newton-Raphson
Dear all,
I want to solve a score function by using Newton-Raphson algorithm. Is there such a fucntion in R? I know there's one called optim, but it seems only doing minimizing or maximizing.
Thanks,
Jimmy
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script
from within that script.
fir instance
If I have a script "myscript.r":
FileName<-unknown.fucntion()
print(FileName)
and run it
source("myscript.r")
will return
"myscript.r"
Thanks
Nevil Amos
[[alternative HTML version deleted]]
2004 Mar 11
5
fft question
Hi!
I am using the fft() function the base package to transform some 1d signal.
If I use this standar fucntion I get a very huge first fourier coeficient.
I think this dues to the handling of the borders of the signal.
Usually in fft especially in image processing the signal is simulated to be continuous by adding the signal several times periodically. My question is, is there some function
2011 Apr 26
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila,
> Now when i tried this pass an error says:
> Wrong type for attribute noalias
> tail call void @consume(i32 noalias 3, i32* @y) nounwind
>
>
> noalias is only for arguments of pointer type. You probably meant it to
> be on the second argument rather than the first. I suggest you correct
> your code that adds the attribute.
2015 Jun 18
3
[LLVMdev] Attribute to mark that function only access memory through it's arguments
Hi,
Currently in AliasAnalysis we can model ModRef behaviour for functions which
only access memory through their pointer arguments. However we can't
express this propery as a function attribute.
For example, for intrinsics we can specify ReadWriteArgMem or ReadArgMem
attributes in tablegen definitions. But due to the lack of the related function
attributes on the llvm ir level, this
2002 Nov 13
3
using list to pass argument to function
Hi,
I am trying to apply *sapply* to functions within functions within functions
to do a Monte Carlo experiment: take Y sample of size X based on cell
probabilities (using Brian Ripley's suggestion for drawing from contingency
tables), for each calculate a vector of statistics, calculate bootstrap std
errs with R replications and their means and SD. Store results in a matrix
for further
2009 Jan 26
2
how to modify an R built-in function?
Hello R experts!
Last week I run in to a lot a problems triyng to fit an ARIMA model to a
time series. The problem is that the internal process of the arima function
call function "optim" to estimate the model parameters, so far so good...
but my data presents a problem with the default method "BFGS" of the optim
function, the output error looks like this:
Error en
2006 Nov 01
2
xyplot: Plotting two variables, one as points - the other as line. Can that be done without explicitly using panel functions
Hi! Consider
d <- data.frame(x=1:10,y=5+1:10, yf=rnorm(10,5+1:10))
x y yf
1 1 6 5.268621
2 2 7 8.623896
3 3 8 8.114830
4 4 9 10.125955
5 5 10 9.977261
...
I plot y and yf against x with
xyplot(y+yf~x,data=d,col=c('red','green'),pch=c("a","b"))
BUT - I would like that the plot of y against x is with type='l' and the