'mwIndex' does not name a type
Mostrar comentarios más antiguos
Environment: Matlab R2017a/Windows 10/MinGW64 Compiler (C++)
When I run the following codes, I encounter some errors:
# include "math.h"
void CSR_VecMult_CaABC_double(
const int k, const int m, const double alpha,
const double *val, const mwIndex *indx,
const mwIndex *pntrb,
const double *b,
double *c)
{
double t;
const double *pval;
int i,j,jb,je;
pval = val;
for (i=0;i!=m;i++) {
t = 0;
jb = pntrb[i];
je = pntrb[i+1];
for (j=jb;j!=je;j++)
t += alpha * b[indx[j]] * (*pval++);
c[i] += t;
}
}
The warning is as follow:
>>mex -largeArrayDims a_times_b_cmplx.cpp
D:\Ncut_9\a_times_b_cmplx.cpp:52:43: error: 'mwIndex' does not name a type
const double *val, const mwIndex *indx,
^
D:\Ncut_9\a_times_b_cmplx.cpp:53:24: error: 'mwIndex' does not name a type
const mwIndex *pntrb,
Actually I've tried to use another compiler such as Visual C++, but more errors occurred. :-(
Respuestas (1)
Steven Lord
el 7 de Nov. de 2017
1 voto
Categorías
Más información sobre C MEX 文件应用程序 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!