| 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 |
res = gop(@F, x)
res = gop(@F, x, targetlab)
F | Function to operate across labs. |
x | Argument to function F, should be same variable on all labs, but can have different values. |
res | Variable to hold reduction result. |
targetlab | Lab to which reduction results are returned. |
res = gop(@F, x) is the reduction via the function F of the quantities x from each lab. The result is duplicated on all labs.
The function F(x,y) should accept two arguments of the same type and produce one result of that type, so it can be used iteratively, that is,
F(F(x1,x2),F(x3,x4))
The function F should be associative, that is,
F(F(x1, x2), x3) = F(x1, F(x2, x3))
res = gop(@F, x, targetlab) performs the reduction, and places the result into res on the lab indicated by targetlab. res is set to [] on all other labs.
Calculate the sum of all labs' value for x.
res = gop(@plus,x)
Find the maximum value of x among all the labs.
res = gop(@max,x)
Perform the horizontal concatenation of x from all labs.
res = gop(@horzcat,x)
Calculate the 2-norm of x from all labs.
res = gop(@(a1,a2)norm([a1 a2]),x)
![]() | globalIndices | gplus | ![]() |

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 |