1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-17 07:11:52 +08:00
Files
CMake/Tests/FindMatlab/matlab_wrapper2.cpp
Kitware Robot 0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00

23 lines
735 B
C++

// simple workaround to some compiler specific problems
// see
// http://stackoverflow.com/questions/22367516/mex-compile-error-unknown-type-name-char16-t/23281916#23281916
#include <algorithm>
#include "mex.h"
// This test uses the new complex-interleaved C API (R2018a and newer)
// The input should be a complex array (scalar is OK). It returns the number of
// bytes in a matrix element. For the old (R2017b) API, this is 8. For the new
// (R2018a) API, this is 16.
void mexFunction(int const nlhs, mxArray* plhs[], int const nrhs,
mxArray const* prhs[])
{
if (nrhs != 1 || !mxIsComplex(prhs[0])) {
mexErrMsgTxt("Incorrect arguments");
}
plhs[0] = mxCreateDoubleScalar(mxGetElementSize(prhs[0]));
}