Displaying 20 results from an estimated 10000 matches similar to: "avoiding loops"
2013 Apr 05
4
[LLVMdev] A strange testing case of SROA
Hi,
Following is excerpted from dynamic-vector-gep.ll.
The resulting "extractelement" seems to always return 0.0f regardless
the value idx1 and idx2 is holding.
Am I missing something here or there is something fishy take place?
Thanks
Shuxin
101 ; CHECK: test6
102 ; CHECK: insertelement <4 x float> zeroinitializer, float
1.000000e+00, i32 %idx1
103 ; CHECK:
2013 Apr 05
0
[LLVMdev] A strange testing case of SROA
Hi Shuxin
I think i might have written that test. And yeah, no matter what values you get you’ll get a 0.0. Its probably a bad test case, but i can’t remember if it exposed a bug in this form or not. Since writing it Chandler rewrote SROA anyway so the original bug is long gone.
Thanks,
Pete
On Apr 5, 2013, at 11:57 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
> Hi,
>
>
2003 Feb 21
2
how to chage values in data frame to NA iside a function
Dear all
I have a function in which I would like to change some values to NA according to
some condition.
dropout<-function(y, nahr=FALSE,...) {
<some stuff for computing an index>
if (nahr) y[index]<<-NA
invisible(index)
}
in case y is a vector all works OK but if it is a part of data frame by calling
dropout(df$y) or dropout(df[,number]) no change is done.
Please can you
2011 Dec 12
2
[LLVMdev] GetElementPtr
For the gep:
%idx1 = getelementptr i32* %MyVar, i32 0
i32* is the type that MyVar is pointing to and i32 is the type of the
offset value, or what? If it's the type of offset value, then
the size of the pointer shouldn't be less than i32, correct?
The index is 0, so in this example, the address computation is idx1 = &MyVar+0.
What I want to know is the size in bits of the values
2011 Dec 12
0
[LLVMdev] GetElementPtr
On Mon, Dec 12, 2011 at 3:54 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> For the gep:
>
> %idx1 = getelementptr i32* %MyVar, i32 0
>
> i32* is the type that MyVar is pointing to and i32 is the type of the offset
> value, or what? If it's the type of offset value, then
> the size of the pointer shouldn't be less than i32, correct?
>
>
> The index is
2013 Apr 06
0
[LLVMdev] A strange testing case of SROA
Hi Shuxin,
> Following is excerpted from dynamic-vector-gep.ll.
> The resulting "extractelement" seems to always return 0.0f regardless the value
> idx1 and idx2 is holding.
> Am I missing something here or there is something fishy take place?
maybe this is the same as PR15674.
Ciao, Duncan.
2013 Apr 06
1
[LLVMdev] A strange testing case of SROA
Hi, Duncan:
Thank you for sharing this info. I will check and go back to you
next Monday.
In case PR15674 is caused by the same bug, I will put a comment over
there and close it.
Thank you again!
Shuxin
On 4/6/13 2:55 AM, Duncan Sands wrote:
> Hi Shuxin,
>
>> Following is excerpted from dynamic-vector-gep.ll.
>> The resulting "extractelement" seems to
2005 Jan 28
4
extracting from a data.frame
Hi,
I am sorry for this simple question, but... How do I extract something
from a data.frame?
The following is my Problem:
I have got a dataframe "a" with various columns. One of those columns
is called V3 and contains elements of the following levels:
> levels(a$V3)
[1] "C" "CA" "CB" "CD" "CD1" "CD2"
2005 Jan 29
3
unique rows
Dear list,
I would like to extract from a matrix all those rows, that are unique.
By unique, I don't mean the unique that is accomplished by the function
unique(), though...
Consider the following example:
> h
[,1] [,2]
[1,] 4 4
[2,] 1 4
[3,] 4 1
Now unique(h) returns exactly the same - because 1 4 and 4 1 is not the
same for that function.
What I would like to
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
Thanks for your reply.
After I change Cstr to gI, it compiled successfully. Thanks again.
Another question is for constructing getelementpt.
// C code
char gStrA[10] = "test str"; // here is Global variable,gStrA and initializer "test str"
char gStrB[10]= "test str2";
main(){
int = i;
char *pGVars[20]; // here, the pGVar is for storing the address of each
2004 Dec 29
6
numeric(0)
Dear all,
I am trying to calculate a score for a string sequence consisting of
the following four letters: ACGT.
I have got a matrix giving the scores for each pair of letters.
So for example the string ACCT has got the pairs: AC, CC and CT.
The matrix has got the following form:
names<-c("A","C","G","T");
mscore<-matrix(0,4,4);
2005 Jan 04
1
quantiles for geometric distribution
Dear list,
I have got an array with observational values t and I would like to fit
a geometric distribution to it.
As I understand the geometric distribution, there is only one
parameter, the probability p. I estimated it by 1/mean(t).
Now I plotted the estimated density function by
plot(ecdf(t),do.points=FALSE,col.h="blue");
and I would like to add the geometric distribution. This
2003 Jul 30
3
nested for() loops for returning a nearest point
I'm trying to do the following:
For each ordered pair of a data frame (D1) containing longitudes and
latitudes and unique point IDs, calculate the distance to every point in
another data frame (D2) also containing longitudes, latitudes and point
IDs, and return to a new variable in D1 the point ID of the nearest
element of D2.
Dramatis personae (mostly self-explanatory):
D1$long
2005 Jan 05
3
strange behaviour of negative binomial
Dear list,
I ran into a strange behaviour of the pnbinom function - or maybe I
just made a stupid mistake.
First thing is that pnbinom seems to be very slow. The other - more
interesting one - is that I get two different curves when I plot the
estimated density and the density given by pnbinom. Shouldn't it be the
same?
This is only the case, I think, if I use the parameter size = 1. I
2013 Mar 20
3
highlight overlapping region of two densities
Hi all.
I would like to highlight overlapping regions of two densities and I could
not find a way to do it.
Here is the sample code:
myd <- c(2,4,5, 4,3,2,2,3,3,3,2,3,3,4,2,4,3,3,3,2,2.5,
2, 3,3, 2.3, 3, 3, 2, 3)
myd1 <- myd-2
plot(range(density(myd)$x, density(myd1)$x), range(density(myd)$y,
density(myd1)$y), type = "n")
lines(density(myd), col=1, lwd=4)
2010 Jul 30
2
Summing by index
# build a sample data frame illustrating the problem
ids<-c(rep(1234,5),rep(5436,3),rep(7864,4))
years<-c(seq(1990,1994,by=1),seq(1991,1993,by=1),seq(1990,1993,by=1))
data<-seq(14,25,by=1)
data[6]<-NA
DF<-data.frame(Id=ids,Year=years,Data=data)
DF
Id Year Data
1 1234 1990 14
2 1234 1991 15
3 1234 1992 16
4 1234 1993 17
5 1234 1994 18
6 5436 1991 NA
7
2017 Sep 25
2
Sample of a subsample
Hello everybody!
I have the following problem: I'd like to select a sample from a subsample
in a dataset. Actually, I don't want to select it, but to create a new
variable sampleNo that indicates to which sample (one or two) a case
belongs to.
Lets suppose I have a dataset containing 40 cases:
data <- data.frame(var1=seq(1:40), var2=seq(40,1))
The first sample (n=10) I drew like
2015 Jun 26
6
[LLVMdev] Deriving undefined behavior from nsw/inbounds/poison for scalar evolution
*** Summary
I'd like to propose (and implement) functionality in LLVM to determine when
a poison value from an instruction is guaranteed to produce undefined
behavior. I want to use that to improve handling of nsw, inbounds etc.
flags in scalar evolution and LSR. I imagine that there would be other uses
for it. I'd like feedback on this idea before I proceed with it.
*** Details
Poison
2004 Dec 30
3
labels and counting
Hello,
I have got the following problem:
given is a large string sequence consisting of the four letters "A" "C"
"G" and "T" (as before). Additionally, I have got a second string
sequence of the same length giving a label for each character. The
labels are "+" and "-".
Now I would like to create an 8x8 matrix which contains the
2004 Dec 30
1
number format
This mailing list truly is amazing.
Thank you so much for all the help!
I feel a little strange asking something that "simple" again, but I
wasn't able to find it in the help...
Is there a way to tell R how to display numbers (double)? How many
numbers after the decimal point, etc...
Thanks again, folks and have a nice New Years Eve!
Dax