File: testing_s.h

package info (click to toggle)
magma 2.9.0%2Bds-3
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 83,556 kB
  • sloc: cpp: 709,115; fortran: 121,916; ansic: 32,343; python: 25,603; f90: 15,208; makefile: 945; xml: 253; csh: 232; sh: 203; perl: 104
file content (98 lines) | stat: -rw-r--r-- 2,314 bytes parent folder | download | duplicates (3)
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

       @generated from testing/testing_z.h, normal z -> s, Wed Jan 22 14:41:36 2025
       @author Mark Gates
       
       Utilities for testing.
*/
#ifndef TESTING_MAGMA_S_H
#define TESTING_MAGMA_S_H

#ifdef __cplusplus
extern "C" {
#endif

#define REAL

void magma_smake_symmetric( magma_int_t N, float* A, magma_int_t lda );
void magma_smake_symmetric( magma_int_t N, float* A, magma_int_t lda );

void magma_smake_spd( magma_int_t N, float* A, magma_int_t lda );
void magma_smake_hpd( magma_int_t N, float* A, magma_int_t lda );

// work around MKL bug in multi-threaded lanhe/lansy
float safe_lapackf77_slansy(
    const char *norm, const char *uplo,
    const magma_int_t *n,
    const float *A, const magma_int_t *lda,
    float *work );

#ifdef COMPLEX
static inline float magma_slapy2( float x )
{
    float xr = MAGMA_S_REAL( x );
    float xi = MAGMA_S_IMAG( x );
    return lapackf77_slapy2( &xr, &xi );
}
#endif

void check_sgesvd(
    magma_int_t check,
    magma_vec_t jobu,
    magma_vec_t jobvt,
    magma_int_t m, magma_int_t n,
    float *A,  magma_int_t lda,
    float *S,
    float *U,  magma_int_t ldu,
    float *VT, magma_int_t ldv,
    float result[4] );

void check_sgeev(
    magma_vec_t jobvl,
    magma_vec_t jobvr,
    magma_int_t n,
    float *A,  magma_int_t lda,
    #ifdef COMPLEX
    float *w,
    #else
    float *wr, float *wi,
    #endif
    float *VL, magma_int_t ldvl,
    float *VR, magma_int_t ldvr,
    float *work, magma_int_t lwork,
    #ifdef COMPLEX
    float *rwork, magma_int_t lrwork,
    #endif
    float result[4] );

//void magma_sgenerate_matrix(
//    magma_int_t matrix,
//    magma_int_t m, magma_int_t n,
//    magma_int_t iseed[4],
//    float* sigma,
//    float* A, magma_int_t lda );

#undef REAL

#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,
//    float* sigma_ptr,
//    float* A_ptr, magma_int_t lda );

#endif        //  #ifndef TESTING_MAGMA_S_H