libflame  revision_anchor
Functions
bl1_invert2s.c File Reference

(r)

Functions

void bl1_sinvert2s (conj1_t conj, float *alpha, float *beta)
 
void bl1_dinvert2s (conj1_t conj, double *alpha, double *beta)
 
void bl1_cinvert2s (conj1_t conj, scomplex *alpha, scomplex *beta)
 
void bl1_zinvert2s (conj1_t conj, dcomplex *alpha, dcomplex *beta)
 

Function Documentation

◆ bl1_cinvert2s()

void bl1_cinvert2s ( conj1_t  conj,
scomplex alpha,
scomplex beta 
)

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

Referenced by bl1_cinvscalm(), and bl1_cinvscalv().

28 {
29  float temp;
30  float s, xr_s, xi_s;
31 
32  s = bl1_fmaxabs( alpha->real, alpha->imag ); \
33  xr_s = alpha->real / s;
34  xi_s = alpha->imag / s;
35  temp = xr_s * alpha->real + xi_s * alpha->imag;
36 
37  beta->real = xr_s / temp;
38  beta->imag = -xi_s / temp;
39 
40  if ( bl1_is_conj( conj ) )
41  bl1_cconjs( beta );
42 }
float real
Definition: blis_type_defs.h:134
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
dcomplex temp
Definition: bl1_axpyv2b.c:301
float imag
Definition: blis_type_defs.h:134

◆ bl1_dinvert2s()

void bl1_dinvert2s ( conj1_t  conj,
double *  alpha,
double *  beta 
)

Referenced by bl1_dinvscalm(), and bl1_zdinvscalm().

21 {
22  double one = 1.0;
23 
24  *beta = one / *alpha;
25 }

◆ bl1_sinvert2s()

void bl1_sinvert2s ( conj1_t  conj,
float *  alpha,
float *  beta 
)

Referenced by bl1_csinvscalm(), and bl1_sinvscalm().

14 {
15  float one = 1.0F;
16 
17  *beta = one / *alpha;
18 }

◆ bl1_zinvert2s()

void bl1_zinvert2s ( conj1_t  conj,
dcomplex alpha,
dcomplex beta 
)

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

Referenced by bl1_zinvscalm(), and bl1_zinvscalv().

45 {
46  double temp;
47  double s, xr_s, xi_s;
48 
49  s = bl1_fmaxabs( alpha->real, alpha->imag ); \
50  xr_s = alpha->real / s;
51  xi_s = alpha->imag / s;
52  temp = xr_s * alpha->real + xi_s * alpha->imag;
53 
54  beta->real = xr_s / temp;
55  beta->imag = -xi_s / temp;
56 
57  if ( bl1_is_conj( conj ) )
58  bl1_zconjs( beta );
59 }
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
double imag
Definition: blis_type_defs.h:139
dcomplex temp
Definition: bl1_axpyv2b.c:301
double real
Definition: blis_type_defs.h:139