Fixed bug. Wrong calling sequence to dgemm.

time-shift
Stéphane Adjemian (Charybdis) 2011-12-23 12:10:23 +01:00
parent b9d47ae42e
commit 6bb3a1c736
1 changed files with 2 additions and 1 deletions

View File

@ -138,11 +138,12 @@ template<typename T> void icdfm( const int n, T *U)
template<typename T> void icdfmSigma( const int d, const int n, T *U, const double *LowerCholSigma)
{
double one = 1.0;
double zero = 0.0;
blas_int dd(d);
blas_int nn(n);
icdfm(n*d, U);
double tmp[n*d];
dgemm("N","N",&dd,&nn,&dd,&one,LowerCholSigma,&dd,U,&dd,&one,tmp,&dd);
dgemm("N","N",&dd,&nn,&dd,&one,LowerCholSigma,&dd,U,&dd,&zero,tmp,&dd);
memcpy(U,tmp,d*n*sizeof(double));
return;
}