Update of /cvsroot/math-atlas/AtlasBase/Clint
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28149/Clint
Modified Files:
atlas-kmm.base atlas-tlp.base
Log Message:
Index: atlas-kmm.base
===================================================================
RCS file: /cvsroot/math-atlas/AtlasBase/Clint/atlas-kmm.base,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** atlas-kmm.base 21 Aug 2006 14:34:49 -0000 1.43
--- atlas-kmm.base 11 Sep 2006 15:20:54 -0000 1.44
***************
*** 2033,2039 ****
<ID> <flag> <mb> <nb> <kb> <muladd> <lat> <mu> <nu> <ku> <rout> "<Contributer>"
@ROUT dcases.flg
! 20
@ROUT zcases.flg
! 19
@ROUT dcases.flg zcases.flg
@beginskip
--- 2033,2039 ----
<ID> <flag> <mb> <nb> <kb> <muladd> <lat> <mu> <nu> <ku> <rout> "<Contributer>"
@ROUT dcases.flg
! 21
@ROUT zcases.flg
! 20
@ROUT dcases.flg zcases.flg
@beginskip
***************
*** 2129,2132 ****
--- 2129,2135 ----
gcc
-x assembler-with-cpp
+ 328 224 8 0 2 0 1 4 1 2 ATL_dmm8x1x120_sse2.c "R. Clint Whaley" \
+ gcc
+ -x assembler-with-cpp
Index: atlas-tlp.base
===================================================================
RCS file: /cvsroot/math-atlas/AtlasBase/Clint/atlas-tlp.base,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** atlas-tlp.base 8 Sep 2006 23:38:21 -0000 1.22
--- atlas-tlp.base 11 Sep 2006 15:20:54 -0000 1.23
***************
*** 226,247 ****
}
static void PosDefGen
(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, int N, TYPE *A, int lda)
/*
! * Generates a positive definite matrix
! * This routine doesn't work, maybe because A = L*Lt does not guarantee
! * positive definiteness? We know that all pos def can be factored to L*Lt,
! * but not the reverse . . .
*/
{
! TYPE *aa, t0, *T;
! TYPE small = 10e-4;
int j;
const int lda2=(lda SHIFT), ldap1=((lda+1)SHIFT);
- #ifdef TCPLX
- TYPE one[2] = {1.0, 0.0}, zero[2] = {0.0, 0.0};
- #else
- TYPE one = ATL_rone, zero = ATL_rzero;
- #endif
Mjoin(PATL,gegen)(N, N, A, lda, N*N+lda);
--- 226,240 ----
}
+ #include <math.h>
static void PosDefGen
(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, int N, TYPE *A, int lda)
/*
! * Generates a reasonably conditioned positive definite matrix
*/
{
! TYPE *aa, t0, *L;
! TYPE val, bias, sign;
int j;
const int lda2=(lda SHIFT), ldap1=((lda+1)SHIFT);
Mjoin(PATL,gegen)(N, N, A, lda, N*N+lda);
***************
*** 252,262 ****
}
/*
! * Force diagonal to be non-zero
*/
! dumb_seed(lda*8+N+7);
for (aa=A,j=0; j < N; j++, aa += ldap1)
{
! while (*aa < small)
! *aa = dumb_rand();
}
/*
--- 245,261 ----
}
/*
! * It should be enough to make diagonal non-zero, but small numbers are very
! * ill-conditioned, and therefore may not be solvable in practice. Therefore,
! * scale the diagonal by log(N).
*/
! bias = log(N);
! bias = (bias < 1.0) ? 1.0 : bias;
for (aa=A,j=0; j < N; j++, aa += ldap1)
{
! val = *aa;
! sign = (val < 0.0) ? -1.0 : 1.0;
! val = (val < 0.0) ? -val : val;
! val = (val+bias)*sign;
! *aa = val;
}
/*
***************
*** 280,299 ****
}
/*
! * Force A = T * T', where T is Lower or Upper as requested, to make pos def
*/
! T = DupMat(CblasColMajor, N, N, A, lda, N);
! #if 0
! Mjoin(CBP,gemm)(CblasColMajor, CblasNoTrans, CblasTrans, N, N, N, one, T, N,
! T, N, zero, A, lda);
! #else
#ifdef TCPLX
! Mjoin(CBP,herk)(CblasColMajor, Uplo, CblasNoTrans, N, N, one, T, N,
! zero, A, lda);
#else
! Mjoin(CBP,syrk)(CblasColMajor, Uplo, CblasNoTrans, N, N, one, T, N,
! zero, A, lda);
! #endif
#endif
! free(T);
/*
* Make sure non-triangular elements are bad for error detection
--- 279,293 ----
}
/*
! * Force A = L * L', where L is Lower or Upper as requested, to make pos def
*/
! L = DupMat(CblasColMajor, N, N, A, lda, N);
#ifdef TCPLX
! Mjoin(CBP,herk)(CblasColMajor, Uplo, CblasNoTrans, N, N, ATL_rone, L, N,
! ATL_rzero, A, lda);
#else
! Mjoin(CBP,syrk)(CblasColMajor, Uplo, CblasNoTrans, N, N, ATL_rone, L, N,
! ATL_rzero, A, lda);
#endif
! free(L);
/*
* Make sure non-triangular elements are bad for error detection
***************
*** 360,368 ****
(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, int N, TYPE *A, int lda)
{
! #if 1
MakeHEDiagDom(Order, Uplo, N, A, lda);
CrapUpTri(Order, Uplo, N, A, lda);
- #else
- PosDefGen(Order, Uplo, N, A, lda);
#endif
}
--- 354,362 ----
(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, int N, TYPE *A, int lda)
{
! #ifdef POSDEFGEN
! PosDefGen(Order, Uplo, N, A, lda);
! #else
MakeHEDiagDom(Order, Uplo, N, A, lda);
CrapUpTri(Order, Uplo, N, A, lda);
#endif
}
|