工具/软件:TI-RTOS
我将使用下面这段简单代码描述 DSPLIB 中提供的复数 SVD 的性能:
#include
#include
#include
#include
#include
#include System_printf、TSCL 和高速缓存函数调用的/*头文件、AKM */
#include "c6x.h"
#define N 12.
float A[N * N * 2]、au[N * N * 2]、av[N * N * 2]、aU1[N * N * 2]、adiag[N * N * 2]、asuper[N * N * 2];
float b[N * N * 2]、BU[N * N * 2]、BV[N * N * 2]、bU1[N * N * 2]、bdiag[N * N * 2]、bsuper[N * N * 2];
int main (void){
int i、j;
对于(I = 0;I < N;+I){
对于(j = 0;j < N;+j){
float Real =(j - I + N)% N + 1;
float imag =(j -(N - 1 - I)+ N)% N + 1;
A[I * N * 2 + j * 2]=实数;
B[I * N * 2 + j * 2]=实数;
A[I * N * 2 + j * 2 + 1]= imag;
B[I * N * 2 + j * 2 + 1]= imag;
}
}
DSPF_sp_SVD_cmplx (N、N、b、BU、BV、 bU1、bdiag、bsuper);
long long start =_itoll (TSCH、TSCL);
DSPF_sp_SVD_cmplx (N、N、A、AU、AV、 aU1、adiag、asuper);
long long end =_itoll (TSCH、TSCL);
长跨度=结束-开始;
printf ("%f\n"、span * 0.0008);
返回0;
}
它为我提供了0.0000。 我逐步跟踪了代码、在调用例程后发现该值没有变化。