| Contents | Index |
The JobData property holds data that eventually gets stored in the local memory of the worker machines, so that it does not have to be passed to the worker for each task in a job that the worker evaluates. Passing the data only once per job to each worker is more efficient than passing data with each task.
Note, that to access the data contained in a job's JobData property, the worker session evaluating the task needs to have access to the job, which it gets from a call to the function getCurrentJob, as discussed in the example below.
Usage | Job object |
Read-only | After job is submitted |
Data type | Any type |
JobData is an empty vector by default.
Create job1 and set its JobData property value to the contents of array1.
job1 = createJob(jm)
set(job1, 'JobData', array1)
createTask(job1, @myfunction, 1, {task_data})
Now the contents of array1 are available to all the tasks in the job. Because the job itself must be accessible to the tasks, myfunction must include a call to the function getCurrentJob. That is, the task function myfunction needs to call getCurrentJob to get the job object through which it can get the JobData property. So myfunction should contain lines like the following:
cj = getCurrentJob array1 = get(cj, 'JobData')

See how to solve large problems with minimal effort and reduce simulation time.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |