blas/double.cpp File Reference
#include "level1_impl.h"
#include "level1_real_impl.h"
#include "level2_impl.h"
#include "level2_real_impl.h"
#include "level3_impl.h"

Macros

#define SCALAR   double
 
#define SCALAR_SUFFIX   d
 
#define SCALAR_SUFFIX_UP   "D"
 
#define ISCOMPLEX   0
 

Functions

double EIGEN_BLAS_FUNC_NAME() sdot (int *n, float *x, int *incx, float *y, int *incy)
 

Macro Definition Documentation

◆ ISCOMPLEX

#define ISCOMPLEX   0

◆ SCALAR

#define SCALAR   double

◆ SCALAR_SUFFIX

#define SCALAR_SUFFIX   d

◆ SCALAR_SUFFIX_UP

#define SCALAR_SUFFIX_UP   "D"

Function Documentation

◆ sdot()

double EIGEN_BLAS_FUNC_NAME() sdot ( int n,
float *  x,
int incx,
float *  y,
int incy 
)
22  {
23  if (*n <= 0) return 0;
24 
25  if (*incx == 1 && *incy == 1)
26  return (make_vector(x, *n).cast<double>().cwiseProduct(make_vector(y, *n).cast<double>())).sum();
27  else if (*incx > 0 && *incy > 0)
28  return (make_vector(x, *n, *incx).cast<double>().cwiseProduct(make_vector(y, *n, *incy).cast<double>())).sum();
29  else if (*incx < 0 && *incy > 0)
30  return (make_vector(x, *n, -*incx).reverse().cast<double>().cwiseProduct(make_vector(y, *n, *incy).cast<double>()))
31  .sum();
32  else if (*incx > 0 && *incy < 0)
33  return (make_vector(x, *n, *incx).cast<double>().cwiseProduct(make_vector(y, *n, -*incy).reverse().cast<double>()))
34  .sum();
35  else if (*incx < 0 && *incy < 0)
36  return (make_vector(x, *n, -*incx)
37  .reverse()
38  .cast<double>()
39  .cwiseProduct(make_vector(y, *n, -*incy).reverse().cast<double>()))
40  .sum();
41  else
42  return 0;
43 }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
void reverse(const MatrixType &m)
Definition: array_reverse.cpp:17
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 >, 0, Eigen::InnerStride< Eigen::Dynamic > > make_vector(T *data, int size, int incr)
Definition: common.h:99
Scalar * y
Definition: level1_cplx_impl.h:128
int RealScalar int RealScalar int * incy
Definition: level1_cplx_impl.h:124
RealScalar RealScalar int * incx
Definition: level1_cplx_impl.h:27
list x
Definition: plotDoE.py:28

References incx, incy, make_vector(), n, plotDoE::x, and y.