Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[7c7a96]: mex / comp_dgt_ola.c Maximize Restore History

Download this file

comp_dgt_ola.c    58 lines (44 with data), 1.4 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
53
54
55
56
57
#ifndef _LTFAT_MEX_FILE
#define _LTFAT_MEX_FILE
#define ISNARGINEQ 5
#define TYPEDEPARGS 0, 1
#define SINGLEARGS
#define COMPLEXARGS
#endif // _LTFAT_MEX_FILE - INCLUDED ONCE
#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_dgt_ola(f,g,a,M,bl);
void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
{
int L, gl,W, a, M, N, bl;
mwSize ndim;
mwSize dims[3];
// Get matrix dimensions.
L = mxGetM(prhs[0]);
W = mxGetN(prhs[0]);
gl = mxGetM(prhs[1]);
a=(int)mxGetScalar(prhs[2]);
M=(int)mxGetScalar(prhs[3]);
bl=(int)mxGetScalar(prhs[4]);
N=L/a;
dims[0]=M;
dims[1]=N;
dims[2]=W;
ndim=3;
if (W==1)
{
ndim=2;
}
plhs[0] = ltfatCreateNdimArray(ndim,dims,LTFAT_MX_CLASSID,mxCOMPLEX);
const LTFAT_REAL _Complex* f_combined = (const LTFAT_REAL _Complex*) mxGetData(prhs[0]);
const LTFAT_REAL _Complex* g_combined = (const LTFAT_REAL _Complex*) mxGetData(prhs[1]);
LTFAT_REAL _Complex* out_combined = (LTFAT_REAL _Complex*) mxGetData(plhs[0]);
LTFAT_NAME(dgt_ola)((const LTFAT_REAL (*)[2])f_combined,
(const LTFAT_REAL (*)[2])g_combined,
L,gl,W,a,M,bl,(LTFAT_REAL (*)[2])out_combined);
return;
}
#endif