allocateJobs | R Documentation |
This function calculates an even splitting of a given number of tasks among a given number of workers (threads).
allocateJobs(nTasks, nWorkers)
nTasks |
number of tasks to be divided |
nWorkers |
number of workers |
Tasks are labeled consecutively 1,2,..., nTasks
. The tasks are split in contiguous blocks as evenly
as possible.
A list with one component per worker giving the task indices to be worked on by each worker. If there are more workers than tasks, the tasks for the extra workers are 0-length numeric vectors.
Peter Langfelder
allocateJobs(10, 3);
allocateJobs(2,4);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.