Difference between revisions of "Horizontal"

From Mesham
Jump to navigationJump to search
(Semantics)
(Semantics)
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 ==

Revision as of 21:18, 10 January 2010

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.

Horizontal Partition of an array into three blocks via type oriented programming

Communication

There are a number of different default communication rules associated with the horizontal partition, 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.

Horizontal blocks also support .high and .low, which will return the top and bottom bounds of the block