CommAggregation¶
Usage
use CommAggregation;
or
import CommAggregation;
Submodules
- proc newDstAggregator(type elemType, param useUnorderedCopy = false)¶
Creates a new destination aggregator (dst/lhs will be remote).
- proc newSrcAggregator(type elemType, param useUnorderedCopy = false)¶
Creates a new source aggregator (src/rhs will be remote).
- record DstAggregator¶
Aggregates copy(ref dst, src). Optimized for when src is local.
Not parallel safe and is expected to be created on a per-task basis
High memory usage since there are per-destination buffers
- type elemType¶
- type aggType = (c_ptr(elemType), elemType)¶
- const bufferSize = dstBuffSize¶
- const myLocaleSpace = 0..<numLocales¶
- var lastLocale : int¶
- var opsUntilYield = yieldFrequency¶
- var lBuffers : c_ptr(c_ptr(aggType))¶
- var rBuffers : [myLocaleSpace] remoteBuffer(aggType)¶
- var bufferIdxs : c_ptr(int)¶
- proc ref postinit()¶
- proc ref deinit()¶
- proc ref flush()¶
- proc ref copy(ref dst: elemType, const in srcVal: elemType)¶
- proc ref flushBuffer(loc: int, ref bufferIdx, freeData)¶
- record DstUnorderedAggregator¶
“Aggregator” that uses unordered copy instead of actually aggregating
- type elemType¶
- proc deinit()¶
- proc flush()¶
- proc copy(ref dst: elemType, const in srcVal: elemType)¶
- record SrcAggregator¶
Aggregates copy(ref dst, const ref src). Only works when dst is local.
Not parallel safe and is expected to be created on a per task basis
High memory usage since there are per-destination buffers
- type elemType¶
- type aggType = c_ptr(elemType)¶
- const bufferSize = srcBuffSize¶
- const myLocaleSpace = 0..<numLocales¶
- var lastLocale : int¶
- var opsUntilYield = yieldFrequency¶
- var dstAddrs : c_ptr(c_ptr(aggType))¶
- var lSrcAddrs : c_ptr(c_ptr(aggType))¶
- var lSrcVals : [myLocaleSpace] [0..#bufferSize] elemType¶
- var rSrcAddrs : [myLocaleSpace] remoteBuffer(aggType)¶
- var rSrcVals : [myLocaleSpace] remoteBuffer(elemType)¶
- var bufferIdxs : c_ptr(int)¶
- proc ref postinit()¶
- proc ref deinit()¶
- proc ref flush()¶
- proc ref copy(ref dst: elemType, const ref src: elemType)¶
- proc ref flushBuffer(loc: int, ref bufferIdx, freeData)¶
- record SrcUnorderedAggregator¶
“Aggregator” that uses unordered copy instead of actually aggregating
- type elemType¶
- proc deinit()¶
- proc flush()¶
- proc copy(ref dst: elemType, const ref src: elemType)¶
- record remoteBuffer¶
- type elemType¶
- var size : int¶
- var loc : int¶
- var data : c_ptr(elemType)¶
- proc ref cachedAlloc() : c_ptr(elemType)¶
- iter localIter(data: c_ptr(elemType), size: int) ref : elemType¶
- proc localFree(data: c_ptr(elemType))¶
- proc ref markFreed()¶
- proc PUT(lArr: [] elemType, size: int) where lArr.isDefaultRectangular()¶
- proc PUT(lArr: c_ptr(elemType), size: int)
- proc ref GET(ref lArr: [] elemType, size: int) where lArr.isDefaultRectangular()¶
- proc ref deinit()¶
- proc bufferIdxAlloc()¶