add core files
This commit is contained in:
130
Classes/cwt_emxAPI.cpp
Normal file
130
Classes/cwt_emxAPI.cpp
Normal file
@@ -0,0 +1,130 @@
|
||||
//
|
||||
// File: cwt_emxAPI.cpp
|
||||
//
|
||||
// MATLAB Coder version : 4.3
|
||||
// C/C++ source code generated on : 30-Mar-2020 11:59:32
|
||||
//
|
||||
|
||||
// Include Files
|
||||
#include "cwt_emxAPI.h"
|
||||
#include "cwt.h"
|
||||
#include "cwt_emxutil.h"
|
||||
#include "rt_nonfinite.h"
|
||||
#include <cstdlib>
|
||||
#include <string.h>
|
||||
|
||||
// Function Definitions
|
||||
|
||||
//
|
||||
// Arguments : int numDimensions
|
||||
// const int *size
|
||||
// Return Type : emxArray_real_T *
|
||||
//
|
||||
emxArray_real_T *emxCreateND_real_T(int numDimensions, const int *size)
|
||||
{
|
||||
emxArray_real_T *emx;
|
||||
int numEl;
|
||||
int i;
|
||||
emxInit_real_T(&emx, numDimensions);
|
||||
numEl = 1;
|
||||
for (i = 0; i < numDimensions; i++) {
|
||||
numEl *= size[i];
|
||||
emx->size[i] = size[i];
|
||||
}
|
||||
|
||||
emx->data = (double *)std::calloc(static_cast<unsigned int>(numEl), sizeof
|
||||
(double));
|
||||
emx->numDimensions = numDimensions;
|
||||
emx->allocatedSize = numEl;
|
||||
return emx;
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments : double *data
|
||||
// int numDimensions
|
||||
// const int *size
|
||||
// Return Type : emxArray_real_T *
|
||||
//
|
||||
emxArray_real_T *emxCreateWrapperND_real_T(double *data, int numDimensions,
|
||||
const int *size)
|
||||
{
|
||||
emxArray_real_T *emx;
|
||||
int numEl;
|
||||
int i;
|
||||
emxInit_real_T(&emx, numDimensions);
|
||||
numEl = 1;
|
||||
for (i = 0; i < numDimensions; i++) {
|
||||
numEl *= size[i];
|
||||
emx->size[i] = size[i];
|
||||
}
|
||||
|
||||
emx->data = data;
|
||||
emx->numDimensions = numDimensions;
|
||||
emx->allocatedSize = numEl;
|
||||
emx->canFreeData = false;
|
||||
return emx;
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments : double *data
|
||||
// int rows
|
||||
// int cols
|
||||
// Return Type : emxArray_real_T *
|
||||
//
|
||||
emxArray_real_T *emxCreateWrapper_real_T(double *data, int rows, int cols)
|
||||
{
|
||||
emxArray_real_T *emx;
|
||||
emxInit_real_T(&emx, 2);
|
||||
emx->size[0] = rows;
|
||||
emx->size[1] = cols;
|
||||
emx->data = data;
|
||||
emx->numDimensions = 2;
|
||||
emx->allocatedSize = rows * cols;
|
||||
emx->canFreeData = false;
|
||||
return emx;
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments : int rows
|
||||
// int cols
|
||||
// Return Type : emxArray_real_T *
|
||||
//
|
||||
emxArray_real_T *emxCreate_real_T(int rows, int cols)
|
||||
{
|
||||
emxArray_real_T *emx;
|
||||
int numEl;
|
||||
emxInit_real_T(&emx, 2);
|
||||
emx->size[0] = rows;
|
||||
numEl = rows * cols;
|
||||
emx->size[1] = cols;
|
||||
emx->data = (double *)std::calloc(static_cast<unsigned int>(numEl), sizeof
|
||||
(double));
|
||||
emx->numDimensions = 2;
|
||||
emx->allocatedSize = numEl;
|
||||
return emx;
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments : emxArray_real_T *emxArray
|
||||
// Return Type : void
|
||||
//
|
||||
void emxDestroyArray_real_T(emxArray_real_T *emxArray)
|
||||
{
|
||||
emxFree_real_T(&emxArray);
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments : emxArray_real_T **pEmxArray
|
||||
// int numDimensions
|
||||
// Return Type : void
|
||||
//
|
||||
void emxInitArray_real_T(emxArray_real_T **pEmxArray, int numDimensions)
|
||||
{
|
||||
emxInit_real_T(pEmxArray, numDimensions);
|
||||
}
|
||||
|
||||
//
|
||||
// File trailer for cwt_emxAPI.cpp
|
||||
//
|
||||
// [EOF]
|
||||
//
|
||||
Reference in New Issue
Block a user