A = gather(G)
| Parameter | Description |
|---|---|
| G | a gpuArray, or any host value. |
| Parameter | Description |
|---|---|
| A | a host array with the same values and underlying type. |
A = gather(G) copies the gpuArray G from the device back to the host workspace. The result is a single, logical or complex single array, matching the underlying type of G.
When G is already a host value, gather returns it unchanged.
G = gpuArray(single([1 2 3]));
A = gather(G + 1)
| Version | Description |
|---|---|
| 2.0.0 | initial version |