⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lmdap_library_ncs_sfun.c

📁 m files for SIAM book, Numerical Computing with MATLAB
💻 C
字号:
/* Include files */
#include "LMdap_Library_NCS_sfun.h"
#include "c5_LMdap_Library_NCS.h"
#include "c6_LMdap_Library_NCS.h"

/* Type Definitions */

/* Named Constants */

/* Variable Declarations */

/* Variable Definitions */
uint32_T _LMdap_Library_NCSMachineNumber_;

/* Function Declarations */

/* Function Definitions */
void LMdap_Library_NCS_initializer(void)
{
  _sfEvent_ = CALL_EVENT;
}

void LMdap_Library_NCS_terminator(void)
{
}

/* SFunction Glue Code */
unsigned int sf_LMdap_Library_NCS_method_dispatcher(SimStruct *simstructPtr,
 unsigned int chartFileNumber, int_T method, void *data)
{
  if(chartFileNumber==5) {
    c5_LMdap_Library_NCS_method_dispatcher(simstructPtr, method, data);
    return 1;
  }
  if(chartFileNumber==6) {
    c6_LMdap_Library_NCS_method_dispatcher(simstructPtr, method, data);
    return 1;
  }
  return 0;
}
unsigned int sf_LMdap_Library_NCS_process_check_sum_call( int nlhs, mxArray *
 plhs[], int nrhs, const mxArray * prhs[] )
{
#ifdef MATLAB_MEX_FILE
  char commandName[20];
  if (nrhs<1 || !mxIsChar(prhs[0]) ) return 0;
  /* Possible call to get the checksum */
  mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
  commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
  if(strcmp(commandName,"sf_get_check_sum")) return 0;
  plhs[0] = mxCreateDoubleMatrix( 1,4,mxREAL);
  if(nrhs>2 && mxIsChar(prhs[1])) {
    mxGetString(prhs[1], commandName,sizeof(commandName)/sizeof(char));
    commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
    if(!strcmp(commandName,"library")) {
      char machineName[100];
      mxGetString(prhs[2], machineName,sizeof(machineName)/sizeof(char));
      machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0';
      if(!strcmp(machineName,"LMdap_Library_NCS")){
        ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(897878503U);
        ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(809904444U);
        ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2573538671U);
        ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(1011519919U);
      }else{
        return 0;
      }
    }
  }else {
    return 0;
  }

  return 1;
#else
  return 0;
#endif
}

unsigned int sf_LMdap_Library_NCS_autoinheritance_info( int nlhs, mxArray *
 plhs[], int nrhs, const mxArray * prhs[] )
{
#ifdef MATLAB_MEX_FILE
  char commandName[32];
  if (nrhs<2 || !mxIsChar(prhs[0]) ) return 0;
  /* Possible call to get the autoinheritance_info */
  mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
  commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
  if(strcmp(commandName,"get_autoinheritance_info")) return 0;
  {
    unsigned int chartFileNumber;
    chartFileNumber = (unsigned int)mxGetScalar(prhs[1]);
    switch(chartFileNumber) {
     case 5:
      {
        extern mxArray *sf_c5_LMdap_Library_NCS_get_autoinheritance_info(void);
        plhs[0] = sf_c5_LMdap_Library_NCS_get_autoinheritance_info();
        break;
      }

     case 6:
      {
        extern mxArray *sf_c6_LMdap_Library_NCS_get_autoinheritance_info(void);
        plhs[0] = sf_c6_LMdap_Library_NCS_get_autoinheritance_info();
        break;
      }

     default:
      plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
    }
  }
  return 1;
#else
  return 0;
#endif
}
unsigned int sf_LMdap_Library_NCS_get_eml_resolved_functions_info( int nlhs,
 mxArray * plhs[], int nrhs, const mxArray * prhs[] )
{
#ifdef MATLAB_MEX_FILE
  char commandName[64];
  if (nrhs<2 || !mxIsChar(prhs[0])) return 0;
  /* Possible call to get the get_eml_resolved_functions_info */
  mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
  commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
  if(strcmp(commandName,"get_eml_resolved_functions_info")) return 0;
  {
    unsigned int chartFileNumber;
    chartFileNumber = (unsigned int)mxGetScalar(prhs[1]);
    switch(chartFileNumber) {
     case 5:
      {
        extern const mxArray
        *sf_c5_LMdap_Library_NCS_get_eml_resolved_functions_info(void);
        mxArray *persistentMxArray = (mxArray
          *)sf_c5_LMdap_Library_NCS_get_eml_resolved_functions_info();
        plhs[0] = mxDuplicateArray(persistentMxArray);
        mxDestroyArray(persistentMxArray);
        break;
      }

     case 6:
      {
        extern const mxArray
        *sf_c6_LMdap_Library_NCS_get_eml_resolved_functions_info(void);
        mxArray *persistentMxArray = (mxArray
          *)sf_c6_LMdap_Library_NCS_get_eml_resolved_functions_info();
        plhs[0] = mxDuplicateArray(persistentMxArray);
        mxDestroyArray(persistentMxArray);
        break;
      }

     default:
      plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
    }
  }
  return 1;
#else
  return 0;
#endif
}
void LMdap_Library_NCS_debug_initialize(void)
{
  _LMdap_Library_NCSMachineNumber_ =
    sf_debug_initialize_machine("LMdap_Library_NCS","sfun",1,2,0,0,0);
  sf_debug_set_machine_event_thresholds(_LMdap_Library_NCSMachineNumber_,0,0);
  sf_debug_set_machine_data_thresholds(_LMdap_Library_NCSMachineNumber_,0);
}

void LMdap_Library_NCS_register_exported_symbols(SimStruct* S)
{
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -