next up previous contents
Next: Loop and Branch Prediction Up: COP Language Design Issues Previous: Exposing I/O Wait Time

Hidden State

The language currently requires some state to be defined for many operator implementations. For example, a stream with a run-time destination is defined such that when the destination and the source are the same node, the implementation sets a run-time flag, copies the write function argument to a buffer, then later copies it back to the read function's buffer. Such copying and state would be unnecessary if a single compiler were generating both computation and communication code. (Although, of course, the HLL compiler is free to avoid the calls to the write and read function altogether if it determines that the source and destination are the same.)

An attempt is made in the implementation to expose some of this to the compiler in the returned implementation functions; for example, with the current compiler, the setting and testing of the local flag is visible to the HLL compiler, and the test of the flag can be elided. However, the semantics of C are such that an extra copy to the local-destination buffer are unavoidable.

A similar example occurs with the parallel prefix (scan) and reduction operators, which are passed a function pointer to be used on the operator arguments. In an integrated compiler, the user's function would be applied directly to the arguments. Again, some attempt is made in the current compiler to expose this mechanism; if the reduction function is defined `inline' before the COP functions are processed, the user's function will be integrated into the operator function. However, more sophisticated operations are still difficult to express; using a streaming-message interface, a long-word sum-reduction might want to use carry-propagating add instructions, and access to such primitives would be difficult to guarantee in the COP environment.


next up previous contents
Next: Loop and Branch Prediction Up: COP Language Design Issues Previous: Exposing I/O Wait Time
Back to Chris Metcalf's home page