search for: trip

Displaying 20 results from an estimated 2542 matches for "trip".

Did you mean: trap
2012 Mar 06
1
How to eliminate for next loops in this script
...series of nested for next loops. I know that there must be a better way to do so, but could use some assistance pointing the way. Here is my working, but inefficient script: library(Hmisc) rm(list=ls()) load('NHTS.Rdata') day.wt <- day[c("HOUSEID","WTTRDFIN", "TRIPPURP","TRVLCMIN")] hh.wt <- hh[c("HOUSEID","WTHHFIN","HHSIZE","HHVEHCNT","HOMETYPE")] hh.wt$HHBIN <- with(hh.wt,{ cut(HHSIZE, breaks=c(0,1,2,3,4,max(HHSIZE)),labels=c("1","2","3","4","...
2009 Sep 22
1
matching pairs regardless of order,multiple matches
Dear Jim and Henrique, thank you both for your help. I have done this but run into another problem: ? In the example?below "loc1,loc2" occurs in the (now correct, thanks to your advice) "list" twice. ? ? trips=("loc1,loc2","loc2,loc3") ? DF$listoftrips=("loc1,loc2", "loc1,loc3", "loc2,loc3","loc1,loc2"). ? I?am now?using? ? DF$Data[match(trips,listoftrips)] to get Data associated with the trips listed in "trips". ? My problem is tha...
2005 Apr 07
2
Zipping Rdata Files
...the help files or through searching the mail archives.) The system function can be used to call gzip or some other utility, but perhaps there is a more direct method. Also, when I use gzip to zip a file, I get an error message when using zip.file.extract to extract the file as follows: > save(trips, file="trips.Rdata") > system("gzip trips.Rdata") # saves trips.Rdata in an archive named trips.Rdata.gz > load(zip.file.extract("trips.Rdata", "trips.Rdata.gz")) [1] "trips.Rdata" Warning message: error 1 in extracting from zip file...
2007 May 10
0
Counterintuitive behavior in ActiveRecord I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_
I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_driver=trip.driver trip.driver=alice In this example, who is old_driver? If you guessed Alice, you''re right. Inside associations.rb, the mutator is defined as: define_method("#{reflection.name}=") do |new_value| association...
2011 May 27
0
How to process raw trip records to get number of persons per trip by vehicle
I have a large data set containing travel records for a para-transit system. There is one record for each person transported, that contains the following information: Vehicle.Id Customer.Id Trip.Date TimeOn TimeOff Fare W36 1 2009.07.01 09:15 09:53 3.75 W36 2 2009.07.01 09:23 09:57 3.75 W36 3 2009.07.01 11:40 13:06 5.45 W35...
2016 Sep 16
2
SCEV cannot compute the trip count of Simple loop
...; >> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > >> > >> > int mat[9][9][9]; > >> > for (p = (x+1) ; p < (x+3) ;p++) > >> > mat[x][p-1][i] = mat[x][p-1][i] + 5;____ > >> > } > >> The trip count of 2 should be valid for x in [0,6]. > > > > It is not clear to me why the trip count of 2 isn’t *always* valid. > > It is always valid to return 2 as the trip count. But SCEV today is > not always able to exploit nsw/nuw due to some systemic issues. I understood that...
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
Thanks a lot for your guys' help!!! I guess once I am able to get *V* (which probably is a pointer to a Value object), then, I can instrument some code at the IR level to dump V. As long as I maintain V at this pass stage, I should be able to dump the loop trip count. This is true, isn't it? Basically, what I am going to do is to add a function call before the loop body, such as: dumpInfo(FILE_NAME, LINE_NUMBER, VALUE_TYPE, Value) ... for (int i=0; i<num; i++) of course, this may have some side effects. If the trip count is a function call, and...
2010 Apr 05
3
[LLVMdev] Get the loop trip count variable
Hello, I am wondering whether I can get the variable name of loop trip count in LLVM? For example, int NUM; NUM=atoi(argv[i]); for (int i=0; i<NUM; i++) { ... } How can I get the corresponding variable name for "NUM"? Then, I can instrument something in the source code to record the loop trip count for a given input data set. BasicBlock* b = L-&...
2007 Oct 24
2
Help with loop counting?
...voip-info but I can't get it to work. Not sure if I've got some syntax wrong somewhere? All that happens at the moment, is I hit is the playback of "som-debug" at 9999. Any ideas would be appreciated! extensions.conf: [so-mainmenu] exten => s,1,Answer exten => s,2,Set(trips=1) exten => s,3,SetMusicOnHold(default) exten => s,4,Set(TIMEOUT(digit)=5) exten => s,5,Set(TIMEOUT(response)=10) exten => s,6,Background(softopt/som-mainmenu) exten => s,7,GotoIf($[${trips}=4]?9999,8) exten => s,8,WaitExten(5) exten => s,9,Wait(5) exten => 1,1,Goto(so-sand...
2016 Sep 16
2
SCEV cannot compute the trip count of Simple loop
> On Sep 16, 2016, at 1:56 PM, Kevin Choi via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > int mat[9][9][9]; > > for (p = (x+1) ; p < (x+3) ;p++) > > mat[x][p-1][i] = mat[x][p-1][i] + 5; > > } > The trip count of 2 should be valid for x in [0,6]. It is not clear to me why the trip count of 2 isn’t *always* valid. > If SCEV doesn't catch it with, say GVN and appropriate matching conditions, it could be improved. > CMIIW, I don't think LLVM goes out of the way to opportunistically ver...
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
Sorry, I could not the the loop trip count with getTripCount(). I used a simple program as a test case: ------------------------------------------------------ #include <stdio.h> int getV(int i) { return i * 2; } int main() { int num = 10; int sum=0; int i; for (i=0; i<num; i++)...
2010 Apr 05
0
[LLVMdev] Get the loop trip count variable
On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: > Hello, > > I am wondering whether I can get the variable name of loop trip count in LLVM? > > For example, > > int NUM; > > NUM=atoi(argv[i]); > > for (int i=0; i<NUM; i++) > { >    ... > } > > How can I get the corresponding variable name for "NUM"? Then, I can > instrument something in the source code to record the...
2012 Jan 18
2
[LLVMdev] getSmallConstantTripCount function doesn't work for obvious cases
Hi, My pass heavily relies on llvm::Loop's getSmallConstantTripCount method. However, I found that it doesn't work for some simple cases. In the following example, I can get the constant trip count of the outermost loop if statement "a[l] = a[l] + 1" is there. After commenting out this line, the returned constant trip count for that loop is 0. In...
2010 Apr 06
1
[LLVMdev] Get the loop trip count variable
...opagation and back edges. Cheers, Zheng On 5 April 2010 21:51, Eli Friedman <eli.friedman at gmail.com> wrote: > On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: >> Hello, >> >> I am wondering whether I can get the variable name of loop trip count in LLVM? >> >> For example, >> >> int NUM; >> >> NUM=atoi(argv[i]); >> >> for (int i=0; i<NUM; i++) >> { >>    ... >> } >> >> How can I get the corresponding variable name for "NUM"? Then, I can >&gt...
2008 May 09
3
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
...pInstruction and > FoldBlockIntoPredecessor support functions there. > > Additionally, I've also moved the loop unrolling statistics into the > Utils file. Is > that a good idea? > > I've added two new methods to Loop (or LoopBase<> really): > getSmallConstantTripCount() and getSmallConstantTripMultiple(), > which return > the trip count and multiple as a normal unsigned value. > > There are a number of remaining issues, though. Firstly, I observe > some code > duplication. Every pass that performs loop unrolling, should depend > o...
2013 Sep 27
2
[LLVMdev] Trip count and Loop Vectorizer
Hi Nadav, Thanks for the response. I forgot to mention that there is an upper limit of 16 for the Trip Count check, TinyTripCountVectorThreshold = 16; if (TC > 0u && TC < TinyTripCountVectorThreshold). So right now, any loop with Trip Count as 0, or with value >=16, LV with unroll. With the change to the lower bound, it will also include the loop with 0 trip count. SCEV returns 0 t...
2017 Dec 30
0
10 Minute Time Window Aggregate By Multiple Grouping Variables
Hello All, I have 1M rows of time stamped information about delivery trucks and their trip related information from simulation .Detailed info the column names and attributes for clarity 1. id: alphanumeric factor/character 2. datetime.of.trip.start: POSIXct yyyy-mm-dd hh:mm:ss 3. datetime.of.trip.end: POSIXct yyyy-mm-dd hh:mm:ss 4. trip.distance: numeric, miles 5. trip.f...
2016 Sep 16
2
SCEV cannot compute the trip count of Simple loop
@Sanjoy, what's the issue with <nsw>? Moreover, why can't SCEV detect that x is loop invariant and just take the diff/incr? On Fri, Sep 16, 2016 at 2:50 PM, Kevin Choi <code.kchoi at gmail.com> wrote: > Assuming compiler assumes program is free of UB, I suppose trip count of 2 > is always valid. I misplaced valid to trip count when it should've been > "program is valid only for x in [0.6]". > > On Fri, Sep 16, 2016 at 2:29 PM, Mehdi Amini <mehdi.amini at apple.com> > wrote: > >> >> > On Sep 16, 2016, at 2:23...
2008 May 08
2
Replicating Rows
Hi, I have a data matrix in which there are 1000 rows by 30 columns. The first column of each row is a numeric indicating the number of trips taken to a particular location with location attributes in the following column entries for that row. I want to repeat each row based on the number of trips taken (as indicated by the number in the first column)...i.e., if 1,1 indicates 4 trips, I want to replicate row 1 four times, and do this...
2017 Feb 22
3
[Proposal][RFC] Epilog loop vectorization
Hi, This is a proposal about epilog loop vectorization. Currently Loop Vectorizer inserts an epilogue loop for handling loops that don't have known iteration counts. The Loop Vectorizer supports loops with an unknown trip count, unknown trip count may not be a multiple of the vector width, and the vectorizer has to execute the last few iterations as scalar code. It keeps a scalar copy of the loop for the remaining iterations. Loop with the large width has a high possibility of executing many scalar iterations. i.e....