|
void calculate_L_values(float32_t A_L[N * N], float32_t L0[N], float32_t L_values[N * n])
{
uint8_t i = 0;
uint8_t j = 0;
// float32_t* temp = NULL;
arm_matrix_instance_f32 A_L_Indexes;
A_L_Indexes.numCols = N;
A_L_Indexes.numRows = N;
A_L_Indexes.pData = A_L;
float32_t Li[N] = {0};
float32_t Li_next[N] = {0};
arm_matrix_instance_f32 Li_Indexes;
Li_Indexes.numCols = N;
Li_Indexes.numRows = 1;
Li_Indexes.pData = Li;
arm_matrix_instance_f32 Li_next_Indexes;
Li_next_Indexes.numCols = N;
Li_next_Indexes.numRows = 1;
Li_next_Indexes.pData = Li_next;
arm_matrix_instance_f32 L0_result;
L0_result.numCols = N;
L0_result.numRows = 1;
L0_result.pData = L0;
// Calculate initial Li
arm_mat_mult_f32(&A_L_Indexes, &L0_result, &Li_Indexes);
// Store transposed L_values
for (i = 0; i < N; ++i)
{
L_values[0 * N + i] = Li;
}
i = 0;
// Calculate and store all L values
for (i = 1; i < n; ++i)
{
arm_mat_mult_f32(&A_L_Indexes, &Li_Indexes, &Li_next_Indexes);
arm_copy_f32(Li_next, Li, N);
// Store transposed L_values
for (j = 0; j < N; ++j)
{
L_values[i * N + j] = Li[j];
}
}
}
问题是这样的,第一步的arm_mat_mult_f32都没有问题,我把 arm_mat_mult_f32(&A_L_Indexes, &L0_result, &Li_Indexes);与 arm_mat_mult_f32(&A_L_Indexes, &Li_Indexes, &Li_next_Indexes);调换位置之后也是第一个arm_mat_mult_f32可以运行,但是第二个arm_mat_mult_f32就运行不了,不知道是什么原因(我是在调试下试的,就一直卡在arm_mat_mult_f32(&A_L_Indexes, &Li_Indexes, &Li_next_Indexes);这个函数里面),n定义为60,N定义为4.改了很多天了,救救孩子吧
|
|