(doiter varname iterable & body)
Execute body for every item in the iterable. Expecting side effects, returns nil.
Execute body for every item in the iterable. Expecting side effects, returns nil.
(indexed-map-reduce num-iters indexed-map-fn)
(indexed-map-reduce num-iters indexed-map-fn reduce-fn)
Given a function that takes exactly 2 arguments, a start-index and a length, call this function exactly N times where N is ForkJoinPool/getCommonPoolParallelism. Indexes will be split as evenly as possible among the invocations. Uses ForkJoinPool/commonPool for parallelism. The entire list of results (outputs of indexed-map-fn) are passed to reduce-fn; reduce-fn is called once. When called with 2 arguments the reduction function is dorun
Given a function that takes exactly 2 arguments, a start-index and a length, call this function exactly N times where N is ForkJoinPool/getCommonPoolParallelism. Indexes will be split as evenly as possible among the invocations. Uses ForkJoinPool/commonPool for parallelism. The entire list of results (outputs of indexed-map-fn) are passed to reduce-fn; reduce-fn is called once. When called with 2 arguments the reduction function is dorun
(indexed-pmap indexed-pmap-fn num-iters)
(indexed-pmap indexed-pmap-fn num-iters concat-fn)
Legacy function; really just indexed-map-reduce where the default reducer is #(apply concat %).
Legacy function; really just indexed-map-reduce where the default reducer is #(apply concat %).
(launch-parallel-for num-iters indexed-map-fn)
(launch-parallel-for num-iters indexed-map-fn reduce-fn)
Legacy name. See indexed-map-reduce
Legacy name. See indexed-map-reduce
(parallel-for idx-var num-iters & body)
Like clojure.core.matrix.macros c-for except this expects index that run from 0 -> num-iters. Idx is named idx-var and body will be called for each idx in parallel. Uses forkjoinpool's common pool for parallelism. Assumed to be side effecting; returns nil.
Like clojure.core.matrix.macros c-for except this expects index that run from 0 -> num-iters. Idx is named idx-var and body will be called for each idx in parallel. Uses forkjoinpool's common pool for parallelism. Assumed to be side effecting; returns nil.
(serial-for idx-var num-iters & body)
Utility to quickly switch between parallel/serial loop execution
Utility to quickly switch between parallel/serial loop execution
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close