level2_real_impl.h File Reference
#include "common.h"

Go to the source code of this file.

Functions

 if (UPLO(*uplo)==INVALID) info
 
else iflda (1, *n)) info=5;else if(*incx==0) info=7;else if(*incy==0) info=10;if(info) return xerbla_(SCALAR_SUFFIX_UP "SYMV ", &info
 
 if (beta !=Scalar(1))
 
 if (code >=2||func[code]==0) return
 
 if (actual_x !=x) delete[] actual_x
 
 if (actual_y !=y) delete[] copy_back(actual_y
 
else ifldc (1, *n)) info=7;if(info) return xerbla_(SCALAR_SUFFIX_UP "SYR ", &info
 
ifn (0)) return;const Scalar *x_cpy=get_compact_vector(x, *n, *incx
 
 if (x_cpy !=x) delete[] x_cpy
 
 if (alpha==Scalar(0)) return
 
 if (y_cpy !=y) delete[] y_cpy
 
EIGEN_BLAS_FUNC() spr (char *uplo, int *n, Scalar *palpha, Scalar *px, int *incx, Scalar *pap)
 
 if (info) return xerbla_(SCALAR_SUFFIX_UP "SPR2 "
 

Variables

const charuplo
 
const char const intn
 
const char const int const RealScalarpalpha
 
const char const int const RealScalar const RealScalarpa
 
const char const int const RealScalar const RealScalar const intlda
 
const char const int const RealScalar const RealScalar const int const RealScalarpx
 
const char const int const RealScalar const RealScalar const int const RealScalar const intincx
 
const char const int const RealScalar const RealScalar const int const RealScalar const int const RealScalarpbeta
 
const char const int const RealScalar const RealScalar const int const RealScalar const int const RealScalar RealScalarpy
 
const char const int const RealScalar const RealScalar const int const RealScalar const int const RealScalar RealScalar const intincy
 
static const functype func [2]
 
const Scalara = reinterpret_cast<const Scalar *>(pa)
 
const Scalarx = reinterpret_cast<const Scalar *>(px)
 
Scalary = reinterpret_cast<Scalar *>(py)
 
Scalar alpha = *reinterpret_cast<const Scalar *>(palpha)
 
Scalar beta = *reinterpret_cast<const Scalar *>(pbeta)
 
int info = 0
 
if n return
 
const Scalaractual_x = get_compact_vector(x, *n, *incx)
 
Scalaractual_y = get_compact_vector(y, *n, *incy)
 
int code = UPLO(*uplo)
 
const char const int const RealScalar const RealScalar const int RealScalarpc
 
const char const int const RealScalar const RealScalar const int RealScalar const intldc
 
Scalarc = reinterpret_cast<Scalar *>(pc)
 
const Scalarx_cpy = get_compact_vector(x, *n, *incx)
 
const Scalary_cpy = get_compact_vector(y, *n, *incy)
 
char int RealScalar RealScalar int RealScalar int RealScalarpap
 
Scalarap = reinterpret_cast<Scalar *>(pap)
 
intm
 

Function Documentation

◆ if() [1/9]

if ( actual_x = x)

◆ if() [2/9]

if ( actual_y = y)

◆ if() [3/9]

if ( alpha  = =Scalar(0))

◆ if() [4/9]

if ( beta = Scalar(1))
52  {
53  if (beta == Scalar(0))
54  make_vector(actual_y, *n).setZero();
55  else
56  make_vector(actual_y, *n) *= beta;
57  }
SCALAR Scalar
Definition: bench_gemm.cpp:45
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
const char const int * n
Definition: level2_real_impl.h:14
Scalar * actual_y
Definition: level2_real_impl.h:50
Scalar beta
Definition: level2_real_impl.h:31

References actual_y, beta, make_vector(), and n.

◆ if() [5/9]

if ( code >=2||  func[code] = =0)

◆ if() [6/9]

if ( info  )

◆ if() [7/9]

if ( UPLO uplo = =INVALID)
428  {
429  matA.triangularView<Upper>() = matrix(a, size, size, *lda);
430  matA.triangularView<Lower>() = matrix(a, size, size, *lda).transpose();
431  } else if (UPLO(*uplo) == LO) {
#define UPLO(X)
Definition: common.h:59
#define LO
Definition: common.h:47
@ Lower
Definition: Constants.h:211
@ Upper
Definition: Constants.h:213
matrix(b, *m, *n, *ldb).setZero()
const char const char const int const int const int const RealScalar const RealScalar const int * lda
Definition: level3_impl.h:14
int size
Definition: level3_impl.h:418
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > matA(size, size)
const char const char * uplo
Definition: level3_impl.h:101
const Scalar * a
Definition: level3_impl.h:57

◆ if() [8/9]

if ( x_cpy = x)

◆ if() [9/9]

if ( y_cpy = y)

◆ lda()

else if* lda ( ,
n 
) &

◆ ldc()

else if* ldc ( ,
n 
) &

◆ n()

if* n ( ) const

◆ spr()

EIGEN_BLAS_FUNC() spr ( char uplo,
int n,
Scalar palpha,
Scalar px,
int incx,
Scalar pap 
)

DSBMV performs the matrix-vector operation

y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and A is an n by n symmetric band matrix, with k super-diagonals. DSPMV performs the matrix-vector operation

y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and A is an n by n symmetric matrix, supplied in packed form. DSPR performs the symmetric rank 1 operation

A := alpha*x*x' + A,

where alpha is a real scalar, x is an n element vector and A is an n by n symmetric matrix, supplied in packed form.

195  {
196  typedef void (*functype)(int, Scalar *, const Scalar *, Scalar);
197  static const functype func[2] = {
198  // array index: UP
200  // array index: LO
202  };
203 
204  Scalar *x = reinterpret_cast<Scalar *>(px);
205  Scalar *ap = reinterpret_cast<Scalar *>(pap);
206  Scalar alpha = *reinterpret_cast<Scalar *>(palpha);
207 
208  int info = 0;
209  if (UPLO(*uplo) == INVALID)
210  info = 1;
211  else if (*n < 0)
212  info = 2;
213  else if (*incx == 0)
214  info = 5;
215  if (info) return xerbla_(SCALAR_SUFFIX_UP "SPR ", &info);
216 
217  if (alpha == Scalar(0)) return;
218 
220 
221  int code = UPLO(*uplo);
222  if (code >= 2 || func[code] == 0) return;
223 
224  func[code](*n, ap, x_cpy, alpha);
225 
226  if (x_cpy != x) delete[] x_cpy;
227 }
#define SCALAR_SUFFIX_UP
Definition: blas/complex_double.cpp:12
T * get_compact_vector(T *x, int n, int incx)
Definition: common.h:124
#define INVALID
Definition: common.h:52
return int(ret)+1
const char const int const RealScalar * palpha
Definition: level2_real_impl.h:14
const Scalar * x_cpy
Definition: level2_real_impl.h:143
const Scalar * x
Definition: level2_real_impl.h:28
const char const int const RealScalar const RealScalar const int const RealScalar * px
Definition: level2_real_impl.h:14
int code
Definition: level2_real_impl.h:59
int info
Definition: level2_real_impl.h:34
const char * uplo
Definition: level2_real_impl.h:14
Scalar * ap
Definition: level2_real_impl.h:248
const char const int const RealScalar const RealScalar const int const RealScalar const int * incx
Definition: level2_real_impl.h:15
Scalar alpha
Definition: level2_real_impl.h:30
char int RealScalar RealScalar int RealScalar int RealScalar * pap
Definition: level2_real_impl.h:237
void(* functype)(DenseIndex, DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, Scalar, Eigen::internal::level3_blocking< Scalar, Scalar > &, Eigen::internal::GemmParallelInfo< DenseIndex > *)
Definition: level3_impl.h:22
Definition: PackedSelfadjointProduct.h:20
Definition: benchGeometry.cpp:21
EIGEN_WEAK_LINKING void xerbla_(const char *msg, int *info)
Definition: xerbla.cpp:14

References alpha, ap, code, get_compact_vector(), incx, info, int(), INVALID, n, palpha, pap, px, SCALAR_SUFFIX_UP, UPLO, uplo, x, x_cpy, and xerbla_().

Variable Documentation

◆ a

Scalar* a = reinterpret_cast<const Scalar *>(pa)

◆ actual_x

const Scalar* actual_x = get_compact_vector(x, *n, *incx)

◆ actual_y

Scalar* actual_y = get_compact_vector(y, *n, *incy)

Referenced by if().

◆ alpha

Scalar alpha = *reinterpret_cast<const Scalar *>(palpha)

Referenced by spr().

◆ ap

Scalar* ap = reinterpret_cast<Scalar *>(pap)

Referenced by spr().

◆ beta

Scalar beta = *reinterpret_cast<const Scalar *>(pbeta)

Referenced by if().

◆ c

Scalar* c = reinterpret_cast<Scalar *>(pc)

◆ code

int code = UPLO(*uplo)

Referenced by spr().

◆ func

◆ incx

Referenced by spr().

◆ incy

Initial value:
{
typedef void (*functype)(int, const Scalar *, int, const Scalar *, Scalar *, Scalar)

◆ info

else if incy info = 0

Referenced by spr().

◆ lda

Initial value:
{
Scalar *x = reinterpret_cast<Scalar *>(px)

◆ ldc

const char const char const int const int const RealScalar const RealScalar const int const RealScalar const int const RealScalar RealScalar const int * ldc
Initial value:
{
typedef void (*functype)(int, Scalar *, int, const Scalar *, const Scalar *, const Scalar &)

Referenced by Eigen::internal::gemm_kern_avx512().

◆ m

DGER performs the rank 1 operation

A := alpha*x*y' + A,

where alpha is a scalar, x is an m element vector, y is an n element vector and A is an m by n matrix.

◆ n

int int* n

Referenced by if(), and spr().

◆ pa

◆ palpha

int int Scalar* palpha

Referenced by spr().

◆ pap

Initial value:
{
typedef void (*functype)(int, Scalar *, const Scalar *, const Scalar *, Scalar)

Referenced by spr().

◆ pbeta

const char const int const RealScalar const RealScalar const int const RealScalar const int const RealScalar* pbeta

◆ pc

const char const int const RealScalar const RealScalar const int const RealScalar const int RealScalar* pc

◆ px

Referenced by spr().

◆ py

◆ return

if n return

◆ uplo

char* uplo

DSPR2 performs the symmetric rank 2 operation

A := alpha*x*y' + alpha*y*x' + A,

where alpha is a scalar, x and y are n element vectors and A is an n by n symmetric matrix, supplied in packed form.

Referenced by spr().

◆ x

Scalar* x = reinterpret_cast<const Scalar *>(px)

Referenced by spr().

◆ x_cpy

Scalar* x_cpy = get_compact_vector(x, *n, *incx)

Referenced by spr().

◆ y

Scalar* y = reinterpret_cast<Scalar *>(py)

◆ y_cpy

Scalar* y_cpy = get_compact_vector(y, *n, *incy)