| Contents | Index |
C = codistributed.eye(n)
C = codistributed.eye(m, n)
C
= codistributed.eye([m, n])
C = eye(n, codist)
C = eye(m, n, codist)
C =
eye([m, n], codist)
C = codistributed.eye(n) creates an n-by-n codistributed identity matrix of underlying class double.
C = codistributed.eye(m, n) or C = codistributed.eye([m, n]) creates an m-by-n codistributed matrix of underlying class double with ones on the diagonal and zeros elsewhere.
Optional arguments to codistributed.eye must be specified after the required arguments, and in the following order:
classname — Specifies the class of the codistributed array C. Valid choices are the same as for the regular eye function: 'double' (the default), 'single', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', and 'uint64'.
codist — A codistributor object specifying the distribution scheme of the resulting array. If omitted, the array is distributed using the default distribution scheme. For information on constructing codistributor objects, see the reference pages for codistributor1d and codistributor2dbc.
'noCommunication' — Specifies that no interworker communication is to be performed when constructing the array, skipping some error checking steps.
C = eye(n, codist) is the same as C = codistributed.eye(n, codist). You can also use the optional arguments with this syntax. To use the default distribution scheme, specify a codistributor constructor without arguments. For example:
spmd
C = eye(8, codistributor1d());
endC = eye(m, n, codist) and C = eye([m, n], codist) are the same as C = codistributed.eye(m, n) and C = codistributed.eye([m, n]), respectively. You can also use the optional arguments with this syntax.
With four labs,
spmd(4)
C = codistributed.eye(1000);
endcreates a 1000-by-1000 codistributed double array C, distributed by its second dimension (columns). Each lab contains a 1000-by-250 local piece of C.
spmd(4)
codist = codistributor('1d', 2, 1:numlabs);
C = eye(10, 10, 'uint16', codist);
endcreates a 10-by-10 codistributed uint16 array D, distributed by its columns. Each lab contains a 10-by-labindex local piece of D.
codistributed.ones | codistributed.speye | codistributed.zeros | distributed.eye | eye

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 |