Displaying 20 results from an estimated 65 matches for "myarray".
2013 Apr 24
8
[LLVMdev] Another missed optimization opportunity?
I was suprised to find that some bitcode I'm generating isn't getting
optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an
"extern int *myarray"), repeated three times:
@myarray = external global i32*
define void @update_array() #0 {
%1 = load i32** @myarray, align 8
%2 = getelementptr inbounds i32* %1, i64 5
%3 = load i32* %2, align 4
%4 = add nsw i32...
2013 Apr 24
2
[LLVMdev] Another missed optimization opportunity?
On 04/24/2013 01:29 PM, Caldarale, Charles R wrote:
> Is this a potential aliasing effect? Since myarray is defined as a pointer, not an array, it's theoretically possible that the address therein refers to the same memory location as the pointer itself.
I was thinking along those lines, but I haven't been able to come up
with a specific instance of what could possibly be aliased.
Here are s...
2006 Jan 16
3
new comer's question
...e,HarddiskVolume1,10-Jan-06,LogicalDisk->% Disk Read
Time->HarddiskVolume1,0,0,0,0,0,0,0
SCINFR06,LogicalDisk,% Disk Read Time,_Total,10-Jan-06,LogicalDisk->% Disk
Read Time->_Total,0.72,0.51,0.65,0.59,0.84,0.68,0.89
==============================
First I load it by read.table call:
myArray <- read.table("c:/mydata.csv",sep=",");
After this, the array element myArray[1,2] looks like this
>myArray[1,2]
[1] Resource, Type
Levels: 0.041666667 Cache LogicalDisk Resource, Type
Here are the questions:
(1) What does Levels mean?
(2) When I try to split the stri...
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
The semantic reason is that the optimizer is required to assume that the
i32 stores could be storing to the storage of myarray. LLVM IR does not
permit optimizers to optimize based on the nominal types of memory objects
or memory accesses.
This gets optimized in C, because the C compiler adds special TBAA metadata
annotations to the loads and stores which say that the stores of "int" do
not interfere with the lo...
2007 Mar 09
4
How to create a list that grows automatically
...R users
I would like to know if there is a way to create a list or an array (or
anything) which grows automatically as more elements are put into it. What I
want to find is something equivalent to an ArrayList object of Java
language. In Java, I can do the following thing:
// Java code
ArrayList myArray = new ArrayList();
myArray.add("object1");
myArray.add("object2");
....
// End of java code
Thanks in advance.
Young-Jin Lee
[[alternative HTML version deleted]]
2007 Mar 09
4
How to create a list that grows automatically
...R users
I would like to know if there is a way to create a list or an array (or
anything) which grows automatically as more elements are put into it. What I
want to find is something equivalent to an ArrayList object of Java
language. In Java, I can do the following thing:
// Java code
ArrayList myArray = new ArrayList();
myArray.add("object1");
myArray.add("object2");
....
// End of java code
Thanks in advance.
Young-Jin Lee
[[alternative HTML version deleted]]
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Scott Pakin
> Subject: [LLVMdev] Another missed optimization opportunity?
> I'm doing the equivalent of "myarray[5]++" (on an
> "extern int *myarray"), repeated three times:
> I had expected the three increments by 1 to
> be collapsed into a single increment by 3:
> Is there some semantic reason that the increments aren't allowed to be
> combined, or is this a missed optim...
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
Hi Scott,
On 24/04/13 19:40, Scott Pakin wrote:
> I was suprised to find that some bitcode I'm generating isn't getting
> optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an
> "extern int *myarray"), repeated three times:
does your bitcode contain data layout information?
Ciao, Duncan.
>
> @myarray = external global i32*
>
> define void @update_array() #0 {
> %1 = load i32** @myarray, align 8
>...
2008 Feb 13
2
[Linux/Python 2.4.2] Forking Python doesn't work
...tuff(data):
s.sendto(data,(ipaddr,portnum))
return
sys.stdout = open(os.devnull, 'w')
if os.fork():
#BAD? sys.exit(0)
os._exit(0)
else:
now = time.localtime(time.time())
dateandtime = time.strftime("NaVm/%y NaVM", now)
myarray = []
myarray.append("STAT Rings: 1")
myarray.append("RING")
myarray.append("NAME " + cidname)
myarray.append("TTSN Call from " + cidname)
myarray.append("NMBR " + cidnum)
myarray.append("TYPE K&qu...
2009 Jun 19
1
Shell Script: Simple array usage = bad substitution?
Hey Guys n Gals;
I have some arrays that I can't seem to expand correctly (if that's
the correct word?), imagine the following example:
#!/bin/bash
myArray=("First" "Second" "Third")
First=("Monday" "Tuesdays" "Wednesday")
Second=("One" "Two" "Three")
Third=("A" "B" "C")
for ((i=0;i<${#myArray[@]};i++))
do
for ((k=0;k<...
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
so it will read:
[,1] [,2]
[1,] 3 8
[2,] 5 6
And then pop the first element of the array so the array now reads:
[,1] [,2]
[...
2011 Oct 16
2
Custom Sort Character and Numeric
I"m trying to do a custom sort in this order:
1) Numeric digit furthest right;
2) Alphabetical second furthest to the right;
3) Alphabetical the rest of the string beginning with the first character;
The example code I'm using is an array that follows:
/myArray <- c('AFP9','AFR9','TLQP7','AFS9','AFR8','AFP8','AFS7','TLQS8')/
The output I desire is:
/>myArray
[1] "AFS7" "AFP8" "AFR8" "AFP9" "AFR9" "AFS9" "TLQP7" TLQ...
2019 Jul 08
1
Format printing inside a matrix
...nd I don't see what it has to do with printing matrices with a list type.
This is what I means:
Suppose my list of S4 objects looks like following:
myElement <- setClass("myElement", slots = c(x = "integer"))
myList <- lapply(1:8, function(x) myElement(x = x))
myArray <- array(myList, c(2,2,2))
myArray
# , , 1
#
# [,1] [,2]
# [1,] ? ?
# [2,] ? ?
#
# , , 2
#
# [,1] [,2]
# [1,] ? ?
# [2,] ? ?
Then I want to wrap the list with a new class and defining a new print
method for it.
class(myArray) <- "myArray...
2010 Oct 27
2
keep adding elements to the matrix
Hello everyone,
I would like to create a "dynamic" array to keep storing number in it
for (i in c(2:length(final))){
myarray <-final[i]-final[i-1]
myarray2<-2*final[i]
}
At the end I would like to use myarray as the x values of an array
and the myarray2 as the yvalues of the same array.
I tried cbind but it didnot work.
Could you please help me with that?
Best Regards
Alex
[[alternative HTML...
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Scott Pakin
> Subject: Re: [LLVMdev] Another missed optimization opportunity?
> > Is this a potential aliasing effect? Since myarray is defined as a
> > pointer, not an array, it's theoretically possible that the address
> > therein refers to the same memory location as the pointer itself.
> I was thinking along those lines, but I haven't been able to come up
> with a specific instance of what could...
2008 Jun 26
6
ActiveRecord search Query Question
...newly splitted
string. Here is when I get the error "can''t convert Array into String".
I''m sure that I''m doing some logical mistakes but I''m new to ruby on
rails so please forgive me.
hope some one can help
def conditions_by_like(value, *columns)
myArray = value.gsub(/[^\A-Za-z0-9\s]/, "").split(/ /)
myArray.each do |itemz|
columns = self.user_columns if columns.size==0
columns = columns[0] if columns[0].kind_of?(Array)
conditions = columns.map { |c|
c = c.name if c.kind_of? ActiveRecord::ConnectionAdapters::Co...
2020 Feb 15
2
Have the debugger show an away with a dynamic size?
Thanks for the suggestions but it doesn't appear to be working correctly
for me. I tried building the below after seeing the results with "clang -g
-std=c99 test.c" and got the same result
LLDB thinks MyArray is 81 elements long even though 81 and 80 doesn't show
up anywhere in the llvm-ir (I tried again using an llvm ir file made by
clang -g -std=c99 test.c -S -emit-llvm and clang -g test.ll)
$ cat test.c
int foo(int s) {
int MyArray[s];
int i;
for (i = 0; i < s; ++i)
MyArra...
2011 Jul 25
3
[LLVMdev] function failing to run in Jit
...hich all runs fin in the Jit but I can't get global arrays to work.
; ModuleID = 'test'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i686-pc-linux-gnu"
@MyArray = external global [1000 x i32]
define i32 @foo(i32 %a, i32 %b) {
Entry:
%mul = mul i32 %b, %a
%ptr = getelementptr inbounds [1000 x i32]* @MyArray, i32 0, i32 %a
store i32 %mul, i32* %ptr, align 4
ret i32 %a
}
Comparing it to the web compiled c equivalent I can't see any relevant
diff...
2010 Nov 10
2
force apply not to drop the dimensions of FUN results ?
Dear R users,
Here is my problem:
I have an array with at least four dimensions:
> dim(myArray)
[1] 20 17 3 6
I'd like to apply a function to each occurrence of the matrix (3x6)
defined by the last two dimensions. This interpolation function always
return a matrix of the same dimensions as its argument:
> interpSecteurs.f(myArray[1, 1, , ])
secteur
rotation 1 2 3...
2008 Aug 07
2
Creating an array of lists
Hi,
I want to store some number of outputs from running a bunch of
analyses such as lm() into an array. I know how to do this with a
one-dimensional array (vector) by creating
myArray <- vector(mode='list', length=10)
and storing each lm() result into a component of myArray.
My question is, how can do this for a multiple dimensional array? It
seems array() does not have such a 'mode' option as in vector(). Any
alternatives?
Thanks in advance,
Gang