|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javaseis.parallel.DistributedGrid
public class DistributedGrid
Define a Distributed Grid that represents the "memory resident" portion of a full JavaSeis GridDefinition. The resident portion is a subset of the full grid that will be stored in memory. This class can then be used to construct an instance of org.javaseis.parallel.DistributedArray that conforms to the resident portion. Dimension ordering is in "Fortran" order, where the first dimension has unit stride in memory. The resident portion consists of "leading" dimensions, and must be less than or equal to the number of dimensions of the full grid. The last resident dimension of the DistributedArray is decomposed across tasks using a BLOCK parallel Decomposition. Methods are provided to construct a DistributedArray with appropriate padding based on the sizes of the associated GridDefinition and parallel Decomposition.
Constructor Summary | |
---|---|
DistributedGrid(GridDefinition fullGrid,
int residentDimensions,
IParallelContext parallelContext)
Define a DistributedGrid from a GridDefinition and the number of leading dimensions that will be stored in memory. |
Method Summary | |
---|---|
DistributedArray |
allocateArray(java.lang.Class classType,
int elementCount)
Allocate a distributed array based on the sizes of the resident axes of the DistributedGrid. |
DistributedArray |
allocateArray(java.lang.Class classType,
int elementCount,
int[] paddedLengths,
int[] decompTypes)
Allocate a distributed array based on the sizes of the resident axes of the DistributedGrid. |
DistributedArray |
getDistributedArray()
Return the DistributedArray associated with this DistributedGrid |
GridDefinition |
getFullGrid()
Return the full GridDefinition for the DistributedGrid |
GridDefinition |
getSubGrid()
Return a GridDefinition for the resident portion of the DistributedGrid |
void |
setParallelContext(IParallelContext parallelContext)
Set the ParallelContext to be used for the DistributedArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DistributedGrid(GridDefinition fullGrid, int residentDimensions, IParallelContext parallelContext)
fullGrid
- the full grid from which the DistributedGrid is constructedresidentDimensions
- the number of dimensions of the resident portionparallelContext
- parallel context for the distributed gridMethod Detail |
---|
public DistributedArray allocateArray(java.lang.Class classType, int elementCount)
classType
- Class type of the elements of the DistributedArrayelementCount
- Number of elements per sample for the DistributedArray
public DistributedArray allocateArray(java.lang.Class classType, int elementCount, int[] paddedLengths, int[] decompTypes)
classType
- class type for the elements of the arrayelementCount
- number of elements per sample for the arraypaddedLengths
- padded length for each axis of the arraydecompTypes
- decomposition type (from Decomposition) for each axis
public DistributedArray getDistributedArray()
public GridDefinition getFullGrid()
public GridDefinition getSubGrid()
public void setParallelContext(IParallelContext parallelContext)
parallelContext
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |