Portability | not portable |
---|---|

Stability | beta |

Maintainer | eden@mathematik.uni-marburg.de |

Safe Haskell | None |

This Haskell module defines iteration skeletons for Eden.

Depends on the Eden Compiler.

Eden Project

- iterUntilAt :: (Trans wl, Trans t, Trans sr) => Places -> (inp -> ([wl], [t], ml)) -> (wl -> t -> (sr, wl)) -> (ml -> [sr] -> Either r ([t], ml)) -> inp -> r
- iterUntil :: (Trans wl, Trans t, Trans sr) => (inp -> ([wl], [t], ml)) -> (wl -> t -> (sr, wl)) -> (ml -> [sr] -> Either r ([t], ml)) -> inp -> r

# Iteration Skeletons

:: (Trans wl, Trans t, Trans sr) | |

=> Places | where to instatiate |

-> (inp -> ([wl], [t], ml)) | input transformation function |

-> (wl -> t -> (sr, wl)) | worker function |

-> (ml -> [sr] -> Either r ([t], ml)) | combine function |

-> inp | input |

-> r | result |

This is the basic implementation, using places for explicit process | placement of the worker processes.

:: (Trans wl, Trans t, Trans sr) | |

=> (inp -> ([wl], [t], ml)) | input transformation function |

-> (wl -> t -> (sr, wl)) | worker function |

-> (ml -> [sr] -> Either r ([t], ml)) | combine function |

-> inp | input |

-> r | result |

The iterUntil skeleton is an iterated map skeleton. Each worker function transforms one local worker state and one task per iteration. The result is the next local state and the iterations result, which is send back to the master. The master transforms the output of all tasks of one iteration and a local master state into the worker inputs of the next iteration and a new master state using the combine function (output: Right tasks masterState) or decides to terminate the iteration (output: Left result). The input transformation function generates all initial worker states and initial worker tasks and the initial master state from the skeleton.