public interface HjPlace
A place is an abstraction for a set of worker threads. The management of individual worker threads within a place is not visible to an HJ program.
Data locality can be controlled by assigning two tasks with the same data affinity to execute in the same place. An
optional at clause can be specified on an async statement or expression of the form, asyncNbAt(place-expr,
body)
, where place-expr is a place-valued expression. This clause dictates that the child async task can only be
executed by a worker thread at the specified place. If the at clause is omitted, then the child task is scheduled by
default to execute at the same place as its parent task. The main program task is assumed to start in place 0. Each
task has a designated place. If a program only uses a single place, all async tasks just run at place 0 by default.
The value of a task's place can be retrieved by using the method call, here()
. The current release of HJ
supports a flat partition of tasks into places.
Modifier and Type | Method and Description |
---|---|
int |
id()
Returns the id of this place.
|
HjPlace |
nextPlace() |
int |
numPlaces() |
HjPlace |
place(int id) |
HjPlace |
prevPlace() |
int id()
HjPlace place(int id)
int numPlaces()
HjPlace nextPlace()
HjPlace prevPlace()
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.