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%>
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.)
12%>
13%> \return
14%> ``mexdirs`` : The output vector of MATLAB strings containing the **unique**
15%> directory path(s) to the ParaMonte library MEX shared files.<br>
16%> The output ``mexdirs`` will be an empty list
17%> if no such paths are found.<br>
18%>
19%> \interface{mexdir}
20%> \code{.m}
21%>
22%> mexdirs = pm.lib.path.mexdir()
23%> mexdirs = pm.lib.path.mexdir([])
24%> mexdirs = pm.lib.path.mexdir([], [])
25%> mexdirs = pm.lib.path.mexdir(mexname)
26%> mexdirs = pm.lib.path.mexdir([], config)
27%> mexdirs = pm.lib.path.mexdir(mexname, [])
28%> mexdirs = pm.lib.path.mexdir(mexname, config)
29%>
30%> \endcode
31%>
32%> \example{mexdir}
33%> \include{lineno} example/lib/path/mexdir/main.m
34%> \output{mexdir}
35%> \include{lineno} example/lib/path/mexdir/main.out.m
36%>
37%> \final{mexdir}
38%>
39%> \author
40%> \JoshuaOsborne, May 21 2024, 7:50 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 mexdirs = mexdir(mexname, config)
44 if nargin < 2
45 config = [];
46 end
47 if nargin < 1
48 mexname = [];
49 end
50 mexpaths = pm.lib.path.mex(mexname, config);
51 mexdirs = strings(length(mexpaths), 1);
52 for ipath = 1 : length(mexpaths)
53 [dirpath, ~, ~] = fileparts(mexpaths{ipath});
54 mexdirs(ipath) = string(dirpath);
55 end
56 mexdirs = unique(mexdirs);
57end
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared libraries.
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...