function varargout = pchip(varargin)
%PCHIP overloaded for distributed arrays
%   YQ = PCHIP(X,Y,XQ)
%   PP = PCHIP(X,Y)
%   
%   Limitation:
%   Piecewise polynomial syntax (two input arguments) not supported.
%   
%   See also PCHIP, INTERP1, DISTRIBUTED.


%   Copyright 2020-2023 The MathWorks, Inc.

% PP form output is not supported.
if nargin == 2
    error(message("parallel:distributed:InterpPpFormNotSupported"));
end

% Flow through the standard MATLAB version on the codistributed array
varargout = cell( 1, max( nargout, 1 ) );
[varargout{:}] = distributedutil.distributedSpmdWrapper( @pchip, varargin{:} );
end
