1% @brief MATLAB Coder script to generate MEX functions
for mam_
module.
3% This script generates MEX (MATLAB Executable) versions of MAM (Matrix
4% Analytic Methods) functions for improved performance.
6% Skipped functions (Coder-incompatible):
7% ldqbd, ldqbd_R, ldqbd_pi - cell array arguments
8% qbd_rg, qbd_mapmap1, qbd_raprap1 - cell array arguments
9% qbd_bmapbmap1 - cell array arguments
10% map_ccdf_derivative - cell/struct MAP argument
11% map_jointpdf_derivative - cell/struct MAP argument
12% map_m1ps_h_recursive - cell return values
13% map_m1ps_sojourn - function handle validators
14% map_m1ps_cdfrespt - function handles + nested functions
15% mmap_compress - struct/cell arguments
17% See also CODER, CODER.CONFIG, CODER.TYPEOF, CODEGEN.
19%% Create configuration object of class 'coder.CodeConfig'.
20cfg = coder.config('mex','ecoder',false);
21cfg.GenerateReport =
false;
22cfg.ReportPotentialDifferences =
false;
23cfg.GenCodeOnly =
false;
26scal_type = coder.typeof(0);
27mat_type = coder.typeof(0,[Inf Inf],[1 1]);
29%% ===== Group: QBD rate matrix computations =====
31% qbd_R(B, L, F, iter_max) -> R
32codegen -config cfg qbd_R -args {mat_type, mat_type, mat_type, scal_type}
34% qbd_R_logred(B, L, F, iter_max) -> R
35codegen -config cfg qbd_R_logred -args {mat_type, mat_type, mat_type, scal_type}
37%% ===== Group: MAP computations =====
39% map_compute_R(C, D, mu) -> R
40codegen -config cfg map_compute_R -args {mat_type, mat_type, scal_type}
42%% ===== Group: Delay-off setup =====
44% qbd_setupdelayoff - Skipped (uses APH/Distribution OOP
classes, QBD_CR, QBD_pi)
45% codegen -config cfg qbd_setupdelayoff -args {scal_type, scal_type, scal_type, scal_type, scal_type, scal_type}
47%% ===== Group: Feasibility check =====
49% mmdp_isfeasible(Q, R) ->
bool
50codegen -config cfg mmdp_isfeasible -args {mat_type, mat_type}