function varargout = mink(varargin)
%MINK Find K smallest elements of gpuArray
%   Y = MINK(X,K)
%   Y = MINK(X,K,DIM)
%   Y = MINK(...,'ComparisonMethod',C)
%   [Y,I] = MINK(...)
%   
%   Example:
%    
%       N = 1000;
%       D = gpuArray(magic(N))
%       m = mink(D,10)
%       m1 = mink(D,10,1)
%       m2 = min(D,10,2,'ComparisonMethod','real')
%   
%   m and m1 are a set of K gpuArray row vectors, m2 is a set of K gpuArray  
%   column vectors.
%   
%   See also MINK, GPUARRAY, MAGIC.
%   


%   Copyright 2018 The MathWorks, Inc.

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

end