giaf / blasfeo

Basic linear algebra subroutines for embedded optimization
Other
321 stars 88 forks source link

bugfix in HP GEMM functions #151

Closed lvanroye closed 2 years ago

lvanroye commented 2 years ago

Hello,

I experienced some problems using the GEMM functions. Compile target: High Performance for Intel Haswell. After a little review of the code a little bit I think I found a small typo.

The issue occurs when using for example

void blasfeo_dgemm_nt(int m, int n, int k, double alpha, struct blasfeo_dmat sA, int ai, int aj, struct blasfeo_dmat sB, int bi, int bj, double beta, struct blasfeo_dmat sC, int ci, int cj, struct blasfeo_dmat sD, int di, int dj);

sC is a matrix of different dimensions than sD, and ci is not zero.

I think for example blasfeo_hp_pm/d_blas3_lib4.c line 753 should be pC += ci0/pspssdc; instead of pC += ci0/pspssdd;

Fixing this solved my issue.

Kind regards, Lander Vanroye