Mercurial > forge
changeset 5578:5829af0e8cca octave-forge
fix type for size values
author | schloegl |
---|---|
date | Tue, 05 May 2009 10:06:21 +0000 |
parents | 0dfe8a26b446 |
children | 2b00eae0b7d5 |
files | extra/NaN/src/sumskipnan_mex.cpp |
diffstat | 1 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/NaN/src/sumskipnan_mex.cpp Tue May 05 05:51:49 2009 +0000 +++ b/extra/NaN/src/sumskipnan_mex.cpp Tue May 05 10:06:21 2009 +0000 @@ -48,23 +48,22 @@ void mexFunction(int POutputCount, mxArray* POutput[], int PInputCount, const mxArray *PInputs[]) { - const int *SZ; + const mwSize *SZ; double* LInput; double* LOutputSum; double* LOutputCount; double* LOutputSum2; double x; - unsigned long LCount; + //unsigned long LCount; - unsigned DIM = 0; - size_t D1, D2, D3; // NN; // - unsigned ND, ND2; // number of dimensions: input, output - size_t ix0, ix1, ix2; // index to input and output - unsigned j, l; // running indices - int *SZ2; // size of output + mwSize DIM = 0; + mwSize D1, D2, D3; // NN; // + mwSize ND, ND2; // number of dimensions: input, output + mwSize ix0, ix1, ix2; // index to input and output + mwSize j, l; // running indices + mwSize *SZ2; // size of output char flag_isNaN = 0; - // check for proper number of input and output arguments if ((PInputCount <= 0) || (PInputCount > 3)) mexErrMsgTxt("SumSkipNan.MEX requires 1,2 or 3 arguments."); @@ -105,7 +104,7 @@ ND2 = (ND>DIM ? ND : DIM); // number of dimensions of output - SZ2 = (int*)mxCalloc(ND2, sizeof(int)); // allocate memory for output size + SZ2 = (mwSize*)mxCalloc(ND2, sizeof(int)); // allocate memory for output size for (j=0; j<ND; j++) // copy size of input; SZ2[j] = SZ[j];