Difference between revisions of "Horizontal"
(→Semantics) |
m (11 revisions imported) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
This type will split up data horizontally into a number of blocks. If the split is uneven then the extra data will be distributed amongst the blocks in the most efficient way in order to keep the blocks a similar size. The figure below illustrates horizontally partioning an array into three blocks. | This type will split up data horizontally into a number of blocks. If the split is uneven then the extra data will be distributed amongst the blocks in the most efficient way in order to keep the blocks a similar size. The figure below illustrates horizontally partioning an array into three blocks. | ||
− | <center>[[Image:horiz.jpg]]</center> | + | <center>[[Image:horiz.jpg|Horizontal Partition of an array into three blocks via type oriented programming]]</center> |
== Communication == | == Communication == | ||
− | + | {{OneDimPartitionCommunication}} | |
− | + | == Dot operators == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Horizontal blocks also support | + | Horizontal blocks also support a variety of dot operators to provide meta data |
+ | {{OneDimPartitionDotOperators}} | ||
+ | |||
+ | ''Since: Version 0.41b'' | ||
[[Category:Type Library]] | [[Category:Type Library]] | ||
− | [[Category: | + | [[Category:Compound Types]] |
[[Category:Partition Types]] | [[Category:Partition Types]] |
Latest revision as of 15:44, 15 April 2019
Syntax
horizontal[blocks]
Where blocks is number of blocks to partition into.
Semantics
This type will split up data horizontally into a number of blocks. If the split is uneven then the extra data will be distributed amongst the blocks in the most efficient way in order to keep the blocks a similar size. The figure below illustrates horizontally partioning an array into three blocks.
Communication
There are a number of different default communication rules associated with the one dimensional partitions, based on the assignment assigned variable:=assigning variable which are detailed below.
Assigned Variable | Assigning Variable | Semantics |
---|---|---|
single | partition | Gather |
partition | single | Scatter |
partition | partition | Local copy |
As in the last row of the table , if the two partitions are the same type then a simple copy is performed. However, if they are different then an error will be generated as Mesham disallows differently typed partitions to be assigned to each other.
The programmer can also read and write to each element in the partitioned data directly. Either the global coordinates or the block ID its local coordinates can be supplied. This will deduce whether or not the block is on another process, issue any communication as required and complete in that single assignment or access. Because this completes in that expression rather than waiting for a synchronisation, non local data movement is potentially an expensive operation.
Dot operators
Horizontal blocks also support a variety of dot operators to provide meta data
Dot operation | Semantics |
---|---|
high | Largest global coordinate wrt a block in specific block dimension |
low | Smallest global coordinate wrt a block in specific block dimension |
top | Largest global coordinate in specific block dimension |
localblocks | Number of blocks held on local process |
localblockid[i] | Id number of ith local block |
Since: Version 0.41b