📄 candual_fac.c
字号:
#include "config.h"#include <stdlib.h>#include <stdio.h>#include <math.h>#include <string.h>#include "ltfat_blas.h"#include "ltfat_lapack.h"#include "dgt.h"void candual_fac(ltfat_complex *gf, const int L, const int R, const int a, const int M, ltfat_complex *gdualf){ int N, c, d, p, q, h_a, h_m; int w, rs; ltfat_complex *Sf; ltfat_complex zzero, alpha; zzero[0]=0.0; zzero[1]=0.0; alpha[0]=1.0; alpha[1]=0.0; N=L/a; c=gcd(a, M,&h_a, &h_m); p=a/c; q=M/c; d=N/q; Sf = (ltfat_complex*)ltfat_malloc(p*p*sizeof(ltfat_complex)); /* Copy the contents of gf to gdualf because LAPACK overwrites it input * argument */ memcpy(gdualf,gf,sizeof(ltfat_complex)*L*R); for (w=0;w<R;w++) { for (rs=0;rs<c*d;rs++) { ltfat_zgemm(CblasNoTrans,CblasConjTrans,p,p,q*R, &alpha, gf+rs*p*q*R,p, gf+rs*p*q*R,p, &zzero,Sf,p); ltfat_zposv(p, q*R, Sf, p, gdualf+rs*p*q*R, p); } } /* Clear the work-array. */ ltfat_free(Sf);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -