MWRAP(1)
π MWRAP π
okay bestie, welcome to the mwrap manual page β this is the MWRAP manpage, and yes it's a whole moment. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
mwrap β it's an Octave/MATLAB mex generator, no cap π
πΈ SYNOPSIS πΈ
mwrap [-mex outputmex] [-m output.m] [-c outputmex.c] [-mb] [-list]
[-catch] [-i8] [-c99complex] [-cppcomplex] [-gpu] infile1 infile2
...
like, that's the whole vibe. flags first, then as many input files as your heart desires π
π¦ DESCRIPTION π¦
okay so mwrap is an interface generation system, and it lives in the same spirit as SWIG or matwrap β iykyk. you hand it a set of augmented Octave/MATLAB script files, and it will generate a MEX gateway to the C/C++ function calls you want, plus .m function files to access that gateway. iconic behaviour honestly.
and here's the part that truly slays: the details of converting to and from Octave's or MATLAB's data structures, and of allocating and freeing temporary storage, are hidden from the user. not you doing that. never you. you're welcome bestie πβ¨
π OPTIONS π
-mexβ this one specifies the name of the MEX function that the generated functions will call. and ngl, this name will generally be the same as the prefix for the C/C++ output file name. keep them matching, it's giving coordinated π-mβ specifies the name of the Octave/MATLAB script to be generated.-cβ specifies the name of the C MEX file to be generated. heads up though: the MEX file may contain stubs corresponding to several different generated files. multitasking queen.-mbβ this one redirects Octave/MATLAB function output to files named in the input. in this mode, the processor will change Octave/MATLAB function output files whenever it encounters a line beginning with@. and the rules are, okay, listen:- if
@occurs alone on a line, the output will be turned off. - if the line begins with
@function, the line will be treated as the first line of a function, and the m-file name will be deduced from the function name π - otherwise, the characters after
@(up to the next set of white space) will be treated as a filename, andmwrapwill try to write to that file. periodt.
- if
-listβ prints to the standard output the names of all files that would be generated from redirect output by the-mbflag. a little sneak peek, we love a preview π-catchβ surrounds library calls in try/catch blocks in order to intercept C++ exceptions. safety first babes π-i8β convertsint,long,uint,ulongtypes toint64_t,uint64_t. this provides a convenient way to interface with-fdefault-integer-8and-i8flags used by Fortran compilers π§-c99complexβ uses the C99 complex floating point types as the defaultdcomplexandfcomplextypes.-cppcomplexβ uses the C++ complex floating point types as the defaultdcomplexandfcomplextypes.-gpuβ adds support code for MATLAB gpuArray. we're going to the GPU, bestie π₯
π AUTHORS π
mwrap is written by David Bindel and Zydrunas Gimbutas β legends, honestly π. and this manual page was written by Nicolas Bourdaud. thank you for your service π«Ά
and that's the whole page bestie!! this one's mwrap, version 2012, from the MWRAP(1) era β a vintage moment, we love to see it. go generate some gateways, you absolute icon πβ¨ππ¦πΈπ
π¦ where this page comes from
- ubuntu resolute: mwrap 1.3.2-1 Β· MIT
- ubuntu stonking: mwrap 1.3.5-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms