.. default-domain:: chpl .. module:: AggregationBuffer :synopsis: TODO: Experiment with expanding buffer sizes AggregationBuffer ================= **Usage** .. code-block:: chapel use AggregationBuffer; TODO: Experiment with expanding buffer sizes .. data:: config const AggregatorMaxBuffers = -1 .. data:: config const AggregatorBufferSize = 64*1024 .. data:: config param AggregatorDebug = false .. function:: proc UninitializedAggregator(type msgType) .. record:: Aggregator .. attribute:: type msgType .. attribute:: var instance: unmanaged nilable AggregatorImpl(msgType) .. attribute:: var pid = -1 .. method:: proc init(type msgType, aggregatorBufferSize: int = AggregatorBufferSize, aggregatorMaxBuffers: int = AggregatorMaxBuffers) .. method:: proc init(type msgType, instance: unmanaged nilable AggregatorImpl(msgType), pid: int) .. method:: proc init=(other) .. method:: proc destroy() .. method:: proc isInitialized() .. method:: proc _value .. class:: Buffer Buffer contains the aggregated data that the user aggregates. The buffer, if returned to the user, must be recycled back to the buffer pool by invoking 'done'. .. attribute:: type msgType .. method:: proc readWriteThis(f) .. method:: proc done() Recycles self back to buffer pool. Using the buffer after invoking this method is subject to undefined behavior. .. method:: proc this(idx: integral) ref Indexes into buffer. This will be remote if the buffer is. .. itermethod:: iter these(): msgType Iterates over buffer. The buffer is copied to current locale, so it will be local. .. itermethod:: iter these(param tag: iterKind): msgType Iterates over buffer in parallel. The buffer is copied to current locale so it will be local. .. itermethod:: iter these(param tag: iterKind): msgType .. itermethod:: iter these(param tag: iterKind, followThis): msgType .. method:: proc getPtr() .. method:: proc getDomain() .. method:: proc getArray() .. method:: proc size .. method:: proc cap .. class:: AggregatorImpl .. attribute:: type msgType .. method:: proc init(type msgType, aggregatorBufferSize: int, aggregatorMaxBuffers: int) .. method:: proc init(other, pid: int) .. method:: proc deinit() .. method:: proc dsiPrivatize(pid) .. method:: proc dsiGetPrivatizeData() .. method:: proc getPrivatizedInstance() .. method:: proc size() .. method:: proc sizeGlobal() .. method:: proc aggregate(msg: msgType, loc: locale): unmanaged nilable Buffer(msgType) .. method:: proc aggregate(msg: msgType, locid: int): unmanaged nilable Buffer(msgType) .. itermethod:: iter flushGlobal(targetLocales = Locales): (unmanaged Buffer(msgType), locale) .. itermethod:: iter flushGlobal(targetLocales = Locales, param tag: iterKind): (unmanaged Buffer(msgType), locale) .. itermethod:: iter flushLocal(targetLocales = Locales): (unmanaged Buffer(msgType), locale) .. itermethod:: iter flushLocal(targetLocales = Locales, param tag: iterKind): (unmanaged Buffer(msgType), locale)