1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
/*
-- MAGMA (version 2.9.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2025
@precisions normal z -> s d c
@author Mark Gates
Utilities for testing.
*/
#ifndef TESTING_MAGMA_Z_H
#define TESTING_MAGMA_Z_H
#ifdef __cplusplus
extern "C" {
#endif
#define COMPLEX
void magma_zmake_symmetric( magma_int_t N, magmaDoubleComplex* A, magma_int_t lda );
void magma_zmake_hermitian( magma_int_t N, magmaDoubleComplex* A, magma_int_t lda );
void magma_zmake_spd( magma_int_t N, magmaDoubleComplex* A, magma_int_t lda );
void magma_zmake_hpd( magma_int_t N, magmaDoubleComplex* A, magma_int_t lda );
// work around MKL bug in multi-threaded lanhe/lansy
double safe_lapackf77_zlanhe(
const char *norm, const char *uplo,
const magma_int_t *n,
const magmaDoubleComplex *A, const magma_int_t *lda,
double *work );
#ifdef COMPLEX
static inline double magma_zlapy2( magmaDoubleComplex x )
{
double xr = MAGMA_Z_REAL( x );
double xi = MAGMA_Z_IMAG( x );
return lapackf77_dlapy2( &xr, &xi );
}
#endif
void check_zgesvd(
magma_int_t check,
magma_vec_t jobu,
magma_vec_t jobvt,
magma_int_t m, magma_int_t n,
magmaDoubleComplex *A, magma_int_t lda,
double *S,
magmaDoubleComplex *U, magma_int_t ldu,
magmaDoubleComplex *VT, magma_int_t ldv,
double result[4] );
void check_zgeev(
magma_vec_t jobvl,
magma_vec_t jobvr,
magma_int_t n,
magmaDoubleComplex *A, magma_int_t lda,
#ifdef COMPLEX
magmaDoubleComplex *w,
#else
double *wr, double *wi,
#endif
magmaDoubleComplex *VL, magma_int_t ldvl,
magmaDoubleComplex *VR, magma_int_t ldvr,
magmaDoubleComplex *work, magma_int_t lwork,
#ifdef COMPLEX
double *rwork, magma_int_t lrwork,
#endif
double result[4] );
//void magma_zgenerate_matrix(
// magma_int_t matrix,
// magma_int_t m, magma_int_t n,
// magma_int_t iseed[4],
// double* sigma,
// magmaDoubleComplex* A, magma_int_t lda );
#undef COMPLEX
#ifdef __cplusplus
}
#endif
/******************************************************************************/
// C++ utility functions
//class magma_opts;
//void magma_generate_matrix(
// magma_opts& opts,
// magma_int_t iseed[4],
// magma_int_t m, magma_int_t n,
// double* sigma_ptr,
// magmaDoubleComplex* A_ptr, magma_int_t lda );
#endif // #ifndef TESTING_MAGMA_Z_H
|