similar to: [LLVMdev] Canonicalizing vector masking.

Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Canonicalizing vector masking."

2013 Oct 25
3
[LLVMdev] Is there pass to break down <4 x float> to scalars
Hi, Richard, I think we are solving a same problem. I am working on shader language too. I am not satisfied with current binaries because vector operations are kept in llvm opt. glsl shader language has an operation called "swizzle". It can select sub-components of a vector. If a shader only takes components "xy" for a vec4. it's certainly wasteful to generate 4
2013 Oct 25
0
[LLVMdev] Is there pass to break down <4 x float> to scalars
Liu Xin <navy.xliu at gmail.com> writes: > I think we are solving a same problem. I am working on shader language > too. I am not satisfied with current binaries because vector operations > are kept in llvm opt. > > glsl shader language has an operation called "swizzle". It can select > sub-components of a vector. If a shader only takes components "xy"
2024 Jul 25
1
please help generate a square correlation matrix
Hi Rui, You are always very helpful!! Thank you, I just modified your R codes to remove a row with zero values in both column pair as below for my real data. Ding dat<-gene22mut.coded r <- P <- matrix(NA, nrow = 22L, ncol = 22L, dimnames = list(names(dat), names(dat))) for(i in 1:22) { #i=1 x <- dat[[i]] for(j in (1:22)) { #j=2 if(i == j) { #
2013 Oct 30
2
[LLVMdev] Is there pass to break down <4 x float> to scalars
Hi, Richard, Your decompose vector patch works perfect on my site. Unfortunately, I still get stupid code because llvm '-dse' fails followed by 'decompose-vector' . I read the DSE code and it is definitely capable of eliminating unused memory stores if its AA works. I don't think basic AA works for me. I found my program have complex memory accesses, such as bi-dimentional
2024 Jul 25
1
please help generate a square correlation matrix
?s 20:47 de 25/07/2024, Yuan Chun Ding escreveu: > Hi Rui, > > You are always very helpful!! Thank you, > > I just modified your R codes to remove a row with zero values in both column pair as below for my real data. > > Ding > > dat<-gene22mut.coded > r <- P <- matrix(NA, nrow = 22L, ncol = 22L, > dimnames = list(names(dat),
2024 Jul 25
1
please help generate a square correlation matrix
HI Rui, Thank you for the help! You did not remove a row if zero values exist in both column pair, right? Ding From: Rui Barradas <ruipbarradas at sapo.pt> Sent: Thursday, July 25, 2024 11:15 AM To: Yuan Chun Ding <ycding at coh.org>; r-help at r-project.org Subject: Re: [R] please help generate a square correlation matrix ?s 17:?39 de 25/07/2024, Yuan Chun Ding via R-help
2024 Jul 26
1
please help generate a square correlation matrix
If I have understood the request, I'm not sure that omitting all 0 pairs for each pair of columns makes much sense, but be that as it may, here's another way to do it by using the 'FUN' argument of combn to encapsulate any calculations that you do. I just use cor() as the calculation -- you can use anything you like that takes two vectors of 0's and 1's and produces fixed
2024 Jul 27
1
please help generate a square correlation matrix
Let's go back to the original posting. > > > >> in each column, less than 10% values are 1, most of them are 0; > > > > > > > >> so I want to remove a row with value of zero in both columns when calculate correlation between two columns. > > So we're talking about correlations between binary variables. Suppose we have two 0-1-valued
2009 Aug 27
1
generating multiple sequences in subsets of data
I'm running into a problem I can't seem to find a solution for. I'm attempting to add sequences into an existing data set based on subsets of the data. I've done this using a for loop with a small subset of data, but attempting the same process using real data (200k rows) is taking way too long. Here is some sample data and my ultimate goal >
2008 Dec 16
2
converting a data-frame by a defined rule
Hi, I have a data frame with several columns. Now I want to transfer the data into a new variable (also a data frame), but I only want a part of the data, defined by a rule ... for example; I have following data frame: row1 row2 row3 x 2 3 x 1 4 y 5 3 y 2 3 I know want a data frame, only with lines containing x in row1. I know how to do that for one row (f <-
2007 Nov 12
1
update matrix with subset of it where only row names match
I guess this has a simple solution: I have matrix 'mat1' which has row and column names, e.g.: A B C row1 0 0 0 row2 0 0 0 .... rown 0 0 0 I have a another matrix 'mat2', essentially a subset of 'mat1' where the rownames are all in 'mat1' e.g.: B row3 5 row8 6 row54 7 I want to insert the values of matrix mat2 for column B (in reality it could be some or
2009 Mar 05
3
Dropping rows conditionally
Dear R-help team, I am getting addicted to using R but keep on getting many challenges on the way especially on data management (data cleaning). I have been wanting to drop all the rows if there values are `NA' or have specific values like 1 or 2 or 3. mdat <- matrix(1:21, nrow = 7, ncol=3, byrow=TRUE, dimnames = list(c("row1",
2013 May 01
1
Combine multiple tables into one
Hi, May be this helps: dat1<- as.data.frame(table1) ?dat2<- as.data.frame(table2) names(dat2)<-c("V3","V4") library(plyr) res<-join(dat1,dat2,type="full") ?res[is.na(res)]<- 0 ?res #? V1 V2 V3 V4 #1? 1? 1? 0? 0 #2? 1? 2? 0? 0 #3? 0? 0? 0? 1 #4? 0? 0? 0? 4 ?combinedtable<-as.matrix(res) ?colnames(combinedtable)<- NULL ?combinedtable #???? [,1] [,2]
2008 Sep 04
1
restricted bootstrap
Hello List, I am not sure that I have the correct terminology here (restricted bootstrap) which may be hampering my archive searches. I have quite a large spatially autocorrelated data set. I have xy coordinates and the corresponding pairwise distance matrix (metres) for each row. I would like to randomly sample some number of rows but restricting samples such that the distance between them is
2024 Jul 27
1
please help generate a square correlation matrix
Curses, my laptop is hallucinating again. Hope I can get through this. So we're talking about correlations between binary variables. Suppose we have two 0-1-valued variables, x and y. Let A <- sum(x*y) # number of cases where x and y are both 1. Let B <- sum(x)-A # number of cases where x is 1 and y is 0 Let C <- sum(y)-A # number of cases where y is 1 and x is 0 Let D <- sum(!x
2010 Sep 06
1
Creating named.list from two matrix columns
Hi Friends, I am new to R. On R utility class pages, creating "named.list" is described with this command : new("named.list",a=1,b=2) For large matrix having two columns, such as : "row1" 2334 "row2" 347 "row3" 379 ... I want to create a named.list like : $row1 [1] 2334 $row2 [1] 347 ... Can anyone explain how "named.list"
2009 Nov 26
3
barchart() {Lattice} help.
Hi R Users, I'm trying to plot a stacked barplot. Here is data: Sample Col1 Col2 Col3 Row1 -2 4 -1 Row2 3 -2 4 Row3 3 5 -2 Row4 4 1 -1 I'm using following R code: library(lattice) dta<-read.table("data.txt", header=TRUE, row.names="Sample") barchart(data.matrix(dta), horizontal=FALSE, stack=TRUE, col=2:4,
2009 Dec 27
4
how to create a simple loop ?
I have a 5-row matrix called “data”. There are headers. it look like this : Row 1 Row2 Row3 Row4 Row5 Line1 … … … … Line2 … … … … Line3 … … … … … Line 1838 … … … … I want to calculate several simple arithmetic means for Row5, that
2024 Jul 27
1
please help generate a square correlation matrix
Hi Richard, Nice to know you had similar experience. Yes, your understanding is right. all correlations are negative after removing double-zero rows. It is consistent with a heatmap we generated. 1 is for a cancer patient with a specific mutation. 0 is no mutation for the same mutation type in a patient. a pair of mutation type (two different mutations) are exclusive for most of patients in
2011 Aug 23
1
subsetting a list of matrices
Hi all, I have an object that looks (roughly) like the following: l <- list(a = matrix(rnorm(9), 3), b = matrix(rnorm(9), 3), c = matrix(rnorm(9), 3)) l$a[3,] <- sample(c("Message 1", "Message 2", "Message 3")) l$b[3,] <- sample(c("Message 1", "Message 2", "Message 3")) l$c[3,] <- sample(c("Message 1",