Simulink.data.dictionary.setupWorkerCache
Enable parallel simulation with data dictionary
Description
Simulink.data.dictionary.setupWorkerCache
prepares
the workers in a parallel pool for simulating a model that is linked
to a data dictionary. Use this function in a spmd
(Parallel Computing Toolbox) block,
prior to starting a parfor
(Parallel Computing Toolbox) block,
to provide the workers in a parallel pool a way to safely interact
with a single data dictionary.
During parallel simulation of a model that is linked to a data
dictionary, you can allow each worker to access and modify the data
in the dictionary independently of other workers. Simulink.data.dictionary.setupWorkerCache
temporarily
provides each worker in the pool with its own data dictionary cache,
allowing the workers to use the data in the dictionary without permanently
changing it.
You must have a Parallel Computing Toolbox™ license to perform
parallel simulation using a parfor
(Parallel Computing Toolbox) block.
Examples
Version History
Introduced in R2015a
See Also
spmd
(Parallel Computing Toolbox) | parfor
(Parallel Computing Toolbox) | Simulink.data.dictionary.cleanupWorkerCache
Topics
- Store Data in Dictionary Programmatically
- What Is a Data Dictionary?
- Run Code on Parallel Pools (Parallel Computing Toolbox)