Diff of /mex/comp_dgt_fb.c [7c7a96] .. [3deeb5]  Maximize  Restore

Switch to unified view

a/mex/comp_dgt_fb.c b/mex/comp_dgt_fb.c
...
...
11
#define MEX_FILE __BASE_FILE__
11
#define MEX_FILE __BASE_FILE__
12
#include "ltfat_mex_template_helper.h"
12
#include "ltfat_mex_template_helper.h"
13
13
14
#if defined(LTFAT_SINGLE) || defined(LTFAT_DOUBLE)
14
#if defined(LTFAT_SINGLE) || defined(LTFAT_DOUBLE)
15
#include "ltfat_types.h"
15
#include "ltfat_types.h"
16
/*
16
17
#if defined(LTFAT_DOUBLE) && !defined(LTFAT_COMPLEXTYPE)
18
static inline void LTFAT_NAME(fwd_dgt_fb)(const double *f, const double *g,
19
             const int L, const int gl,
20
             const int W,  const int a, const int M,
21
             double _Complex *cout)
22
{
23
   dgt_fb_r_d(f,g,L,gl,W,a,M,(double (*)[2])cout);
24
}
25
#elif defined(LTFAT_DOUBLE) && defined(LTFAT_COMPLEXTYPE)
26
static inline void LTFAT_NAME(fwd_dgt_fb)(const double _Complex *f, const double _Complex *g,
27
             const int L, const int gl,
28
             const int W,  const int a, const int M,
29
             double _Complex *cout)
30
{
31
   dgt_fb_d((const double (*)[2])f,(const double (*)[2])g,L,gl,W,a,M,(double (*)[2])cout);
32
}
33
#elif defined(LTFAT_SINGLE) && !defined(LTFAT_COMPLEXTYPE)
34
static inline void LTFAT_NAME(fwd_dgt_fb)(const float *f, const float *g,
35
             const int L, const int gl,
36
             const int W,  const int a, const int M,
37
             float _Complex *cout)
38
{
39
   dgt_fb_r_s(f,g,L,gl,W,a,M,(float (*)[2])cout);
40
}
41
#elif defined(LTFAT_SINGLE) && defined(LTFAT_COMPLEXTYPE)
42
static inline void LTFAT_NAME(fwd_dgt_fb)(const float _Complex *f, const float _Complex *g,
43
             const int L, const int gl,
44
             const int W,  const int a, const int M,
45
             float _Complex *cout)
46
{
47
   dgt_fb_s((const float (*)[2])f,(const float (*)[2])g,L,gl,W,a,M,(float (*)[2])cout);
48
}
49
#endif
50
*/
51
// Calling convention:
17
// Calling convention:
52
//  comp_dgt_fb(f,g,a,M);
18
//  comp_dgt_fb(f,g,a,M);
53
19
54
void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
20
void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
55
{
21
{
...
...
70
36
71
   mwSize dims[3] = {M, N, W};
37
   mwSize dims[3] = {M, N, W};
72
   plhs[0] = ltfatCreateNdimArray(ndim,dims,LTFAT_MX_CLASSID,mxCOMPLEX);
38
   plhs[0] = ltfatCreateNdimArray(ndim,dims,LTFAT_MX_CLASSID,mxCOMPLEX);
73
   const LTFAT_TYPE* f_combined = (const LTFAT_TYPE*) mxGetData(prhs[0]);
39
   const LTFAT_TYPE* f_combined = (const LTFAT_TYPE*) mxGetData(prhs[0]);
74
   const LTFAT_TYPE* g_combined = (const LTFAT_TYPE*) mxGetData(prhs[1]);
40
   const LTFAT_TYPE* g_combined = (const LTFAT_TYPE*) mxGetData(prhs[1]);
75
   LTFAT_REAL _Complex* out_combined = (LTFAT_REAL _Complex*) mxGetData(plhs[0]);
41
   LTFAT_COMPLEX* out_combined = (LTFAT_COMPLEX*) mxGetData(plhs[0]);
76
42
77
   // Can go away when dgt_fb works with double _Complex
78
   #if defined(LTFAT_COMPLEXTYPE)
79
   LTFAT_NAME(dgt_fb)((const LTFAT_REAL (*)[2])f_combined,
80
                      (const LTFAT_REAL (*)[2]) g_combined,
81
                      L,gl,W,a,M,(LTFAT_REAL (*)[2])out_combined);
82
   #else
83
   LTFAT_NAME(dgt_fb)(f_combined, g_combined,L,gl,W,a,M,(LTFAT_REAL (*)[2])out_combined);
43
   LTFAT_NAME(dgt_fb)(f_combined, g_combined,L,gl,W,a,M,out_combined);
84
   #endif
85
86
   return;
87
}
44
}
88
#endif
45
#endif
89
46
90
47
91
/*
48
/*

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks