function v = del2(varargin)
%DEL2 Discrete Laplacian.
%   L = DEL2(U)
%   L = DEL2(U,H)
%   L = DEL2(U,HX,HY)
%   L = DEL2(U,HX,HY,HZ,...)
%   
%   Example:
%   spmd
%       IM = codistributed(imread('street2.jpg')); % Load image
%       IM = mean(IM,3);     % Convert to grayscale
%       L = del2(IM);        % Find interest points
%       imagesc(L > 8);      % Show as image
%   end
%   
%   See also DEL2, CODISTRIBUTED, CODISTRIBUTED/GRADIENT, CODISTRIBUTED/DIFF.
%   


%   Copyright 2013-2019 The MathWorks, Inc.

% Only first input is allowed to be remote
if nargin > 1
    [varargin{2:end}] = gather(varargin{2:end});
end

% try...catch prevents error being reported by internal
try
    v = parallel.internal.flowthrough.del2(varargin{:});
catch ME
    throw(ME);
end
