我正在使用 cblass_dgemm 将两个矩阵相乘
应该计算 B = A' x A;
row_train = 10304, col_train = 5;
gsl_matrix *mean_centred_train = gsl_matrix_alloc(row_train, col_train);
gsl_matrix * image_for_eigen = gsl_matrix_alloc(col_train, col_train);
这就是我所说的:
cblas_dgemm(CblasRowMajor, CblasTrans, CblasNoTrans, mean_centred_train->size1, mean_centred_train->size2, mean_centred_train->size2, 1, mean_centred_train->data, mean_centred_train->size1, mean_centred_train->data, mean_centred_train->size1, 1, image_for_eigen->data, image_for_eigen->size1);
当我运行程序时,我得到一个分段错误,我很确定矩阵的大小是正确的。