[ba1662]: mex / comp_dwiltiii.c  Maximize  Restore  History

Download this file

53 lines (41 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef _LTFAT_MEX_FILE
#define _LTFAT_MEX_FILE
#define ISNARGINEQ 3
#define TYPEDEPARGS 0, 1
#define SINGLEARGS
#define COMPLEXINDEPENDENT
#endif /* _LTFAT_MEX_FILE */
#define MEX_FILE __BASE_FILE__
#include "ltfat_mex_template_helper.h"
#if defined(LTFAT_SINGLE) || defined(LTFAT_DOUBLE)
#include "ltfat_types.h"
// Calling convention:
// comp_dwiltiii(f,g,M);
void
LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[] )
{
mwSignedIndex M, N, L, gl, W;
// Get matrix dimensions.
M=(mwSignedIndex)mxGetScalar(prhs[2]);
L=(mwSignedIndex)mxGetM(prhs[0]);
gl=(mwSignedIndex) mxGetM(prhs[1]);
W = mxGetN(prhs[0]);
N=L/M;
mwSize dims[]= {M, N, W};
mwSize ndim = W>1?3:2;
plhs[0] = ltfatCreateNdimArray(ndim,dims,
LTFAT_MX_CLASSID,LTFAT_MX_COMPLEXITY);
const LTFAT_TYPE* f = mxGetData(prhs[0]);
const LTFAT_TYPE* g = mxGetData(prhs[1]);
LTFAT_TYPE* cout = mxGetData(plhs[0]);
if(gl<L)
{
LTFAT_NAME(dwiltiii_fb)(f,g,L,gl, W, M, cout);
}
else
{
LTFAT_NAME(dwiltiii_long)(f,g,L,W,M,cout);
}
}
#endif /* LTFAT_SINGLE or LTFAT_DOUBLE */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks