libflame  revision_anchor
Functions
bl1_dot.c File Reference

(r)

Functions

void bl1_sdot (conj1_t conj, int n, float *x, int incx, float *y, int incy, float *rho)
 
void bl1_ddot (conj1_t conj, int n, double *x, int incx, double *y, int incy, double *rho)
 
void bl1_cdot (conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy, scomplex *rho)
 
void bl1_zdot (conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *rho)
 
void bl1_cdot_in (conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy, scomplex *rho)
 
void bl1_zdot_in (conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *rho)
 

Function Documentation

◆ bl1_cdot()

void bl1_cdot ( conj1_t  conj,
int  n,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex rho 
)
40 {
41 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
42  if ( bl1_is_conj( conj ) )
43  {
44  cblas_cdotc_sub( n,
45  x, incx,
46  y, incy,
47  rho );
48  }
49  else // if ( !bl1_is_conj( conj ) )
50  {
51  cblas_cdotu_sub( n,
52  x, incx,
53  y, incy,
54  rho );
55  }
56 #else
57  bl1_cdot_in( conj,
58  n,
59  x, incx,
60  y, incy,
61  rho );
62 #endif
63 }
* rho
Definition: bl1_axpyv2bdotaxpy.c:322
void bl1_cdot_in(conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy, scomplex *rho)
Definition: bl1_dot.c:94
void cblas_cdotc_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotc)
void cblas_cdotu_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu)
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42

References bl1_cdot_in(), bl1_is_conj(), cblas_cdotc_sub(), cblas_cdotu_sub(), and rho.

Referenced by bl1_cdot2s(), bl1_cdots(), FLA_Bidiag_UT_u_step_ofc_var2(), FLA_Bidiag_UT_u_step_ofc_var3(), FLA_Bidiag_UT_u_step_ofc_var4(), FLA_Bidiag_UT_u_step_opc_var2(), FLA_Bidiag_UT_u_step_opc_var3(), FLA_Bidiag_UT_u_step_opc_var4(), FLA_Bidiag_UT_u_step_opc_var5(), FLA_Dot_external(), FLA_Dotc_external(), FLA_Fused_Ahx_Ax_opc_var1(), FLA_Fused_Gerc2_Ahx_Ax_opc_var1(), FLA_Fused_Gerc2_Ahx_Axpy_Ax_opc_var1(), FLA_Fused_Her2_Ax_l_opc_var1(), FLA_Fused_Uhu_Yhu_Zhu_opc_var1(), FLA_Fused_UYx_ZVx_opc_var1(), FLA_Fused_UZhu_ZUhu_opc_var1(), FLA_Hess_UT_step_ofc_var2(), FLA_Hess_UT_step_ofc_var3(), FLA_Hess_UT_step_ofc_var4(), FLA_Hess_UT_step_opc_var2(), FLA_Hess_UT_step_opc_var3(), FLA_Hess_UT_step_opc_var4(), FLA_Hess_UT_step_opc_var5(), FLA_Sylv_hh_opc_var1(), FLA_Sylv_hn_opc_var1(), FLA_Sylv_nh_opc_var1(), FLA_Sylv_nn_opc_var1(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_ofc_var3(), FLA_Tridiag_UT_l_step_opc_var1(), FLA_Tridiag_UT_l_step_opc_var2(), and FLA_Tridiag_UT_l_step_opc_var3().

◆ bl1_cdot_in()

void bl1_cdot_in ( conj1_t  conj,
int  n,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex rho 
)
95 {
96  scomplex* xip;
97  scomplex* yip;
98  scomplex xi;
99  scomplex yi;
100  scomplex rho_temp;
101  int i;
102 
103  rho_temp.real = 0.0F;
104  rho_temp.imag = 0.0F;
105 
106  xip = x;
107  yip = y;
108 
109  if ( bl1_is_conj( conj ) )
110  {
111  for ( i = 0; i < n; ++i )
112  {
113  xi.real = xip->real;
114  xi.imag = xip->imag;
115  yi.real = yip->real;
116  yi.imag = yip->imag;
117 
118  rho_temp.real += xi.real * yi.real - -xi.imag * yi.imag;
119  rho_temp.imag += xi.real * yi.imag + -xi.imag * yi.real;
120 
121  xip += incx;
122  yip += incy;
123  }
124  }
125  else // if ( !bl1_is_conj( conj ) )
126  {
127  for ( i = 0; i < n; ++i )
128  {
129  xi.real = xip->real;
130  xi.imag = xip->imag;
131  yi.real = yip->real;
132  yi.imag = yip->imag;
133 
134  rho_temp.real += xi.real * yi.real - xi.imag * yi.imag;
135  rho_temp.imag += xi.real * yi.imag + xi.imag * yi.real;
136 
137  xip += incx;
138  yip += incy;
139  }
140  }
141 
142  rho->real = rho_temp.real;
143  rho->imag = rho_temp.imag;
144 }
int i
Definition: bl1_axmyv2.c:145
Definition: blis_type_defs.h:133
float imag
Definition: blis_type_defs.h:134
float real
Definition: blis_type_defs.h:134

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

Referenced by bl1_cdot().

◆ bl1_ddot()

void bl1_ddot ( conj1_t  conj,
int  n,
double *  x,
int  incx,
double *  y,
int  incy,
double *  rho 
)

◆ bl1_sdot()

void bl1_sdot ( conj1_t  conj,
int  n,
float *  x,
int  incx,
float *  y,
int  incy,
float *  rho 
)

◆ bl1_zdot()

void bl1_zdot ( conj1_t  conj,
int  n,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex rho 
)
66 {
67 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
68  if ( bl1_is_conj( conj ) )
69  {
70  cblas_zdotc_sub( n,
71  x, incx,
72  y, incy,
73  rho );
74  }
75  else // if ( !bl1_is_conj( conj ) )
76  {
77  cblas_zdotu_sub( n,
78  x, incx,
79  y, incy,
80  rho );
81  }
82 #else
83  bl1_zdot_in( conj,
84  n,
85  x, incx,
86  y, incy,
87  rho );
88 #endif
89 }
void bl1_zdot_in(conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *rho)
Definition: bl1_dot.c:146
void cblas_zdotc_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotc)
void cblas_zdotu_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu)

References bl1_is_conj(), bl1_zdot_in(), cblas_zdotc_sub(), cblas_zdotu_sub(), and rho.

Referenced by bl1_zdot2s(), bl1_zdots(), FLA_Bidiag_UT_u_step_ofz_var2(), FLA_Bidiag_UT_u_step_ofz_var3(), FLA_Bidiag_UT_u_step_ofz_var4(), FLA_Bidiag_UT_u_step_opz_var2(), FLA_Bidiag_UT_u_step_opz_var3(), FLA_Bidiag_UT_u_step_opz_var4(), FLA_Bidiag_UT_u_step_opz_var5(), FLA_Dot_external(), FLA_Dotc_external(), FLA_Fused_Ahx_Axpy_Ax_opz_var1(), FLA_Fused_Gerc2_Ahx_Axpy_Ax_opz_var1(), FLA_Fused_UZhu_ZUhu_opz_var1(), FLA_Hess_UT_step_ofz_var2(), FLA_Hess_UT_step_ofz_var3(), FLA_Hess_UT_step_ofz_var4(), FLA_Hess_UT_step_opz_var2(), FLA_Hess_UT_step_opz_var3(), FLA_Hess_UT_step_opz_var4(), FLA_Hess_UT_step_opz_var5(), FLA_Sylv_hh_opz_var1(), FLA_Sylv_hn_opz_var1(), FLA_Sylv_nh_opz_var1(), FLA_Sylv_nn_opz_var1(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_ofz_var3(), FLA_Tridiag_UT_l_step_opz_var1(), FLA_Tridiag_UT_l_step_opz_var2(), and FLA_Tridiag_UT_l_step_opz_var3().

◆ bl1_zdot_in()

void bl1_zdot_in ( conj1_t  conj,
int  n,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex rho 
)
147 {
148  dcomplex* xip;
149  dcomplex* yip;
150  dcomplex xi;
151  dcomplex yi;
152  dcomplex rho_temp;
153  int i;
154 
155  rho_temp.real = 0.0;
156  rho_temp.imag = 0.0;
157 
158  xip = x;
159  yip = y;
160 
161  if ( bl1_is_conj( conj ) )
162  {
163  for ( i = 0; i < n; ++i )
164  {
165  xi.real = xip->real;
166  xi.imag = xip->imag;
167  yi.real = yip->real;
168  yi.imag = yip->imag;
169 
170  rho_temp.real += xi.real * yi.real - -xi.imag * yi.imag;
171  rho_temp.imag += xi.real * yi.imag + -xi.imag * yi.real;
172 
173  xip += incx;
174  yip += incy;
175  }
176  }
177  else // if ( !bl1_is_conj( conj ) )
178  {
179  for ( i = 0; i < n; ++i )
180  {
181  xi.real = xip->real;
182  xi.imag = xip->imag;
183  yi.real = yip->real;
184  yi.imag = yip->imag;
185 
186  rho_temp.real += xi.real * yi.real - xi.imag * yi.imag;
187  rho_temp.imag += xi.real * yi.imag + xi.imag * yi.real;
188 
189  xip += incx;
190  yip += incy;
191  }
192  }
193 
194  rho->real = rho_temp.real;
195  rho->imag = rho_temp.imag;
196 }
Definition: blis_type_defs.h:138
double real
Definition: blis_type_defs.h:139
double imag
Definition: blis_type_defs.h:139

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

Referenced by bl1_zdot().