function tf = isinparfor
%ISINPARFOR                      Private utility function for parallel

%ISINPARFOR   True inside the body of a PARFOR loop
%   TF = ISINPARFOR returns true inside the body of a PARFOR loop
%   and false otherwise.
%
%   Example:
%
%      a = isinparfor
%      parfor i = 1:spmdSize
%         b = isinparfor
%      end
%
%      returns a = false, b = true
%
%   See also PARFOR, SPMDSIZE.

%   Copyright 2006-2022 The MathWorks, Inc.

tf = parfor_depth > 0;
