function varargout = topkrows(varargin)
%TOPKROWS Top rows in sorted order
%   Y = TOPKROWS(X,K)
%   Y = TOPKROWS(X,K,COL)
%   Y = TOPKROWS(...,DIRECTION)
%   Y = TOPKROWS(...,'ComparisonMethod',C)
%   [Y,I] = TOPKROWS(...)
%   
%   Example:
%    
%       N = 1000;
%       D = gpuArray(magic(N))
%       m = topkrows(D,10)
%       m1 = topkrows(D,10,10)
%       m2 = topkrows(D,10,'ComparisonMethod','real')
%   
%   m, m1 and m2 are a set of K gpuArray row vectors.
%   
%   See also TOPKROWS, GPUARRAY, MAGIC.
%   


%   Copyright 2018 The MathWorks, Inc.

try
    [varargout{1:nargout}] = parallel.internal.flowthrough.topkrows(varargin{:});
catch ME
    throw(ME);
end

end