Liking cljdoc? Tell your friends :D

tech.parallel.for


doitercljmacro

(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.
sourceraw docstring

indexed-map-reduceclj

(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
sourceraw docstring

indexed-pmapclj

(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 %).
sourceraw docstring

launch-parallel-forclj

(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
sourceraw docstring

parallel-forcljmacro

(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.
sourceraw docstring

serial-forcljmacro

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close