Runtime

Parallel execution

The deliberately conservative first parfor subset.

01

EN / PT: Pure left division

EN: A\B and mldivide(A,B) are pure single-output expressions on dense real matrices. Store a temporary matrix result, then write indexed scalar elements to preallocated real outputs. No slices, loop-carried reductions, user-function calls, handles or MultiAssign are enabled. PT: A\B e mldivide(A,B) sao expressoes puras de uma saida para matrizes reais densas; guarde a matriz temporaria e escreva elementos escalares indexados em saidas reais prealocadas. Sem fatias, reducoes acumuladas, funcoes de usuario, handles ou MultiAssign.

02

Independent indexed writes

Sun
input = [2, 3, 4, 5];
output = [0, 0, 0, 0];
parfor index = 1:4
    squared = input(index) * input(index);
    output(index) = squared;
end
disp(output);
03

Restrictions

  • The range step must be 1 or -1.
  • Outputs must be preallocated real matrices with a supported index pattern.
  • Temporary assignments must end with semicolons.
  • At least one output is required.
  • Effects, random generation, reads from output matrices, loop-carried reductions, nested blocks and user-function calls are rejected.
  • Pure numerical reductions, reshape, size, length, find, any, sec and the new array operators are allowed as single-output expressions on supported local or snapshot inputs.
  • qr, lsqminnorm, rank, cond, svd and pinv are pure single-output calls on dense real matrices. They do not relax indexed-output or no-reduction rules; multiple assignment is forbidden. See Linear algebra / Algebra linear for PT/EN examples.
  • Multiple-target assignments are rejected, even for otherwise pure built-ins. Workers do not resolve external function files.
04

Execution model

Rayon workers stage scalar writes and commit only when all iterations succeed. Order is unspecified, inputs are snapshots, and native compilation is not supported.

05

EN / PT: Pure factorization calls

EN: lu and chol are pure single-output calls on dense real matrices. Only supported indexed writes to preallocated real outputs are allowed: no slices, reductions or MultiAssign. PT: lu e chol sao chamadas puras com uma saida, somente matrizes reais; escritas indexadas prealocadas, sem fatias, reducoes ou MultiAssign.

Sun is proprietary software under experimental development. Documentation scope: Sun 0.6 development snapshot.