gusucode.com > target工具箱matlab源码程序 > target/extensions/processor/intelhost/tfl/addmatrtranspentry.m
function addmatrtranspentry(hLib, par, implname, dtype, key, srcPath, incPath) %ADDMATRTRANSPENTRY - Adds Matrix Transpose entry to a TFL table for Intel IPP % Copyright 2010 The MathWorks, Inc. lbound = 3; e = IntelHostTFL.MatrOpEntry; e = locSetEntryParam(e, key, par, implname, srcPath, incPath); locEntry(hLib, e, dtype, [lbound lbound; inf inf], [lbound lbound; inf inf]); end % ------------------------------------------------------------------------- function locEntry( hLib, hEnt, dtype, outDims, inDims ) if isempty(hLib) || isempty( hEnt ) return; end hEnt.createAndAddConceptualArg('RTW.TflArgMatrix',... 'Name', 'y1', ... 'BaseType', dtype, ... 'IOType', 'RTW_IO_OUTPUT', ... 'DimRange', outDims); hEnt.createAndAddConceptualArg('RTW.TflArgMatrix',... 'Name', 'u1', 'BaseType', dtype, 'DimRange', inDims); % Specify replacement function Signature arg = hLib.getTflArgFromString('y2','void'); arg.IOType = 'RTW_IO_OUTPUT'; hEnt.Implementation.setReturn(arg); arg = hLib.getTflArgFromString('u1',[dtype '*']); hEnt.Implementation.addArgument(arg); arg = hLib.getTflArgFromString('u1width', 'integer', 0); arg.PassByType = 'RTW_PASSBY_AUTO'; arg.Type.ReadOnly = true; hEnt.Implementation.addArgument(arg); arg = hLib.getTflArgFromString('u1height', 'integer', 0); arg.PassByType = 'RTW_PASSBY_AUTO'; arg.Type.ReadOnly = true; hEnt.Implementation.addArgument(arg); arg = hLib.getTflArgFromString('y1', [dtype '*']); arg.IOType = 'RTW_IO_OUTPUT'; hEnt.Implementation.addArgument(arg); hLib.addEntry( hEnt ); end % ------------------------------------------------------------------------- function e = locSetEntryParam(e, key, par, implname, srcPath, incPath) e.setTflCOperationEntryParameters(... 'Key', key, ... 'Priority', 100, ... 'ImplementationName', implname, ... 'ImplementationHeaderFile', 'mw_ippm.h', ... 'ImplementationSourceFile', 'mw_ippm.c', ... 'ImplementationHeaderPath', incPath, ... 'ImplementationSourcePath', srcPath, ... 'AdditionalHeaderFiles', {'ipp.h'}, ... 'AdditionalIncludePaths', par.AdditionalIncludePaths, ... 'AdditionalLinkObjs', par.AdditionalLinkObjs, ... 'AdditionalLinkObjsPaths', par.AdditionalLinkObjsPaths, ... 'AdditionalLinkFlags', par.AdditionalLinkFlags, ... 'SideEffects', true, ... 'SaturationMode', 'RTW_SATURATE_UNSPECIFIED', ... 'RoundingMode', 'RTW_ROUND_UNSPECIFIED'); end % LocalWords: TFL IPP Tfl PASSBY mw ippm ipp Objs