%function FixPt_Accumulate(cLabel,cDT,bLabel,bDT,satMode,doAdd) Output
%if !FixPt_DataTypeIsFloat(cDT)
%<FixPt_FloatingPointNotSupported(bDT)>/
%if (bDT.Bias != 0) || ...
(cDT.RequiredBits != bDT.RequiredBits) || ...
(cDT.IsSigned != bDT.IsSigned ) || ...
!FixPt_FracSlopesSame(cDT.FracSlope, bDT.FracSlope ) || ...
(cDT.FixedExp != bDT.FixedExp )
%<LibReportFatalError("FixPt_Accumulate: Incompatible Input and Output Data Types.")>
%endif
%endif
%if doAdd
%assign opStr = "FixPtAdd"
%else
%assign opStr = "FixPtSubtract"
%endif
%<FixPt_WordLengthLimitationCheck(cDT)>/
%<FixPt_WordLengthLimitationCheck(bDT)>/
%assign vec = FixPt_BinaryOp(opStr, cLabel, cDT, cLabel, cDT, bLabel, bDT, ...
"Simplest", satMode)
%/
%endfunction
%function FixPt_AccumPos(cLabel,cDT,bLabel,bDT,satMode) Output
%<FixPt_Accumulate(cLabel,cDT,bLabel,bDT,satMode,1)>/
%endfunction
%function FixPt_AccumNeg(cLabel,cDT,bLabel,bDT,satMode) Output
%<FixPt_Accumulate(cLabel,cDT,bLabel,bDT,satMode,0)>/
%endfunction
%function FixPt_Accumulate_Easy(cLabel,cDT,bLabel,bDT,roundMode,satMode,doAdd) Output
%copyrecord cNoBiasDT cDT
%assign cNoBiasDT.Bias = 0.0
%assign castInLabel = "castIn_Accumulate"
%openfile gutsOfAdd
%assign castInWasUsed = 0
%assign retVecStr = FixPt_Fix2Fix(castInLabel,cNoBiasDT,...
bLabel, bDT,...
roundMode,satMode)
%if SIZE(retVecStr,1) == 3
%<FixPt_Accumulate(cLabel, cNoBiasDT,...
retVecStr[1],cNoBiasDT,...
satMode,doAdd)>/
%else
%assign castInWasUsed = 1
%<FixPt_Accumulate(cLabel, cNoBiasDT,...
castInLabel,cNoBiasDT,...
satMode,doAdd)>/
%endif
%closefile gutsOfAdd
%if castInWasUsed
{
%<cNoBiasDT.NativeType> %<castInLabel>;
%<gutsOfAdd>/
}
%else
%<gutsOfAdd>/
%endif
%endfunction
%function FixPt_AccumPos_Easy(cLabel,cDT,bLabel,bDT,roundMode,satMode) Output
%<FixPt_Accumulate_Easy(cLabel,cDT,bLabel,bDT,roundMode,satMode,1)>/
%endfunction
%function FixPt_AccumNeg_Easy(cLabel,cDT,bLabel,bDT,roundMode,satMode) Output
%<FixPt_Accumulate_Easy(cLabel,cDT,bLabel,bDT,roundMode,satMode,0)>/
%endfunction