search for: arraylist

Displaying 20 results from an estimated 29 matches for "arraylist".

2007 Mar 09
4
How to create a list that grows automatically
Dear 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
Dear 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 Dec 05
4
Java parser for R data file?
Hi everyone, Has anyone written a parser in Java for either the ASCII or binary format produced by save()? I need to parse a single large 2D array that is structured like this: list( "32609_1" = c(-9549.39231289146, -9574.07159324482, ... ), "32610_2" = c(-6369.12526971635, -6403.99620977124, ... ), "32618_2" = c(-2138.29095689061, -2057.9229403233, ... ),
2013 Apr 15
2
[LLVMdev] How to implement list in llvm
Hi! I want to implement a list (which operates like ArrayList in Java). I can use ArrayType from llvm, but at creation time I have to specify size so there is a problem when I want to extend it (I can reallocate it ofc). Moreover I need to implement all the operations (inserting, removing etc.) manually. I though that maybe I can use std::vector, but there...
2017 Jul 31
1
[RFC PATCH] nv50/ir: allow spilling of def values for constrained MERGES/UNIONS
This lets us spill more values and compile a big shader for Civilization 6. Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index b33d7b4010..f29c8a1a95
2010 Mar 24
0
Trying to create R dataframe with JRI
...n the rlist into a dataframe REXP dataframe = REXP.createDataFrame(rlist); .... both of these constructors do not exist in JRI (apparently). They must use a different set of libraries (?) and I am now puzzeled. How can I create a dataframe from Strings and integers? I managed to create RVectors: ArrayList<RVector> vectors = new ArrayList<RVector>(); for (Feature feature : freqFeatures){ RVector rVector = new RVector(); rVector.addAll(feature.getParameters().values()); vectors.add(rVector); } but I miss the next steps. Anybody can give some example code? (JRI source code documentat...
2007 Jun 07
1
Search results
Hi, I am new to Ruby, I am a Java expert. I don''t know how to handle the results of a search... I have read a lot, but nobody seems to give examples of that. Do I get an ArrayList from a Table? Do I get fields? How can I identify them? Do I have to parse them to a Class like: Person user = Person(personlist.get(i));? Please, help me... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you ar...
2015 Jan 11
0
[PATCH 2/3] nv50/ir: For MAD, prefer SDST == SSRC2
...627,6 +627,7 @@ RegAlloc::BuildIntervalsPass::visit(BasicBlock *bb) #define JOIN_MASK_UNION (1 << 1) #define JOIN_MASK_MOV (1 << 2) #define JOIN_MASK_TEX (1 << 3) +#define JOIN_MASK_MAD (1 << 4) class GCRA { @@ -851,7 +852,7 @@ GCRA::coalesce(ArrayList& insns) case 0x80: case 0x90: case 0xa0: - ret = doCoalesce(insns, JOIN_MASK_UNION | JOIN_MASK_TEX); + ret = doCoalesce(insns, JOIN_MASK_UNION | JOIN_MASK_TEX | JOIN_MASK_MAD); break; case 0xc0: case 0xd0: @@ -995,6 +996,13 @@ GCRA::doCoalesce(ArrayList&...
2013 Apr 16
2
[LLVMdev] How to implement list in llvm
...t should match (such as "List<int> intList;" or "List< > std::vector<long> > longVectors;"). > > -- > Cristianno Martins > > On Monday, 15 de April de 2013 at 07:13, B B wrote: > > Hi! > I want to implement a list (which operates like ArrayList in Java). > > I can use ArrayType from llvm, but at creation time I have to specify > size so there is a problem when I want to extend it (I can reallocate > it ofc). Moreover I need to implement all the operations (inserting, > removing etc.) manually. > > I though that maybe...
2008 Nov 30
1
Rserve and creating a list of lists
Hello, I have some code which generates lattice objects. The function recieves serialized forms of the lattice objects which it then unserializes and then adds to an ArrayList<REXP>. REXPRaw rser = new REXPRaw( target ); //target contains the raw serialized forms of lattice objects rconn.assign("temp",rser); REXP ret = rconn.eval("invisible(unserialize(temp))"); (1) rexpArr.add(ret); RList rlist = new RList(rexpArr); REXPList rl = new...
2016 Jan 06
1
[PATCH] nv50/ir: don't touch degree on physreg RIG nodes
...iff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index cd8c42c..f1ffcba 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -1129,9 +1129,11 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask) void GCRA::RIG_Node::addInterference(RIG_Node *node) { - this->degree += relDegree[node->colors][colors]; - node->degree += relDegree[colors][node->colors]; - + // don't add degree for physregs since they won't go through simplify() + if...
2013 Apr 15
0
[LLVMdev] How to implement list in llvm
...r which class B your class List should match (such as "List<int> intList;" or "List< std::vector<long> > longVectors;"). -- Cristianno Martins On Monday, 15 de April de 2013 at 07:13, B B wrote: > Hi! > I want to implement a list (which operates like ArrayList in Java). > > I can use ArrayType from llvm, but at creation time I have to specify > size so there is a problem when I want to extend it (I can reallocate > it ofc). Moreover I need to implement all the operations (inserting, > removing etc.) manually. > > I though that mayb...
2015 Jan 11
6
[PATCH 1/3] nv50/ir: Add support for MAD short+IMM notation
MAD IMM has a very specific SDST == SSRC2 requirement, so don't emit Signed-off-by: Roy Spliet <rspliet at eclipso.eu> --- .../drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 18 ++++++++++++------ .../drivers/nouveau/codegen/nv50_ir_target_nv50.cpp | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
2009 Mar 05
3
[LLVMdev] Suggestions for improvements to the GC docs.
...of maintaining the shadow stack? Something like libunwind perhaps? 4) A more general question: In the barrier intrinsics, is there any constraint on the values that the object pointer and the derived pointer can take? In particular, I am thinking about the case where you have an object, such as an ArrayList, in which there are two separate non-contiguous allocations: A fixed-length "header" part, and a variable-length "tail" part. Assume that the header part uses type tags, but the tail part is just a raw data buffer. From a GC perspective, it may be simplest to treat these as a si...
2013 Apr 16
0
[LLVMdev] How to implement list in llvm
...:vector<long> > longVectors;"). > > > > -- > > Cristianno Martins > > > > > > On Monday, 15 de April de 2013 at 07:13, B B wrote: > > > > > > > > > Hi! > > > I want to implement a list (which operates like ArrayList in Java). > > > > > > I can use ArrayType from llvm, but at creation time I have to specify > > > size so there is a problem when I want to extend it (I can reallocate > > > it ofc). Moreover I need to implement all the operations (inserting, > > > rem...
2007 Jan 11
4
counter-intuitive behaveour when passing a proc to Mocha::Expectation#returns
Let''s say that I have a procedure that: * gets the number of bytes to write into some file * and returns the number of successfully written bytes def save( text, len ) This procedure is being used all over the place especially inside the method "process" which I want to test. Thus in order not to polute my filesystem I stub the "save" procedure. But of course in
2009 Mar 06
0
[LLVMdev] Suggestions for improvements to the GC docs.
...between the object and derived pointer parameters except as the plugin requires. I've made this explicit. There is currently no benefit to using gcread/gcwrite vs. coding in the barrier up front. > In particular, I am thinking about the case where you have an > object, such as an ArrayList, in which there are two separate non- > contiguous allocations: A fixed-length "header" part, and a variable- > length "tail" part. Assume that the header part uses type tags, but > the tail part is just a raw data buffer. From a GC perspective, it > may be sim...
2015 Aug 19
5
creating a callinst to an external function
...Constant *fun = M->getOrInsertFunction("foo", Type::getVoidTy(C), PtrToFuncTy, Type::getLabelTy(C), nullptr); Function *dofoo = cast<Function>(fun); Instruction* dofooCall = CallInst::Create(fun, Args2, "", bb); Note: Args2 is an arraylist containing 2 value pointers to a function and a basicblock, bb is the basicblock to insert the call in. When I run the pass using op on a given IR, it produces a declaration and a call correctly like this: declaration: declare void @foo(i32 ()*, label) call: call void...
2014 Jul 08
1
[PATCH] nv50/ir: use unordered_set instead of list to keep our instructions in uses
...; diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index e4f56b1..6c83a60 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -983,7 +983,7 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask) break; i = NULL; if (!insn->getDef(0)->uses.empty()) - i = insn->getDef(0)->uses.front()->getInsn(); + i = (*insn->getDef(0)->uses.begin())->getInsn(); // if this is a contraint-m...
2014 May 13
1
[PATCH 1/2] nv50/ir: make sure that texprep/texquerylod's args get coalesced
...diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 60a6a3f..b284081 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -998,7 +998,9 @@ GCRA::doCoalesce(ArrayList& insns, unsigned int mask) case OP_TXQ: case OP_TXD: case OP_TXG: + case OP_TXLQ: case OP_TEXCSAA: + case OP_TEXPREP: if (!(mask & JOIN_MASK_TEX)) break; for (c = 0; insn->srcExists(c) && c != insn->predSrc...