Runtime

Parallel execution

The deliberately conservative first parfor subset.

01

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);
02

Restrictions

  • The range step must be 1 or -1.
  • Outputs must be preallocated matrices with a supported index pattern.
  • Temporary assignments must end with semicolons.
  • At least one output is required.
  • Effects, output reads, reductions, nested blocks, and user-function calls are rejected.
03

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.