libflame revision_anchor
Functions
bl1_invertv.c File Reference

(r)

Functions

void bl1_sinvertv (conj1_t conj, int n, float *x, int incx)
 
void bl1_dinvertv (conj1_t conj, int n, double *x, int incx)
 
void bl1_cinvertv (conj1_t conj, int n, scomplex *x, int incx)
 
void bl1_zinvertv (conj1_t conj, int n, dcomplex *x, int incx)
 

Function Documentation

◆ bl1_cinvertv()

void bl1_cinvertv ( conj1_t  conj,
int  n,
scomplex x,
int  incx 
)
42{
43 float one = 1.0F;
44 float temp;
45 float s, xr_s, xi_s;
46 float conjsign;
48 int i;
49
50 if ( bl1_is_conj( conj ) ) conjsign = one;
51 else conjsign = -one;
52
53 for ( i = 0; i < n; ++i )
54 {
55 chi = x + i*incx;
56
57 s = bl1_fmaxabs( chi->real, chi->imag ); \
58 xr_s = chi->real / s;
59 xi_s = chi->imag / s;
60 temp = xr_s * chi->real + xi_s * chi->imag;
61
62 chi->real = xr_s / temp;
63 chi->imag = conjsign * xi_s / temp;
64 }
65}
int i
Definition bl1_axmyv2.c:145
dcomplex temp
Definition bl1_axpyv2b.c:301
int bl1_is_conj(conj1_t conj)
Definition bl1_is.c:42
double real
Definition blis_type_defs.h:139
double imag
Definition blis_type_defs.h:139
Definition blis_type_defs.h:133

References bl1_is_conj(), i, scomplex::imag, scomplex::real, and temp.

Referenced by FLA_Invert().

◆ bl1_dinvertv()

void bl1_dinvertv ( conj1_t  conj,
int  n,
double x,
int  incx 
)
28{
29 double one = 1.0;
30 double* chi;
31 int i;
32
33 for ( i = 0; i < n; ++i )
34 {
35 chi = x + i*incx;
36
37 *chi = one / *chi;
38 }
39}

References i.

Referenced by FLA_Invert().

◆ bl1_sinvertv()

void bl1_sinvertv ( conj1_t  conj,
int  n,
float x,
int  incx 
)
14{
15 float one = 1.0F;
16 float* chi;
17 int i;
18
19 for ( i = 0; i < n; ++i )
20 {
21 chi = x + i*incx;
22
23 *chi = one / *chi;
24 }
25}

References i.

Referenced by FLA_Invert().

◆ bl1_zinvertv()

void bl1_zinvertv ( conj1_t  conj,
int  n,
dcomplex x,
int  incx 
)
68{
69 double one = 1.0;
70 double temp;
71 double s, xr_s, xi_s;
72 double conjsign;
74 int i;
75
76 if ( bl1_is_conj( conj ) ) conjsign = one;
77 else conjsign = -one;
78
79 for ( i = 0; i < n; ++i )
80 {
81 chi = x + i*incx;
82
83 s = bl1_fmaxabs( chi->real, chi->imag ); \
84 xr_s = chi->real / s;
85 xi_s = chi->imag / s;
86 temp = xr_s * chi->real + xi_s * chi->imag;
87
88 chi->real = xr_s / temp;
89 chi->imag = conjsign * xi_s / temp;
90 }
91}
Definition blis_type_defs.h:138

References bl1_is_conj(), i, dcomplex::imag, dcomplex::real, and temp.

Referenced by FLA_Invert().