MapReducer
Define execution environment for mapreduce or tall arrays
Syntax
Description
MapReducer
, with no arguments, sets the global execution environment to be the default: a parallel pool if you have Parallel Computing Toolbox™ available, or else the local MATLAB®会议。MapReducer
is a configuration function that changes how MATLAB executesMapReduce
algorithms and tall array calculations. Use this function to set, change, or store the execution environment to leverage Parallel Computing Toolbox,MATLAB Parallel Server™, orMATLAB Compiler™。如果安装了并行计算工具箱,则使用tall
或者MapReduce
功能MATLAB会自动启动并行的工人池(除非您更改了默认的首选项)。
Note
If no toolboxes are available, thenMapReduce
algorithms and tall array calculations automatically run using the local MATLAB session, and it is unnecessary to specify configuration settings usingMapReducer
使用这些功能。但是,如果您具有并行计算工具箱,MATLAB Parallel Server, orMATLAB Compiler, then additionalMapReducer
configuration options are available for running in parallel or deployed environments.
For more information, seeMapReducer
(Parallel Computing Toolbox)在里面Parallel Computing Toolbox documentation, orMapReducer
(MATLAB Compiler)在里面MATLAB Compiler文档。
MapReducer(0)
sets the global execution environment to be the local MATLAB session.
MapReducer(
sets the global execution environment using a previously created MapReducer object,先生
)先生
。
also returns a MapReducer object using any of the previous syntaxes. You can use先生
= mapreducer(___)先生
as a fourth input argument toMapReduce
when you want to explicitly specify the execution environment.
toggles the visibility of MapReducer object先生
= mapreducer(___,'ObjectVisibility','Off')先生
。Use this syntax to create new MapReducer objects without affecting the global execution environment.
Examples
Output Arguments
Tips
When working with tall arrays, use
MapReducer
to set the execution environment prior to creating the tall array with高(DS)
。Tall arrays are bound to the current global execution environment when they are constructed. If the global execution environment is subsequently changed, then the tall array becomes invalid and must be reconstructed.