• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LTFAT_NAME函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LTFAT_NAME函数的典型用法代码示例。如果您正苦于以下问题:C++ LTFAT_NAME函数的具体用法?C++ LTFAT_NAME怎么用?C++ LTFAT_NAME使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LTFAT_NAME函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int UNUSED(nlhs), mxArray *plhs[],
                              int UNUSED(nrhs), const mxArray *prhs[] )
{
   int M, N, L, gl, W;

   // Get matrix dimensions.
   M= mxGetM(prhs[0]);
   N= ltfatGetN(prhs[0]);
   gl= mxGetNumberOfElements(prhs[1]);
   W = mxGetNumberOfElements(prhs[0])/(M*N);

   L=N*M;

   plhs[0] = ltfatCreateMatrix(L,W,LTFAT_MX_CLASSID,LTFAT_MX_COMPLEXITY);

   const LTFAT_TYPE* c = (const LTFAT_TYPE*) mxGetData(prhs[0]);
   const LTFAT_TYPE* g = (const LTFAT_TYPE*) mxGetData(prhs[1]);
   LTFAT_TYPE* f = (LTFAT_TYPE*) mxGetData(plhs[0]);

   if(gl<L)
   {
      LTFAT_NAME(idwiltiii_fb)(c,g,L,gl,W,M,f);
   }
   else
   {
      LTFAT_NAME(idwiltiii_long)(c,g,L,W,M,f);
   }
}
开发者ID:ltfat,项目名称:ltfat,代码行数:28,代码来源:comp_idwiltiii.c


示例2: LTFAT_NAME

void LTFAT_NAME(fftrealAtExit)()
{
   if(LTFAT_NAME(p_old)!=0)
   {
     LTFAT_FFTW(destroy_plan)(LTFAT_NAME(p_old));
   }
}
开发者ID:jsloboda,项目名称:GhostVision,代码行数:7,代码来源:comp_fftreal.c


示例3: LTFAT_NAME

static void LTFAT_NAME(dctMexAtExitFnc)()
{
    if (LTFAT_NAME(p_old) != 0)
    {
        LTFAT_FFTW(destroy_plan)(LTFAT_NAME(p_old));
    }
}
开发者ID:Steve3nto,项目名称:NoiseReductionProject,代码行数:7,代码来源:comp_dct.c


示例4: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
{
   // UGLY, but there are no cd_dwilt_long cs_dwilt_long functions
   // Other option is to use forwarder functions
   #undef LTFAT_NAME
   #ifdef LTFAT_SINGLE
   #  define LTFAT_NAME(name) LTFAT_NAME_SINGLE(name)
   #else
   #  define LTFAT_NAME(name) LTFAT_NAME_DOUBLE(name)
   #endif

   int M, N, L, W;

   mwSize ndim;
   mwSize dims[3];

   // Get matrix dimensions.
   M=(int)mxGetScalar(prhs[2]);
   L=(int)mxGetScalar(prhs[3]);
   W = mxGetN(prhs[0]);

   N=L/M;

   dims[0]=2*M;
   dims[1]=N/2;

   if (W==1)
   {
      ndim=2;
   }
   else
   {
      ndim=3;
      dims[2]=W;
   }

   plhs[0] = ltfatCreateNdimArray(ndim,dims,LTFAT_MX_CLASSID,LTFAT_MX_COMPLEXITY);

   const LTFAT_TYPE* f = (const LTFAT_TYPE*) mxGetData(prhs[0]);
   const LTFAT_TYPE* g = (const LTFAT_TYPE*) mxGetData(prhs[1]);
   LTFAT_TYPE* cout = (LTFAT_TYPE*) mxGetData(plhs[0]);


   #ifdef LTFAT_COMPLEXTYPE
      LTFAT_NAME(dwilt_long)((const LTFAT_REAL (*)[2])f,
                             (const LTFAT_REAL (*)[2])g,
                              L, W, M,
                             (LTFAT_REAL (*)[2]) cout);
   #else
      LTFAT_NAME(dwiltreal_long)(f,g,L, W, M, cout);
   #endif


   return;
}
开发者ID:LarocheC,项目名称:voice-extraction,代码行数:55,代码来源:comp_dwilt_long.c


示例5: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int UNUSED(nlhs), mxArray* plhs[],
                              int UNUSED(nrhs), const mxArray* prhs[] )
{
    // Get inputs
    const mxArray* mxs  = prhs[0];
    const LTFAT_REAL* s     = mxGetData(mxs);
    const LTFAT_REAL* tgrad = mxGetData(prhs[1]);
    const LTFAT_REAL* fgrad = mxGetData(prhs[2]);
    const double* maskDouble  = mxGetData(prhs[3]);
    mwSize a      = (mwSize)mxGetScalar(prhs[4]);
    LTFAT_REAL tol = (LTFAT_REAL)mxGetScalar(prhs[6]);
    const LTFAT_REAL* knownphase = mxGetData(prhs[8]);
    int phasetype = (int)mxGetScalar(prhs[7]);
    switch (phasetype)
    {
        case 0: phasetype = LTFAT_FREQINV; break;
        case 1: phasetype = LTFAT_TIMEINV; break;
    }

    // Get matrix dimensions.
    mwSize M = (int) mxGetScalar(prhs[5]);
    mwSize M2 = mxGetM(prhs[0]);
    mwSize N = ltfatGetN(prhs[0]);
    mwSize L = N * a;
    mwSize W = 1;

    if (mxGetNumberOfDimensions(mxs) > 2)
        W = mxGetDimensions(mxs)[2];

    int* mask = ltfat_malloc(M2 * N * W * sizeof * mask);

    for (mwSize w = 0; w < M2 * N * W; w++ )
        mask[w] = (int) maskDouble[w];

    // Create output matrix and zero it.
    plhs[0] = ltfatCreateNdimArray(mxGetNumberOfDimensions(mxs),
                                   mxGetDimensions(mxs),
                                   LTFAT_MX_CLASSID, mxREAL);

    // Get pointer to output
    LTFAT_REAL* phase = mxGetData(plhs[0]);

    memcpy(phase, knownphase, M2 * N * W * sizeof * phase);

    if (phasetype == 2)
        LTFAT_NAME(maskedheapintreal)(s, tgrad, fgrad, mask, a, M, L, W, tol,
                                      phase );
    else
        LTFAT_NAME(maskedheapintreal_relgrad)(s, tgrad, fgrad, mask, a, M, L, W,
                                              tol, phasetype, phase );

    ltfat_free(mask);
}
开发者ID:ltfat,项目名称:ltfat,代码行数:53,代码来源:comp_maskedheapintreal.c


示例6: main

int main( int argc, char *argv[] )
{
   if (argc<3)
   {
      printf("Correct parameters: L, K, nrep\n");     
      return(1);
   }
   int nrep = 1;
   if (argc>3)
   {
     nrep = atoi(argv[3]);
   }
   
   const size_t L = atoi(argv[1]);
   const size_t K = atoi(argv[2]);
   
   LTFAT_REAL *f = (LTFAT_REAL*)ltfat_malloc(L*sizeof(LTFAT_REAL));
   LTFAT_COMPLEXH *c = (LTFAT_COMPLEXH*)ltfat_malloc(K*sizeof(LTFAT_COMPLEXH));

   LTFAT_NAME_COMPLEX(fillRand)(f,L);
   
 
   double o = 0.1;
   double deltao = 2.0*PI/100.0;


   double st0,st1;
   #ifndef CZT_WITH_PLAN
   st0=ltfat_time();
   for (int jj=0;jj<nrep;jj++)
   {
      LTFAT_NAME(chzt)(f,L,1,K,deltao,o,c);
   }
   st1=ltfat_time();
   #else
   LTFAT_NAME(chzt_plan) p = LTFAT_NAME(create_chzt_plan)(K,L);
   st0=ltfat_time();
   for (int jj=0;jj<nrep;jj++)
   {
      LTFAT_NAME(chzt_with_plan)(p,f,1,deltao,o,c);
   }
   st1=ltfat_time();
   LTFAT_NAME(destroy_chzt_plan)(p);
   #endif
   
   //printf("Length: %i, avr. %f ms \n",L,(st1-st0)/((double)nrep));
   printf("%i, %f\n",L,(st1-st0)/((double)nrep));
  
   ltfat_free(f);
   ltfat_free(c);
   
}
开发者ID:guneshwor,项目名称:ltfat,代码行数:52,代码来源:time_czt.c


示例7: LTFAT_NAME

LTFAT_API int
LTFAT_NAME(fft)(LTFAT_COMPLEX in[], ltfat_int L, ltfat_int W,
                LTFAT_COMPLEX out[])
{
    LTFAT_NAME(fft_plan)* p = NULL;
    int status = LTFATERR_SUCCESS;

    CHECKSTATUS( LTFAT_NAME(fft_init)(L, W, in, out, FFTW_ESTIMATE, &p));
    LTFAT_NAME(fft_execute)(p);
    LTFAT_NAME(fft_done)(&p);
error:
    return status;
}
开发者ID:ltfat,项目名称:ltfat,代码行数:13,代码来源:fftw_wrappers.c


示例8: LTFAT_NAME

LTFAT_EXTERN void
LTFAT_NAME(dgtreal_ola)(const LTFAT_REAL *f, const LTFAT_REAL *g,
		    const int L, const int gl,
		    const int W, const int a, const int M, const int bl,
		    LTFAT_COMPLEX *cout)
{
  LTFAT_NAME(dgtreal_ola_plan) plan =
    LTFAT_NAME(dgtreal_ola_init)(g, gl, W, a, M, bl, FFTW_ESTIMATE);

  LTFAT_NAME(dgtreal_ola_execute)(plan, f, L, cout);

  LTFAT_NAME(dgtreal_ola_done)(plan);

}
开发者ID:LarocheC,项目名称:voice-extraction,代码行数:14,代码来源:dgt.c


示例9: LTFAT_NAME

LTFAT_API void
LTFAT_NAME(gabdualreal_fac)(const LTFAT_COMPLEX* gf, ltfat_int L,
                            ltfat_int R,
                            ltfat_int a, ltfat_int M,
                            LTFAT_COMPLEX* gdualf)
{

    ltfat_int h_a, h_m;

    LTFAT_COMPLEX* Sf;

    const LTFAT_COMPLEX zzero = (LTFAT_COMPLEX) 0.0;
    const LTFAT_COMPLEX alpha = (LTFAT_COMPLEX) 1.0; //{1.0, 0.0 };

    ltfat_int N = L / a;

    ltfat_int c = ltfat_gcd(a, M, &h_a, &h_m);
    ltfat_int p = a / c;
    ltfat_int q = M / c;
    ltfat_int d = N / q;

    /* This is a floor operation. */
    ltfat_int d2 = d / 2 + 1;

    Sf = LTFAT_NAME_COMPLEX(malloc)(p * p);

    /* Copy the contents of gf to gdualf because LAPACK overwrites it input
     * argument
     */
    memcpy(gdualf, gf, sizeof(LTFAT_COMPLEX)*L * R);

    for (ltfat_int rs = 0; rs < c * d2; rs++)
    {
        LTFAT_NAME(gemm)(CblasNoTrans, CblasConjTrans, p, p, q * R,
                               &alpha,
                               gf + rs * p * q * R, p,
                               gf + rs * p * q * R, p,
                               &zzero, Sf, p);

        LTFAT_NAME(posv)(p, q * R, Sf, p,
                               gdualf + rs * p * q * R, p);

    }

    /* Clear the work-array. */
    ltfat_free(Sf);


}
开发者ID:ltfat,项目名称:ltfat,代码行数:49,代码来源:gabdual_fac.c


示例10: LTFAT_NAME_COMPLEX

LTFAT_EXTERN void
LTFAT_NAME_COMPLEX(dgt_fb)(const LTFAT_COMPLEX *f, const LTFAT_COMPLEX *g,
		     const int L, const int gl,
		     const int W,  const int a, const int M,
		     LTFAT_COMPLEX *cout)
{

  LTFAT_NAME(dgt_fb_plan) plan =
    LTFAT_NAME(dgt_fb_init)(g, gl, a, M, FFTW_ESTIMATE);

  LTFAT_NAME(dgt_fb_execute)(plan, f, L, W, cout);

  LTFAT_NAME(dgt_fb_done)(plan);

}
开发者ID:LarocheC,项目名称:voice-extraction,代码行数:15,代码来源:dgt.c


示例11: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
{
   int a, M, N, L, W;
   double tol;

   const LTFAT_REAL *s, *tgrad, *fgrad;
   LTFAT_REAL *phase;

   // Get inputs
   s     = (const LTFAT_REAL*) mxGetPr(prhs[0]);
   tgrad = (const LTFAT_REAL*) mxGetPr(prhs[1]);
   fgrad = (const LTFAT_REAL*) mxGetPr(prhs[2]);
   a     = (int)mxGetScalar(prhs[3]);
   tol   = mxGetScalar(prhs[4]);

   // Get matrix dimensions.
   M = mxGetM(prhs[0]);
   N = mxGetN(prhs[0]);
   L = N*a;
   W = 1;

   // Create output matrix and zero it.
   plhs[0] = ltfatCreateMatrix(M,N, LTFAT_MX_CLASSID, mxREAL);

   // Get pointer to output
   phase= (LTFAT_REAL*) mxGetPr(plhs[0]);

   LTFAT_NAME(heapint)(s,tgrad,fgrad, a, M, L, W,tol, phase);
}
开发者ID:jsloboda,项目名称:GhostVision,代码行数:29,代码来源:comp_heapint.c


示例12: LTFAT_NAME_COMPLEX

LTFAT_EXTERN void
LTFAT_NAME_COMPLEX(idwiltiii_fb)(const LTFAT_COMPLEX *c, const LTFAT_COMPLEX *g,
                                 const ltfatInt L, const ltfatInt gl,
                                 const ltfatInt W, const ltfatInt M,
                                 LTFAT_COMPLEX *f)
{
    const ltfatInt N = L / M;
    const ltfatInt M2 = 2 * M;
    const ltfatInt M4 = 4 * M;
    const LTFAT_REAL scalconst = 1.0 / sqrt(2.0);
    const LTFAT_COMPLEX eipi4 = cexp(I * PI / 4.0);
    const LTFAT_COMPLEX emipi4 = cexp(-I * PI / 4.0);

    LTFAT_COMPLEX *coef2 = ltfat_calloc(2 * M * N * W, sizeof * coef2);
    LTFAT_COMPLEX *f2 = ltfat_malloc(L * W * sizeof * f2);


    const LTFAT_COMPLEX *pcoef  = c;
    LTFAT_COMPLEX *pcoef2 = coef2;

    PREPROC_COMPLEX

    LTFAT_NAME(idgt_fb)(coef2, g, L, gl, W, M, 2 * M, FREQINV, f2);

    POSTPROC_COMPLEX

    LTFAT_SAFEFREEALL(coef2, f2);

}
开发者ID:Steve3nto,项目名称:NoiseReductionProject,代码行数:29,代码来源:iwmdct.c


示例13: LTFAT_NAME_REAL

LTFAT_EXTERN void
LTFAT_NAME_REAL(idwiltiii_long)(const LTFAT_REAL *c, const LTFAT_REAL *g,
                                const ltfatInt L, const ltfatInt W,
                                const ltfatInt M, LTFAT_REAL *f)
{
    const ltfatInt N = L / M;
    const ltfatInt M2 = 2 * M;
    const ltfatInt M4 = 4 * M;
    const LTFAT_REAL scalconst = 1.0 / sqrt(2.0);
    const LTFAT_COMPLEX eipi4 = cexp(I * PI / 4.0);
    const LTFAT_COMPLEX emipi4 = cexp(-I * PI / 4.0);

    LTFAT_COMPLEX *coef2 = ltfat_calloc(2 * M * N * W, sizeof * coef2);
    LTFAT_COMPLEX *f2 = ltfat_malloc(L * W * sizeof * f2);
    LTFAT_COMPLEX *g2 = ltfat_malloc(L * sizeof * g2);
    for (ltfatInt ii = 0; ii < L; ii++)
        g2[ii] = g[ii];


    const LTFAT_REAL *pcoef  = c;
    LTFAT_COMPLEX *pcoef2 = coef2;

    PREPROC_COMPLEX

    LTFAT_NAME(idgt_long)(coef2, g2, L, W, M, 2 * M, FREQINV, f2);

    POSTPROC_REAL

    LTFAT_SAFEFREEALL(coef2, f2, g2);

}
开发者ID:Steve3nto,项目名称:NoiseReductionProject,代码行数:31,代码来源:iwmdct.c


示例14: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int UNUSED(nlhs), mxArray *plhs[],
                              int UNUSED(nrhs), const mxArray *prhs[] )
{
   int L, R, N, c, d, p, q;
   ltfatInt a,M,h_a,h_m;

   // Get matrix dimensions.
   L = mxGetM(prhs[0]);
   R = mxGetN(prhs[0]);

   a=(ltfatInt)mxGetScalar(prhs[1]);
   M=(ltfatInt)mxGetScalar(prhs[2]);

   N=L/a;

   c=gcd(a, M, &h_a, &h_m);
   p=a/c;
   q=M/c;
   d=N/q;

   plhs[0] = ltfatCreateMatrix(p*q*R, c*d,LTFAT_MX_CLASSID,mxCOMPLEX);
   LTFAT_COMPLEX* gf_combined = mxGetData(plhs[0]);
   const LTFAT_TYPE* g_combined = mxGetData(prhs[0]);
   LTFAT_NAME(wfac)(g_combined, L, R, a, M, gf_combined);
}
开发者ID:Steve3nto,项目名称:NoiseReductionProject,代码行数:25,代码来源:comp_wfac.c


示例15: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
{
    int a, M, N, L, W, s0, s1, br;

    // Get matrix dimensions.
    L  = mxGetM(prhs[0]);
    W  = mxGetN(prhs[0]);

    a  = (int)mxGetScalar(prhs[2]);
    M  = (int)mxGetScalar(prhs[3]);
    s0 = (int)mxGetScalar(prhs[4]);
    s1 = (int)mxGetScalar(prhs[5]);
    br = (int)mxGetScalar(prhs[6]);

    N  = L/a;

    mwSize dims[]= { M, N, W};
    mwSize ndim=W>1?3:2;
    plhs[0] = ltfatCreateNdimArray(ndim,dims,LTFAT_MX_CLASSID,mxCOMPLEX);
    const LTFAT_COMPLEX* f_combined = (const LTFAT_COMPLEX*) mxGetData(prhs[0]);
    const LTFAT_COMPLEX* g_combined = (const LTFAT_COMPLEX*) mxGetData(prhs[1]);
    LTFAT_COMPLEX* out_combined = (LTFAT_COMPLEX*) mxGetData(plhs[0]);

    LTFAT_NAME(dgt_shear)(f_combined,g_combined,L,W,a,M,s0,s1,br,out_combined);
}
开发者ID:jsloboda,项目名称:GhostVision,代码行数:25,代码来源:comp_nonsepdgt_shear.c


示例16: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
{
   int L, W, a, M, N, gl;
   // Get matrix dimensions.
   L=(int)mxGetScalar(prhs[2]);
   a=(int)mxGetScalar(prhs[3]);
   M=(int)mxGetScalar(prhs[4]);
   N=L/a;

   gl = mxGetM(prhs[1]);
   W  = mxGetM(prhs[0])*mxGetN(prhs[0])/(M*N);

   plhs[0] = ltfatCreateMatrix(L, W,LTFAT_MX_CLASSID, mxCOMPLEX);
   const LTFAT_REAL _Complex* c_combined = (const LTFAT_REAL _Complex*) mxGetData(prhs[0]);
   const LTFAT_REAL _Complex* g_combined = (const LTFAT_REAL _Complex*) mxGetData(prhs[1]);
   LTFAT_REAL _Complex* f_combined = (LTFAT_REAL _Complex*) mxGetData(plhs[0]);

   //#ifdef LTFAT_COMPLEXTYPE
   LTFAT_NAME(idgt_fb)((const LTFAT_REAL (*)[2])c_combined,
                       (const LTFAT_REAL (*)[2])g_combined,
                       L,gl,W,a,M, (LTFAT_REAL (*)[2]) f_combined);

  /* #else
   NOT CALLING idgt_fb_r:
   TO DO: Do it better.
   LTFAT_NAME(idgt_fb_r)((const LTFAT_REAL (*)[2])c_combined,
                         g_combined,
                         L,gl,W,a,M,(LTFAT_REAL (*)[2]) f_combined);
   #endif
   */
   return;
}
开发者ID:LarocheC,项目名称:voice-extraction,代码行数:32,代码来源:comp_idgt_fb.c


示例17: LTFAT_NAME

void LTFAT_NAME(ltfatMexFnc)( int nlhs, mxArray *plhs[],int nrhs, const mxArray *prhs[] )
{
   int L, W, a, M, N;
   mwSize ndim;
   mwSize dims[3];

   // Get matrix dimensions.
   L = mxGetM(prhs[0]);
   W = mxGetN(prhs[0]);

   a=(int)mxGetScalar(prhs[2]);
   M=(int)mxGetScalar(prhs[3]);

   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_long)((const LTFAT_REAL (*)[2])f_combined,
                        (const LTFAT_REAL (*)[2])g_combined,
                         L,W,a,M,(LTFAT_REAL (*)[2])out_combined);

   return;
}
开发者ID:LarocheC,项目名称:voice-extraction,代码行数:35,代码来源:comp_dgt_long.c


示例18: main

int main( int argc, char *argv[] )
{
  double *f, *g;
  ltfat_complex *c;
  int a, M, L, gl, W, N, bl, nrep, ii;
  double s0, s1;

  if (argc<8)
  {
     printf("Correct parameters: a, M, L, W, gl, bl, nrep\n");     
     return(1);
  }
  a = atoi(argv[1]);
  M = atoi(argv[2]);
  L = atoi(argv[3]);
  W = atoi(argv[4]);
  gl = atoi(argv[5]);
  bl = atoi(argv[6]);
  nrep = atoi(argv[7]);

  N=L/a;

  f  = ltfat_malloc(L*W*sizeof(double));
  g  = ltfat_malloc(L*W*sizeof(double));
  c  = ltfat_malloc(M*N*W*sizeof(ltfat_complex));

  LTFAT_NAME(dgtreal_ola_plan) plan = LTFAT_NAME(dgtreal_ola_init)((const double*)g, gl, W, a, M, bl, FFTW_PATIENT);
  
  s0 = ltfat_time();
  for (ii=0;ii<nrep;ii++)
  {
     LTFAT_NAME(dgtreal_ola_execute)(plan,(const double*)f,L,c);
  }
  s1 = ltfat_time();

  LTFAT_NAME(dgtreal_ola_done)(plan);

  printf("%i %i %i %i %i %i %f\n",a,M,L,W,gl,bl,(s1-s0)/nrep); 

  ltfat_free(f);
  ltfat_free(g);
  ltfat_free(c);

  return(0);
}
开发者ID:guneshwor,项目名称:ltfat,代码行数:45,代码来源:time_dgtreal_ola.c


示例19: LTFAT_NAME

LTFAT_NAME(dgt_shearola_init)(const LTFAT_COMPLEX *g, const int gl,
			      const int W, const int a, const int M, 
			      const int s0, const int s1, const int br,
			      const int bl,
			      unsigned flags)
{

   LTFAT_NAME(dgt_shearola_plan) plan;

   plan.bl = bl;
   plan.gl = gl;
   plan.W  = W;

   const int Lext    = bl+gl;
   const int Nblocke = Lext/a;
   
   plan.buf  = ltfat_malloc(Lext*W*sizeof(LTFAT_COMPLEX));
   plan.gext = ltfat_malloc(Lext*sizeof(LTFAT_COMPLEX));   
   plan.cbuf = ltfat_malloc(M*Nblocke*W*sizeof(LTFAT_COMPLEX));
   
   LTFAT_NAME(fir2long_c)(g, gl, Lext, plan.gext);
   
   /* Zero the last part of the buffer, it will always be zero. */
   for (int w=0; w<W; w++)
   {      
      for (int jj=bl; jj<Lext;jj++)
      {
	 plan.buf[jj+w*Lext][0]=0.0;
	 plan.buf[jj+w*Lext][1]=0.0;
      }
   }
   
   plan.plan =
      LTFAT_NAME(dgt_shear_init)((const LTFAT_COMPLEX*)plan.buf,
				 (const LTFAT_COMPLEX*)plan.gext,
				 Lext, W, a, M,
				 s0, s1, br,
				 plan.cbuf, flags);
   
   return (plan);

}
开发者ID:jganseman,项目名称:nsgt-eval,代码行数:42,代码来源:dgt_shearola.c


示例20: LTFAT_NAME

LTFAT_EXTERN
void LTFAT_NAME(circshift)(LTFAT_TYPE *in, LTFAT_TYPE *out, const ptrdiff_t L, const ptrdiff_t shift)
{
   ptrdiff_t shiftMod = shift%L;

   if(in==out)
   {

       if(1)
       {
          LTFAT_TYPE *inTmp = (LTFAT_TYPE *)ltfat_malloc(L*sizeof(LTFAT_TYPE));
          memcpy(inTmp,in,L*sizeof(LTFAT_TYPE));
          LTFAT_NAME(circshift)(inTmp,out,L,shift);
          ltfat_free(inTmp);
       }
       else
       {
          int m,count,ii,jj;
          for(m=0,count=0;count!=L;m++)
          {
              LTFAT_TYPE t = in[m];
              for(ii=m,jj=m+shiftMod;
                  jj!=m;
                  ii=jj,jj=jj+shiftMod<L?jj+shiftMod:jj+shiftMod-L,count++)
              {
                  in[ii]=in[jj];
              }
              in[ii]=t;
              count++;
          }
       }



       return;
   }



   if(shiftMod<0)
   {
       memcpy(out,in-shiftMod,(L+shiftMod)*sizeof(LTFAT_TYPE));
       memcpy(out+(L+shiftMod),in,-shiftMod*sizeof(LTFAT_TYPE));
   }
   else if(shiftMod>0)
   {
       memcpy(out+shiftMod,in,(L-shiftMod)*sizeof(LTFAT_TYPE));
       memcpy(out,in+L-shiftMod,shiftMod*sizeof(LTFAT_TYPE));
   }
   else
   {
       memcpy(out,in,L*sizeof(LTFAT_TYPE));
   }
}
开发者ID:jganseman,项目名称:nsgt-eval,代码行数:54,代码来源:ciutils.c



注:本文中的LTFAT_NAME函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LTIMING函数代码示例发布时间:2022-05-30
下一篇:
C++ LTC_MUTEX_UNLOCK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap