function varargout = pdist2(varargin)
%PDIST2 Pairwise distance between two sets of observations.
%   D = PDIST2(X, Y)
%   D = PDIST2(X, Y, DISTANCE)
%   D = PDIST2(X, Y, DISTANCE, 'Smallest', K)
%   D = PDIST2(X, Y, DISTANCE, 'Largest', K)
%   [D,I] = PDIST2(X, Y, DISTANCE, 'Smallest', K)
%   [D,I] = PDIST2(X, Y, DISTANCE, 'Largest', K)
%
%   The 'DISTANCE' argument must be a string.
%
%   Example:
%      % Compute the ordinary Euclidean distance
%      X = gpuArray.randn(100, 5);
%      Y = gpuArray.randn(25, 5);
%      D = pdist2(X, Y, 'euclidean');         % euclidean distance
%
%   See also pdist2, gpuArray.

%   Copyright 2015-2022 The MathWorks, Inc.
[varargout{1:nargout}] = statslib.gpu.pdist2(varargin{:});