.. default-domain:: chpl .. module:: Utilities Utilities ========= **Usage** .. code-block:: chapel use Utilities; or .. code-block:: chapel import Utilities; **Submodules** .. toctree:: :maxdepth: 1 :glob: Utilities/* .. data:: config param loopGpuSupport = CHPL_LOCALE_MODEL == "gpu" .. function:: proc targetGpu() param: bool .. data:: param debugPrint = false .. function:: proc err(args ...?n) .. function:: proc debugWrite(args ...?n) .. iterfunction:: iter cartesian(X, Y) .. iterfunction:: iter cartesian(param tag: iterKind, X, Y) where tag == iterKind.standalone .. iterfunction:: iter flatIter(D: domain(?)) .. iterfunction:: iter flatIter(param tag: iterKind, D: domain(?)) where tag == iterKind.standalone .. function:: proc product(tup: int ...?rank) .. function:: proc linearIdx(shape: ?rank*int, idx: rank*int) .. function:: proc normalizeArray(arr: []) .. function:: proc normalizeArray(unknown: ?t) where !isArrayType(t) .. function:: proc normalizeDomain(dom: domain(?)): domain(dom.rank, int) .. function:: proc emptyDomain(param rank: int): domain(rank, int) .. function:: proc domainFromShape(shape: int ...?rank): domain(rank, int) .. function:: proc rangeFromBound(high: int): range .. function:: proc rangeFromBound(low: int, high: int): range .. function:: proc rangeFromStart(start: int, count: int) .. function:: proc rangesFromBounds(bounds: 2*int ...?rank): rank*range .. function:: proc rangesFromShape(shape: int ...?rank): rank*range .. function:: proc nbase(bounds: ?rank*int, n: int): rank*int .. function:: proc nbase(bounds: int, n: int): 1*(int) .. function:: proc indexInShape(shape: ?rank*int, in n: int): rank*int .. function:: proc indexAtHelperProd(n: int, prod: int, shape: int ...?rank): rank*int where rank > 1 .. function:: proc indexAtHelperMultiples(n: int, divs: int ...?rank): rank*int .. function:: proc indexAt(n: int, shape: int) .. function:: proc indexAt(n: int, shape: int ...?rank): rank*int where rank > 1 .. iterfunction:: iter fastEach(shape: int ...?rank): rank*int .. function:: proc argsort(tup: int ...?rank)