FUNCTION REFERENCE
spmd
Single program, multiple data block; runs serially in MatRust.
Single program, multiple data block; runs serially in MatRust.
Syntax
spmd, statements, endSyntax
spmd (n), statements, endThe body runs once, on the client, with spmdIndex and spmdSize both 1. Worker counts in parentheses are evaluated and ignored. Variables set in the body are ordinary variables after the block.
Example
spmd, r = spmdIndex * 10; end % r = 10Differences from MATLAB: Runs serially in MatRust. Variables are not Composite objects, so r{1} indexing does not work on them.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.