Safe HaskellNone



For more information please see http://www.flocc.net/



getDimIdsFromLfTy :: LfTy -> Set String

getDimIdsFromLfTy ty. Returns all the var ids of dims in DMaps and DArrs in ty.

getDimIdsFromTy :: Ty -> Set String

getDimIdsFromTy ty. Returns all the var ids of dims in DMaps and DArrs in ty.

initNodeRanks :: Monad m => Id -> Id -> [Int] -> [(Int, Int)] -> GenM1 m Code

initNodeCoordArr :: Monad m => GenM m

initNodeCoordArr. Generates code to create a cartesian topology for COMM_WORLD |with the right num of dims (trying to keep dim lengths roughly equal) |and inits an array of node coords to ranks using it.

coordVarToNodeRank3 :: Monad m => Val m -> Val m -> Ty -> Ty -> Ty -> GenM1 m Code

coordVarToNodeRank2 coordVar rankVar cartDims dimTy mirDimTy. Takes a coordVar (tuple of integers), and |generates code to assign the rank of the node defined by coordVar and dimTy (the dimensions |the coords refer to), to rankVar. Any dims not in coordVar and dimTy are set to |this node's coord values if that dim is in mirDimTy, or 0 otherwise.

varToNodeRank :: (Monad m, MonadCatch m) => Val m -> Val m -> Ty -> Ty -> Ty -> GenM1 m Code

varToNodeRank inV rankV cartDims dimTy mirDimTy. Returns code that assigns |to rankV the rank that the value in inV should live at. dimTy is the dim that |we are partitioning across.

varToNodeRankV :: (Monad m, MonadCatch m) => Id -> IdTree -> Id -> Ty -> Ty -> Ty -> GenM m

varToSubNodeRankV codeVid inVid outVid parDimTy mirrDimTy. Returns |node rank for a given value, but takes names of local template vars |rather than VarVs.

hasDataPred :: Monad m => Ty -> Ty -> GenM1 m Code

hasDataPred parDims mirrDims. Generates a predicate |that will return true if there is data on the current |node for the dims given.

genHasDataPred :: Monad m => Id -> Ty -> Ty -> GenM m

genHasDataPred predExpVname. Generates predicate that returns true |if the dist given implies there will be data on the current node, |and binds the predicate as code to predExpVname.

genSubCartV :: (Monad m, MonadCatch m) => Id -> Id -> Ty -> GenM m

genSubCartV commV coordMapV dims. Generates code to create |a new sub cartesian toplology, where only the dims in dims remain. |The code to create it is bound to codeV, the new comm var bounds to |commVname, and the new coord map to coordMapV. If all dims are included |the this returns the global cart topology, and doesn't create another one. |Code is added to init stream. If already created for these dims, doesn't recreate.

getDimSize :: Monad m => Id -> Ty -> GenM m

getDimSize varName dimTy. Binds an expression giving the number of |nodes in the dimensions in dimTy, to a var called varName.