ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
mexdir.m
Go to the documentation of this file.
1%> \brief
2%> Return the vector of MATLAB strings containing the directory
3%> path(s) containing the specified ParaMonte library MEX shared file.<br>
4%>
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.)
8%> \param[in] config : The input scalar (or vector of) MATLAB string(s) containing the
9%> (set of) keyword(s) to match in the identified MEX files paths.<br>
10%> (**optional**. If missing, all detected paths will be returned.)
11%>
12%> \return
13%> ``mexdirs`` : The output vector of MATLAB strings containing the **unique**
14%> directory path(s) to the ParaMonte library MEX shared files.<br>
15%> The output ``mexdirs`` will be an empty list
16%> if no such paths are found.<br>
17%>
18%> \interface{mexdir}
19%> \code{.m}
20%>
21%> mexdirs = pm.lib.path.mexdir()
22%> mexdirs = pm.lib.path.mexdir([])
23%> mexdirs = pm.lib.path.mexdir([], [])
24%> mexdirs = pm.lib.path.mexdir(mexname)
25%> mexdirs = pm.lib.path.mexdir([], config)
26%> mexdirs = pm.lib.path.mexdir(mexname, [])
27%> mexdirs = pm.lib.path.mexdir(mexname, config)
28%>
29%> \endcode
30%>
31%> \example{mexdir}
32%> \include{lineno} example/lib/path/mexdir/main.m
33%> \output{mexdir}
34%> \include{lineno} example/lib/path/mexdir/main.out.m
35%>
36%> \final{mexdir}
37%>
38%> \author
39%> \JoshuaOsborne, May 21 2024, 7:50 PM, University of Texas at Arlington<br>
40%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
41%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
42function mexdirs = mexdir(mexname, config)
43 if nargin < 2
44 config = [];
45 end
46 if nargin < 1
47 mexname = [];
48 end
49 mexpaths = pm.lib.path.mex(mexname, config);
50 mexdirs = strings(length(mexpaths), 1);
51 for ipath = 1 : length(mexpaths)
52 [dirpath, ~, ~] = fileparts(mexpaths{ipath});
53 mexdirs(ipath) = string(dirpath);
54 end
55 mexdirs = unique(mexdirs);
56end
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 mexdir(in mexname, in config)
Return the vector of MATLAB strings containing the directory path(s) containing the specified ParaMon...