%ACCUMARRAY Construct a gpuArray array by accumulation.
%   A = ACCUMARRAY(SUBS,VAL)
%   A = ACCUMARRAY(SUBS,VAL,SZ)
%   A = ACCUMARRAY(SUBS,VAL,SZ,FUN)
%   A = ACCUMARRAY(SUBS,VAL,SZ,FUN,FILLVAL)
%   A = ACCUMARRAY(SUBS,VAL,SZ,FUN,FILLVAL,ISSPARSE)
%   
%   The following functions are supported for the FUN argument:
%       @sum [default]
%       @prod
%       @min
%       @max
%       @any
%       @all
%   
%   VAL and FILLVAL must be full floating point (double or single) or logical
%   arrays.
%   
%   Example:
%    
%       subs = [1 1; 2 1; 2 3; 2 1; 2 3];
%       A = accumarray(subs, gpuArray(101:105), [2 4], @sum, NaN)
%   
%   This examples reconstructs a sparse array using ACCUMARRAY:
%    
%       N = 1000;
%       Sin = gpuArray(sprand(N, N, 0.1));
%       [I, J, V] = find(Sin);
%       Sout = accumarray([I J], V, [N N], [], [], true);
%       isequal(Sin, Sout)   % Returns true
%   
%   See also ACCUMARRAY, GPUARRAY.
%   


%   Copyright 2013-2014 The MathWorks, Inc.
