FUNCTION REFERENCE

parfeval

Run a function on the pool; runs at once in MatRust.

Run a function on the pool; runs at once in MatRust.

Syntax

F = parfeval(fcn, n, x1, ..., xm)

Syntax

F = parfeval(pool, fcn, n, x1, ..., xm)

Calls fcn with the inputs and n outputs immediately and returns a parallel.FevalFuture whose State is 'finished'. An error in fcn is kept in F.Error and raised by fetchOutputs. Futures concatenate with [F1 F2] for fetchNext.

Example

F = parfeval(@(x) 2*x, 1, 21); y = fetchOutputs(F);   % y = 42

Differences from MATLAB: Runs serially in MatRust, at the call. Indexed assignment F(k) = parfeval(...) is not supported yet; build arrays with [F1 F2]. Multiple outputs of builtins need a user function or anonymous wrapper.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.