Displaying 16 results from an estimated 16 matches for "forloop".
2009 Oct 06
2
[LLVMdev] What opt pass attempts implements this optimization?
I have a very simple kernel that is generating very very bad code.
The basic kernel pseudo-code is as follows:
forloop(1 to n) {
forloop(0 to j) {
A
}
B
}
C
It is generating very ugly and inefficient code for a vector system
similar to the following pseudo-code:
if (n > 1) {
if (j) {
forloop(1 to n) {
forloop(0 to j) {...
2009 Oct 07
0
[LLVMdev] What opt pass attempts implements this optimization?
On Oct 6, 2009, at 4:28 PM, Villmow, Micah wrote:
> I have a very simple kernel that is generating very very bad code.
>
> The basic kernel pseudo-code is as follows:
> forloop(1 to n) {
> forloop(0 to j) {
> A
> }
> B
> }
> C
>
> It is generating very ugly and inefficient code for a vector system
> similar to the following pseudo-code:
> if (n > 1) {
> if (j) {
> forloop(1 to n) {
>...
2000 Nov 21
1
How do you construct a function from a list?
I'm trying to get a data.restore function to work on functions. One
thing I can't figure out: how do you construct a function from it's
component parts?
For example, I can construct a for loop as
forloop <-
as.call(list(as.name('for'),as.name('i'),1,as.call(list(as.name('junk')))))
which results in
for (i in 1) junk()
But how do I put that in a function? For example, I'd like the
function
function() for (i in 1) junk()
but as.function(list(forloop)) result...
2005 Jan 25
1
chron: parsing dates into a data frame using a forloop
...NA NA NA NA NA
8 11/08/54 1 11 1 8 NA NA NA NA NA NA
9 11/09/54 1 11 1 9 NA NA NA NA NA NA
10 11/10/54 1 11 1 10 NA NA NA NA NA NA
>
The problem seems to be with assigning within the forloop, or making the
assignment into a data frame, since:
> years(mans.met$date[5])
[1] 1954
Levels: 1954
> test<-years(mans.met$date[5])
> test
[1] 1954
Levels: 1954
>
> months(mans.met$date[5])
[1] Nov
12 Levels: Jan < Feb < Mar < Apr < May < Jun < Jul < Aug <...
2012 Mar 21
1
Forloop/ifelse program problem and list of dataframes
Hello R Community,
I don't post to these things often so excuse me if I stumble on my forum
etiquette. This is a complex problem for me, which may require two forum
entries, but I will try my best to be concise. Also, I am a self taught
coder, so if my code is not to convention, your constructive criticism is
always welcome.
I need to split up a data frame by participant (gpsarc -
2007 Feb 13
5
Fatigued R
Hi R,
Please solve my problem...........
I am extracting Bloomberg data from R, in a loop. R is getting fatigued
by doing this process and gives some errors. I introduced sleep
function. Doing this sometimes I get the results and sometimes not. I
even noticed that if I give complete rest for R (don't open R window)
for 1 day and then run my code with the sleep function, then the
2005 Jan 26
1
summarizing daily time-series date by month
Message: 63
Date: Wed, 26 Jan 2005 04:28:51 +0000 (UTC)
From: Gabor Grothendieck <ggrothendieck at myway.com>
Subject: Re: [R] chron: parsing dates into a data frame using a
forloop
To: r-help at stat.math.ethz.ch
Message-ID: <loom.20050126T052153-333 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii
Benjamin M. Osborne <Benjamin.Osborne <at> uvm.edu> writes:
:
: I have one data frame with a column of dates and I want to fill another data
: fram...
2000 Nov 22
0
How do you construct a function from a list? (PR#743)
...2 Nov 2000 13:08:26 +0100, Kurt Hornik wrote:
.
>>>>> Duncan Murdoch writes:
>> I'm trying to get a data.restore function to work on functions. One
>> thing I can't figure out: how do you construct a function from it's
>> component parts?
...
>> forloop <-
>> as.call(list(as.name('for'),as.name('i'),1,as.call(list(as.name('junk')))))
.
>
>I think the easiest approach is to do
>
> foo <- function() {}
> body(foo) <- forloop
That one gives me the same as "as.function(list(forloop))", i...
2009 Jan 03
2
R badly lags matlab on performance?
...rep(1,10000000)
system.time(a <- a + 1)
system.time(for (i in 1:10000000) {a[i] <- a[i] + 1})
---------------------------------------------------------------------------
and here's its matlab version:
---------------------------------------------------------------------------
function forloop()
a = ones(1e7,1);
tic; a = a + 1; toc
tic
for i=1:1e7
a(i) = a(i) + 1;
end
toc
---------------------------------------------------------------------------
The machine used for testing was an i386 core 2 duo machine at 2.2
GHz, running OS X `Tiger'. The R was 2.8.0 and the m...
2010 Jun 10
1
Sweave cutting new lines
...Sweave, I generate tex code straight from R for
dynamically computed reports.
If I do this in R:
for (i in 0:4) {cat("\n",i,"\n")};cat("\n 3")
0
1
2
3
4
3
The output looks correct.
However, Sweave for some reason seems to trim everything outside
forloops. Hence, this
<<results=tex,echo=FALSE>>=
sec<-0
lambda<-0
chartvalue<-"b"
relsec<-0
for (chartvalue in c("b","beta")) {
for (relsec in 0:(e("count pd")-2)) {
file<-paste("working/frontfile",sec,"x&quo...
2012 Oct 30
2
Put submatrices in an array
Dear R users,
I have a Hadamard matrix 16x15 and i want to put 16x5 submatrices in an array put i have an error.
> A1<-matrix(c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
+ 0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,
+ 1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,
+ 0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,
+ 1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,
+ 0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,
+ 1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,
+
2011 Oct 07
0
[LLVMdev] Enhancing TableGen
On Oct 7, 2011, at 11:23 AM, David A. Greene wrote:
> Evan Cheng <evan.cheng at apple.com> writes:
>
>> David, we cannot accept the 'multidef' keyword. Please revert it.
>
> Working on it now.
>
>> We appreciate you thinking ahead about MIC, but we are against the
>> massive refactoring and complicated abstraction scheme. We'll never
>>
2012 Feb 27
0
[LLVMdev] llvm-stress for fuzzing llvm
...t the sender and delete all copies.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120227/6397736d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forloop.diff
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120227/6397736d/attachment.bin>
2012 Feb 27
2
[LLVMdev] llvm-stress for fuzzing llvm
Sean,
Thanks for looking at this. Knowing that the last instruction triggered the bug is often not enough. I use bugpoint to reduce the failing test. The reason is that some of the bugs may be caused by the interaction between several instruction. Having said that, I think that the change that you proposed is a good one. Can you send a patch ?
Thanks,
Nadav
From: Sean Silva
2011 Oct 07
6
[LLVMdev] Enhancing TableGen
Evan Cheng <evan.cheng at apple.com> writes:
> David, we cannot accept the 'multidef' keyword. Please revert it.
Working on it now.
> We appreciate you thinking ahead about MIC, but we are against the
> massive refactoring and complicated abstraction scheme. We'll never
> accept those patches.
How about a less massive and complicated scheme? I think we can
make
2011 Nov 09
3
R to automate scatter plots
Hi R people!
I have a directory of .csv files I would like to make into objects
then scatter plots. I have been having varying degrees of progress. I
was able
make an object of all files, loop through it, and make a pdf of the
last file I looped through. I kept renaming the pdf so instead of
ending up with
27 pdfs I got one, with the data from the last file
I have been tweaking with it