function res = istriu( A )
%ISTRIU  Determine whether a codistributed matrix is upper triangular.
%   ISTRIU(X)
%   
%   Example:
%   spmd
%      X = codistributed(triu(magic(1000)));
%      istriu(X)
%   end
%   
%   See also ISTRIU, TRIU, MAGIC, CODISTRIBUTED.
%   


%   Copyright 2014-2022 The MathWorks, Inc.

% This function works for single, double and logical
if isinteger( A )
    error(message('parallel:distributed:InvalidType','istriu',underlyingType(A)))
end

res = checkFillPattern( A, {'UpperTriangular', 'Diagonal', 'ZeroMatrix'} );

end
