| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Parallel Computing Toolbox |
| Contents | Index |
| Learn more about Parallel Computing Toolbox |
grid = codistributor2dbc.defaultLabGrid()
grid = codistributor2dbc.defaultLabGrid() returns a vector, grid = [nrow ncol], defining a computational grid of nrow-by-ncol labs in the open MATLAB pool, such that numlabs = nrow x ncol.
The grid defined by codistributor2dbc.defaultLabGrid is as close to a square as possible. The following rules define nrow and ncol:
If numlabs is a perfect square, nrow = ncol = sqrt(numlabs).
If numlabs is an odd power of 2, then nrow = nrol/2 = sqrt(numlabs/2).
nrow <= ncol.
If numlabs is a prime, nrow = 1, ncol = nmlabs.
nrow is the greatest integer less than or equal to sqrt(numlabs) for which ncol = numlabs/nrow is also an integer.
View the computational grid layout of the default distribution scheme for the open MATLAB pool.
spmd
grid = codistributor2dbc.defaultLabGrid
endcodistributed, codistributor2dbc, numlabs
![]() | codistributor2dbc | Composite | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |