similar to: if statement of a vector

Displaying 20 results from an estimated 30000 matches similar to: "if statement of a vector"

2008 Sep 11
4
plotCI -- multiple plots on same graph
I have a bunch of lines I want to plot using plotCI() What Id like to know is, how can I connect the points with a line and how can I print multiple lines on the same graph? -- View this message in context: http://www.nabble.com/plotCI----multiple-plots-on-same-graph-tp19435198p19435198.html Sent from the R help mailing list archive at Nabble.com.
2009 Sep 17
1
heatmap.2() problems with re-ordering of rows and columns
I have a file of the following form -11 -10 -9 -8 -10 -9 -8 NA -9 -7 NA NA -8 NA NA NA So basically a NxN matrix of log scores. I want to get a heatmap of these log scores but I'm having a problem. I'm using the following code library(gplots) data=read.table("filein.txt",header=FALSE) mat=as.matrix(data) heatmap.2(mat,dendrogram=c("none")) But on the
2008 Sep 30
3
Pattern match in R
I want to make sure this piece of code I wrote is doing what I want it to do. ll<-function(string) { grep(string,dir(),value=T) } subdir = ll("Coverage_[1-9][0-9]$") I basically wrote a little function that would grab all the files of form Coverage_[0-99] The way I wrote it, will it grab Coverage_5 or does it have to have 2 numbers (10-99)? -- View this message in context:
2009 Sep 21
1
Specific criteria for color palette using heatmap.2
I'm trying to display the probability space of a function and wanted to see specifically where the maximum posterior probability is. data=read.table("PosteriorData",header=F) mat=as.matrix(data) heatmap.2(mat/max(mat,na.rm=T),dendrogram=c("none"),trace=c("none"), Rowv=F,Colv=F,labRow=3*c(10:-10),labCol=3*c(-10:10),symm=T,col=rainbow(100)) As the
2011 Dec 21
3
Decoding only a certain frame results in different values than when decoding the entire file
Sorry, it seems I have only replied to Lakhdar, not to the newsgroup. Below is my reply to Lakhdar, and I would like to make it more clear now, using some pseudo values for simplicity: I read bytes 1 to 124 from my encoded spx file. I decode themt and get the values: ---Frame 1---- -293 -8234 2134 17 ---Frame 2---- -9323 -732 189 2329 Both frames are just perfect as I need them. But now when I
2007 Dec 19
5
assigning and saving datasets in a loop, with names changing with "i"
Dear R users, I am analysing a very large data set and I need to perform several data manipulations. The dataset is so big that the only way I can play with it without having memory problems (E.g. "cannot allocate vectors of size...") is to write a batch script to: 1. cut the data into pieces 2. save the pieces in seperate .RData files 3. Remove everything from the environment 4. load
2013 Apr 09
2
Behaviors of diag() with character vector in R 3.0.0
Dear all, According to CHANGES IN R 3.0.0: o diag() as used to generate a diagonal matrix has been re-written in C for speed and less memory usage. It now forces the result to be numeric in the case diag(x) since it is said to have 'zero off-diagonal entries'. diag(x) does not work for character vector in R 3.0.0 any more. For example, v <- c("a",
2012 Apr 12
6
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
Hi, Here is a preliminary (monolithic) version you can comment on. This is still buggy, however, and I'll be testing for and fixing bugs over the next few days. I've used your version of the strong siv test. Thanks! -- Sanjoy Das. http://playingwithpointers.com -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: application/octet-stream
2018 Mar 14
2
LLVM opt unable to vectorize PolyBench code
Hello, I m unable to vectorize following kernel by opt tool; for (i = 0; i < _PB_NI; i++) for (j = 0; j < _PB_NJ; j++) { tmp[i][j] = 0; for (k = 0; k < _PB_NK; ++k) tmp[i][j] += alpha * A[i][k] * B[k][j]; } for (i = 0; i < _PB_NI; i++) for (j = 0; j < _PB_NL; j++) { D[i][j] *= beta; for (k = 0; k < _PB_NJ; ++k) D[i][j] +=
2004 Jun 16
1
off topic: C/C++ codes for pseudo inverse
Hi, I am looking for C/C++ codes for computing generalized inverse of a matrix. Can anyone help me in this regard? Thanks, Mahbub.
2018 Mar 14
0
LLVM opt unable to vectorize PolyBench code
It would help if you sent the IR you're giving to opt or at least a complete C function and your clang command line. ~Craig On Wed, Mar 14, 2018 at 3:05 PM, hameeza ahmed <hahmed2305 at gmail.com> wrote: > Hello, > > I m unable to vectorize following kernel by opt tool; > > for (i = 0; i < _PB_NI; i++) > for (j = 0; j < _PB_NJ; j++) > { >
2009 Oct 27
1
New vector based on if/else statement within for loop?
Hello, I am trying to create a new vector (w) that is based on comparing two vectors (P and Z). The compaison is simple (I created a for loop that reassigns w based on if statement), all Z values >= 24 and P values <=1, w=88 else w=77. I am not getting the correct results for w, see example code below. Any thoughts or suggestions on the correct method. Thank you, Doug P <-
2017 Jul 01
2
Jacobi 5 Point Stencil Code not Vectorizing
I am able to vectorize it with the following code; #include <stdio.h> #define N 100351 // This function computes 2D-5 point Jacobi stencil void stencil(int a[][N], int b[][N]) { int i, j, k; for (k = 0; k < N; k++) { for (i = 1; i <= N-2; i++) for (j = 1; j <= N-2; j++) b[i][j] = 0.25 * (a[i][j] + a[i-1][j] + a[i+1][j] + a[i][j-1] + a[i][j+1]); for
2017 Jul 01
3
Jacobi 5 Point Stencil Code not Vectorizing
Does it happen due to loop carried dependence? if yes what is the solution to vectorize such codes? please reply. i m waiting. On Jul 1, 2017 12:30 PM, "hameeza ahmed" <hahmed2305 at gmail.com> wrote: > I even tried polly but still my llvm IR does not contain vector > instructions. i used the following command; > > clang -S -emit-llvm stencil.c -march=knl -O3
2018 Jul 07
2
LoopVectorize fails to vectorize more complex loops
Hello. Could you please tell me why the first loop of the following program (also maybe the commented loop) doesn't get vectorized with LoopVectorize (from a recent LLVM build from the SVN repository from Jun 2018)? typedef short TYPE; TYPE data[1400][1200]; void kernel_covariance(int m, int n, TYPE mean[1200]) { int i, j, k; for (j = 0; j < m; j++) { mean[j] =
2016 May 16
2
Determination of statements that contain only matrix multiplication
Hi Tobias, could we use information about memory accesses of a SCoP statement and def-use chains to determine statements, which don’t contain matrix multiplication of the following form? for (int i = 0; i < Upper Bound1; i++) for (int j = 0; j < Upper Bound2; j++) for (int k = 0; k < Upper Bound3; j++) C[i][j] += A[i][k] * B[k][j] We could probably check that memory access
2017 Jun 27
3
LLVM Matrix Multiplication Loop Vectorizer
Hello, i am trying to vectorize a simple matrix multiplication in llvm; here is my code; #include <stdio.h> #define N 1000 // This function multiplies A[][] and B[][], and stores // the result in C[][] void multiply(int A[][N], int B[][N], int C[][N]) { int i, j, k; for (i = 0; i < N; i++) { for (j = 0; j < N; j++) { C[i][j] = 0;
2017 Oct 23
3
Jacobi 5 Point Stencil Code not Vectorizing
<div> </div><div> </div><div>Hello,</div><div> </div><div>To me this is an issue in llvm loop vectorizer (if N is large enough to prevent complete unrolling of j-loop).</div><div> </div><div>Woud you mind to share stencil.ll than I would say more definitely what the issue
2009 Apr 19
2
Including a vector element in an if statement
Hi all, I've searched high and low on this and found nothing of help. I'm using v2.6.2 and trying to write a function that will count how many people from a dataset fall under a poverty line of 50% of the mean income. a9 is my 100-element vector of incomes. I want pa9 to be my vector that counts how many of these are classed as in poverty. My problem is that my command if(a9[i] <
2020 Jun 25
2
How to implement load/store for vector predicate register
Hi, there I am writing an backend, and I met a problem. We don't have load/store instructions for vector predicate registers(vpr for short). The hardware has 64 vector registers(vr for short) and 8 vector predicate registers. And there is no move instructions between vr and vpr. vr supports many operations, and vpr supports vpror, vprxor, vprand and vprinv operations. A vr has 512 bits, and