2%> Return the vector of MATLAB strings containing the
3%> path(s) to the ParaMonte library MEX shared files.
5%> \param[in] mexname : The input scalar MATLAB
string containing
6%> the (partial)
name of a MEX file
name without MEX extension.<br>
7%> (**optional**. If missing, all detected paths will be returned.)
9%> \param[in] config : The input scalar (or vector of) MATLAB string(s) containing the
10%> (set of) keyword(s) to match in the identified MEX files paths.<br>
11%> (**optional**. If missing, all detected paths will be returned.)
14%> ``mexpaths`` : The output vector of MATLAB strings containing the
15%> path(s) to the ParaMonte library MEX shared files.<br>
16%> The output ``mexpaths`` will be an empty
list
17%>
if no such paths are found.<br>
22%> mexpaths = pm.lib.path.mex()
23%> mexpaths = pm.lib.path.mex([])
24%> mexpaths = pm.lib.path.mex([], [])
25%> mexpaths = pm.lib.path.mex(mexname)
26%> mexpaths = pm.lib.path.mex([], config)
27%> mexpaths = pm.lib.path.mex(mexname, [])
28%> mexpaths = pm.lib.path.mex(mexname, config)
33%> \include{lineno} example/
lib/path/
mex/main.m
35%> \include{lineno} example/
lib/path/
mex/main.out.m
40%> \JoshuaOsborne, May 21 2024, 7:41 PM, University of Texas at Arlington<br>
41%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
42%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
43function mexpaths =
mex(mexname, config)
51 pm.introspection.verify(config,
"string", 255,
"config");
52 %configList = strsplit(config,
":");
53 configList = string(config);
58 pm.introspection.verify(mexname,
"string", 1,
"mexname");
62 libdir = pm.lib.path.lib();
63 mexpaths = pm.sys.path.glob(fullfile(libdir,
"**" + mexname +
"*" + mexext));
64 if ~isempty(configList) && ~isempty(mexpaths)
65 libdirlen = length(libdir{1});
67 for i = 1 : length(mexpaths)
70 for j = 1 : length(configList)
72 if ~contains(path(libdirlen + 1 : end), key)
78 indices = [indices, i];
81 mexpaths = mexpaths(indices);
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
function lib()
Return a scalar MATLAB string containing the path to the lib directory of the ParaMonte library packa...
function mex(in mexname, in config)
Return the vector of MATLAB strings containing the path(s) to the ParaMonte library MEX shared files.