time | Calls | line |
---|
| | 1 | function x = gather( x )
|
| | 2 | %GATHER collect values into current workspace
|
| | 3 | % X = GATHER(A) when A is a codistributed array, X is a replicated array with
|
| | 4 | % all the data of the array on every lab. This would typically be executed
|
| | 5 | % inside SPMD statements, or in parallel jobs.
|
| | 6 | %
|
| | 7 | % X = GATHER(A) when A is a distributed array, X is an array in the local
|
| | 8 | % workspace with the data transferred from the multiple labs. This would
|
| | 9 | % typically be executed outside SPMD statements.
|
| | 10 | %
|
| | 11 | % X = GATHER(A) when A is a gpuArray, X is an array in the local workspace
|
| | 12 | % with the data transferred from the GPU device.
|
| | 13 | %
|
| | 14 | % If A is not one of the types mentioned above, then no operation is
|
| | 15 | % performed and X is the same as A.
|
| | 16 | %
|
| | 17 | % Example:
|
| | 18 | % % create a distributed array
|
| | 19 | % d = distributed(magic(5));
|
| | 20 | % % gather values back to the client
|
| | 21 | % x = gather(d);
|
| | 22 | % % a second gather is a no-op
|
| | 23 | % isequal(x, gather(x)) % returns true
|
| | 24 | %
|
| | 25 | % See also DISTRIBUTED, CODISTRIBUTED, GPUARRAY
|
| | 26 |
|
| | 27 | % Copyright 2006-2011 The MathWorks, Inc.
|
| | 28 |
|
< 0.01 | 3 | 29 | narginchk(1, 1);
|