next up previous contents
Next: The Load Function Up: Computational Model Previous: Computational Model

The I/O Functions

For operators with a directional communications flow, such as broadcast or stream, the compiler generates write and read I/O functions. The writer node (e.g., the broadcast source) calls the write function with the value to broadcast, while the other nodes in the subset call the read function. The other class of operators are called functional, where nodes both provide and receive values; these include, for example, reduce, prefix, and cshift (circular shift). For these operator types, the COP compiler generates a single func function, which on all nodes takes an argument and returns a value.

Since COP's output is a typed language (namely C), operators are currently required to specify the type of the input and output. By default, operators are assumed to pass and return one-word integer arrays. The :type optional argument for operators can specify different types; the basic types are int or float, with a suffix of `32' or `64' to determine word size, and an optional suffix of `*' to indicate an array type. For array types, the :m argument is used to specify the message length, if more than a single value is to be passed at once.


next up previous contents
Next: The Load Function Up: Computational Model Previous: Computational Model
Back to Chris Metcalf's home page