This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSPF_sp_qrd_solver函数计算结果不对

Other Parts Discussed in Thread: AM5718

处理器AM5718,程序代码如下:

#define col 2
#define row 4
#pragma DATA_SECTION(A, ".DDR0");
#pragma DATA_ALIGN(A, 8);
float A[row*col];
#pragma DATA_SECTION(Q, ".DDR0");
#pragma DATA_ALIGN(Q, 8);
float Q[row*row];
#pragma DATA_SECTION(R, ".DDR0");
#pragma DATA_ALIGN(R, 8);
float R[row*col];
#pragma DATA_SECTION(y, ".DDR0");
#pragma DATA_ALIGN(y, 8);
float y[row];
#pragma DATA_SECTION(x, ".DDR0");
#pragma DATA_ALIGN(x, 8);
float x[col];
#pragma DATA_SECTION(u, ".DDR0");
#pragma DATA_ALIGN(u, 8);
float u[col*row];
#pragma DATA_SECTION(b, ".DDR0");
#pragma DATA_ALIGN(b, 8);
float b[row];

for (i = 0; i<row; i++)
{
    A[i*col] = 1;
    A[i*col+1] = i;
   b[i] = A[i*col] + 2*A[i*col+1];
}

DSPF_sp_qrd (row, col, A, Q, R, u);
DSPF_sp_qrd_solver (row, col, Q, R, b, y, x);

显然x的正确值应该是【1,2】,但是计算的结果却为【4,0】