Function
NumCosmoMathfunc_eval_threaded_loop_nw
Declaration [src]
void
ncm_func_eval_threaded_loop_nw (
NcmFuncEvalLoop lfunc,
glong i,
glong f,
gpointer data,
guint nworkers
)
Description [src]
Splits [i, f) into nworkers contiguous ranges, the first one also taking
the remainder, and calls lfunc with data on each range in the pool. Returns
after all calls finish. Uses at most f - i workers, and runs a single serial
call if the pool has zero threads. Requires f > i and nworkers > 0.
Parameters
lfunc-
Type:
NcmFuncEvalLoopLoop function.
i-
Type:
glongFirst index.
f-
Type:
glongOne past the last index.
data-
Type:
gpointerUser data.
The argument can be NULL.The data is owned by the caller of the function. nworkers-
Type:
guintNumber of workers.