search for: array

Displaying 20 results from an estimated 19157 matches for "array".

2008 Mar 05
3
How to make a 2-dim array being "interpreted" as an array rather than as a matrix
Dear List A 2-dimensional array seems to be "interpreted" as a matrix whereas higher dimensional arrays are interpreted as arrays, e.g. > a1 <- array(1:8,c(2,2,2)) > class(a1) [1] "array" > a2 <- array(1:4,c(2,2)) > class(a2) [1] "matrix" If I write a generic function (apologies...
2019 Mar 07
5
Writing unit tests - how to test re-orderable blocks...
We have a test that looks like this… define void @array16_store() { ; CHECK-LABEL: array16_store: ; CHECK: ldi [[REG1:r[0-9]+]], 204 ; CHECK: ldi [[REG2:r[0-9]+]], 170 ; CHECK: sts int.array+3, [[REG2]] ; CHECK: sts int.array+2, [[REG1]] ; CHECK: ldi [[REG1:r[0-9]+]], 187 ; CHECK: ldi [[REG2:r[0-9]+]], 170 ; CHECK: sts int.array+1, [[REG2]] ; CHECK: s...
2013 Jun 19
3
Calling an array in a struct in C to R
...roblem I don't know how to solve. Therefore, I hope someone can provide me with the information or pointers I need in order to understand the way in which the communication between R and C occurs. I have the following C code which basicallly reflects what I want: typedef struct { float *array; size_t used; size_t size; } Array; void main2R() { Array a; examplefunction(&a); /*fills and dynamically grows a->array*/ } Now I would want to return a.array or a->array to R. According to the R manuals, the compiled C code should not return anything except...
2010 Feb 16
0
[LLVMdev] Source Code Location of an Instruction
On Feb 13, 2010, at 7:22 AM, Jingyue Wu wrote: > I would like to know how to locate an LLVM instruction in the source > code, i.e. to get the line number of its corresponding source code > statement. I remember in LLVM 2.4, DbgStopPointInst is designed to > help this locating, but it seems deprecated in the latest LLVM. We were discussing that a few days ago:
2003 Jun 09
2
Appending elements to an array
Hi all, I am having a bit of trouble with the array structure of R. What I want to do is dynamically add/remove elements to an array. For example: Let's say I have created an array: > myArray <- array(c(3,8), dim=c(1,2)) > myArray [,1] [,2] [1,] 3 8 And I now want to, for example, push an element (5,6) on to this array...
2013 Jan 15
2
[LLVMdev] Having trouble with GEP
I'm running up against an error with this IR: %array$str = type { i64, [0 x %str] } %array.raw = call i8* @malloc(i64 %objsz) %array = bitcast i8* %array.raw to %array$str* %array.data = getelementptr %array$str* %array, i32 0, i32 1 This is kind of hand-written, but it errors out, like this: print-var.ll:50:30: error: invalid getelementptr indices...
2013 Sep 05
2
[LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
Hi All, I was wondering if there is an optimisation pass that moves a stack allocated array, initialised with constant values, to a global constant array. And if there is such a pass, what requirements are there for it to operate? My optimised IR is below. As you can see an array of 5 integers is created with alloca, then each element is stored to in turn. It would be nice if this ar...
2011 Oct 10
3
Superposing mean line to xyplot
...te a simple problem but I'm having troubles on how to solve it, I've read tons of old mails in the archives and looked at some slides from?Deepayan Sarkar but still can not get the point. This is the context. I've got data on 9 microRNAs, each miRNA has been measured on three different arrays and on each array I have 4 replicates for each miRNA, which sums up to a total of 108 measurements. I've the suspect that measurement on the first array are systematically lower than the others so I wanted to draw some line plot where each panel correspond to a miRNA, and each line correspond...
2010 Feb 13
2
[LLVMdev] Source Code Location of an Instruction
Hi, I would like to know how to locate an LLVM instruction in the source code, i.e. to get the line number of its corresponding source code statement. I remember in LLVM 2.4, DbgStopPointInst is designed to help this locating, but it seems deprecated in the latest LLVM. Thanks, Jingyue -- Jingyue Wu Department of Computer Science Columbia University New York, NY 10027
2019 Nov 15
2
class(<matrix>) |--> c("matrix", "arrary") [was "head.matrix ..."]
> > And indeed I think you are right on spot and this would mean > > that indeed the implicit class > > "matrix" should rather become c("matrix", "array"). > > I've made up my mind (and not been contradicted by my fellow R > corers) to try go there for R 4.0.0 next April. I'm not enthusiastic about matrices extending arrays. If a matrix is an array, then shouldn't all vectors in R, be arrays too? > #mockup > cla...
2011 Oct 05
3
do calculations as defined by a string / expand mathematical statements in R
...la-element but more elemental)? Perhaps my idea to solve my problem is a little bit strange. My general problem is, that I have to do arithmetics for which there seems to be no function available that I can apply in order to be more flexible. To be precise, I have to add up three dimensional arrays. I can do that like this (as someone suggested on this help-list ? thanks for that!): (array[,,1] + array[,,2] + array[,,3]) / 3 However in my case it can happen that at some point, I don't have to add 3 but 8 'array-slices' (or 10 or x). And I don't want to manually expand th...
2012 Nov 18
2
[lattice] format and rotation of strip text
...vel ... but I would like to fix a few things. Hopefully the following is a sufficiently "small, self-contained example" (though it has 2 side questions injected--answers to those are appreciated also): # start example library(reshape2) library(lattice) lon=11 lat=7 lev=5 len=lon*lat*lev array.3d <- array(data=c(1:len), dim=c(lat, lon, lev)) # Rewrite the array values "more spatially," i.e., row-wise from # bottom left. If there's a more-R-ish way to fill this array # as specified, please let me know: I know 'for' loops are deprecated # in R. i=1 for (z in 1:le...
2010 Feb 17
2
[LLVMdev] Source Code Location of an Instruction
...re discussing that a few days ago: > > http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-February/029245.html Hi Trevor, On a similar question, I'd want to see what line is being compiled to which instructions. Is it possible to print the before the instructions as comment? For example: array.c: ------------------------------ int array[5] = { 1, 2, 3, 4, 5 }; int main () { array[1] = 5; array[4] = array[1] + array[3]; array[0] = array[4] * array[1]; array[2] = array[0] + 1; return array[2]; } ------------------------------ $ clang -emit-llvm -O1...
2017 Oct 25
6
[OT] Bash help
...email' and 'total' like this: >> >> me at example.com 20 >> me at example.com 40 >> you at domain.com 100 >> you at domain.com 30 >> >> I need to get the total number of messages for each email address. > > This screams out for associative arrays. (Also called hashes, > dictionaries, maps, etc.) > > That does limit you to CentOS 7+, or maybe 6+, as I recall. CentOS 5 is > definitely out, as that ships Bash 3, which lacks this feature. <snip> Associative arrays? Awk! Awk! (No, I am not a seagull...) sort file | awk ...
2019 May 24
0
[PATCH] VMCI: Fix integer overflow in VMCI handle arrays
The VMCI handle array has an integer overflow in vmci_handle_arr_append_entry when it tries to expand the array. This can be triggered from a guest, since the doorbell link hypercall doesn't impose a limit on the number of doorbell handles that a VM can create in the hypervisor, and these handles are stored in a han...
2008 Jun 04
2
array of arrays
Dear R users, I want to calculate the bias and variance of an estimator for several values of two parameters a and b. For example : b1 b2 a1 bias bias variance variance a2 bias bias variance variance Can one do array of arrays ? I have tried and it did not work. Actually I would like to get this array for several values of the number of observations. That would be an array of arrays of arrays :-) Maybe there is a better way to do that... Is there also a way to export arrays to Latex ? Thank you very much...
2023 Nov 16
3
[PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by
Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length array with a flexible-array member in `struct PACKED_REGISTRY_TABLE`. Also annotate array `entries` with `__counted_by()` to prepare for the coming implementation by GCC...
2005 Jan 21
6
dim vs length for vectors
..., you get NULL rather than [1] k. Is this logical? Here's the way I explain it (and maybe someone can provide a more accurate explanation of what's going on): R has several types of scalar (atomic) values, the most common of which are numeric, integer, logical, and character values. Arrays are data structures which hold only one type of atomic value. Arrays can be one-dimensional (vectors), two-dimensional (matrices), or n-dimensional. (We generally use arrays of n-1 dimensions to populate n-dimensional arrays -- thus, we generally use vectors to populate matrices, and matrice...
2019 Jul 21
6
[RFC] A new multidimensional array indexing intrinsic
Hello, We would like to begin discussions around a new set of intrinsics, to better express multi-dimensional array indexing within LLVM. The motivations and a possible design are sketched out below. Rendered RFC link here <https://github.com/bollu/llvm-multidim-array-indexing-proposal/blob/master/RFC.md> Raw markdown: # Introducing a new multidimensional array indexing intrinsic ## The request for cha...
2007 Dec 31
4
How to run stories with `spec'' command?
Hi, all! I have a story steps array.rb and the story array.story. I can run it with ruby array.rb But when I execute spec array.rb nothing happened. I''m wondering how can I use spec command to execute stories? (executing examples is OK) Or maybe another question. If I have to run stories with `ruby'' command,...