%% sdspmax2_maxfcn.tlc %% %% TLC code generation file for DSP Blockset Maximum block (sdspmax2) %% %% Copyright (c) 1995-2000 The MathWorks, Inc. %% $Revision: 1.3 $ $Date: 2000/05/09 18:55:40 $ %% %% Abstract: %% Manages the max-computation function prototype, creation, and invocation. %include "sdspmax2_generic.tlc" %include "sdspmax2_argscache.tlc" %include "sdspmax2_maxfcn_body.tlc" %include "sdspmax2_maxinline_body.tlc" %% Function: getMaxFcnName =============================================== %% Abstract: %% %function getMaxFcnName(block) void %return "%" %endfunction %% getMaxFcnName %% Function: getMaxFcnProto =============================================== %% Abstract: %% Return the max function call prototype. %% Ex: %% "TMWDSP_MaxDVI(TMWDSP_MaxArgs *args)" %% %function getMaxFcnProto(block) void %return "void %(const % *args)" %endfunction %% getMaxFcnProto %% Function: GenerateMaxFcnComment ======================================== %% Abstract: %% %function GenerateMaxFcnComment(block) Output %% %\ %% %endfunction %% GenerateMaxFcnComment %% Function: GenerateMaxFcn ==================================================== %% Abstract: %% Render the max computation function and prototype. %% Only render each variation ONCE. %% Any additional calls are simply ignored. %function GenerateMaxFcn(block) void % %assign fcn_name = getMaxFcnName(block) %% Check info so that we do not define this function more than once: %if JustCreatedCompiledModelRecord(fcn_name) %assign fcn_proto = getMaxFcnProto(block) %% Cache the function prototype %% %openfile buffer %% %\ extern %; %closefile buffer % %% Cache the max function itself: %% %openfile buffer %\ extern % % %closefile buffer % %endif %endfunction %% GenerateMaxFcn %% Function: CallMaxFcn ==================================================== %% Abstract: %% Return a string that calls the proper max function with the %% associated instance argument structure. %% %% Also, generate the appropriate max function prototype, function body, %% and argument cache instance as necessary: %% %function CallMaxFcn(block) Output %% %% Generate the appropriate max function prototype, function body, %% and argument cache instance as necessary: %% %\ %% %(&%); %% %endfunction %% CallMaxFcn %% Function: GenerateMax ======================================== %% Abstract: %% Generates either INLINED or FUNCTION-CALL code. %% %function GenerateMax(block) Output %% %if InlineMaxInstance(block) % %else % %endif %% %endfunction %% GenerateMax %% [EOF] sdspmax2_maxfcn.tlc