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

Go to the source code of this file.

Functions

RealScalar EIGEN_BLAS_FUNC_NAME() asum (int *n, Scalar *px, int *incx)
 
int EIGEN_CAT (i, EIGEN_BLAS_FUNC_NAME(amax))(int *n
 
if incx make_vector (x, *n).cwiseAbs().maxCoeff(&ret)
 
else make_vector (x, *n, std::abs(*incx)).cwiseAbs().maxCoeff(&ret)
 
return int (ret)+1
 
int EIGEN_CAT (i, EIGEN_BLAS_FUNC_NAME(amin))(int *n
 
Scalar EIGEN_BLAS_FUNC_NAME() dot (int *n, Scalar *px, int *incx, Scalar *py, int *incy)
 
Scalar EIGEN_BLAS_FUNC_NAME() nrm2 (int *n, Scalar *px, int *incx)
 
EIGEN_BLAS_FUNC() rot (int *n, Scalar *px, int *incx, Scalar *py, int *incy, Scalar *pc, Scalar *ps)
 

Variables

int Scalarpx
 
int Scalar intincx
 
Scalarx = reinterpret_cast<Scalar *>(px)
 
Eigen::DenseIndex ret
 

Function Documentation

◆ asum()

RealScalar EIGEN_BLAS_FUNC_NAME() asum ( int n,
Scalar px,
int incx 
)
14  {
15  // std::cerr << "_asum " << *n << " " << *incx << "\n";
16 
17  Scalar *x = reinterpret_cast<Scalar *>(px);
18 
19  if (*n <= 0) return 0;
20 
21  if (*incx == 1)
22  return make_vector(x, *n).cwiseAbs().sum();
23  else
24  return make_vector(x, *n, std::abs(*incx)).cwiseAbs().sum();
25 }
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
SCALAR Scalar
Definition: bench_gemm.cpp:45
Scalar * x
Definition: level1_real_impl.h:29
int Scalar int * incx
Definition: level1_real_impl.h:27
if incx make_vector(x, *n).cwiseAbs().maxCoeff(&ret)
int Scalar * px
Definition: level1_real_impl.h:27

References abs(), incx, make_vector(), n, px, and x.

◆ dot()

Scalar EIGEN_BLAS_FUNC_NAME() dot ( int n,
Scalar px,
int incx,
Scalar py,
int incy 
)
52  {
53  // std::cerr << "_dot " << *n << " " << *incx << " " << *incy << "\n";
54 
55  if (*n <= 0) return 0;
56 
57  Scalar *x = reinterpret_cast<Scalar *>(px);
58  Scalar *y = reinterpret_cast<Scalar *>(py);
59 
60  if (*incx == 1 && *incy == 1)
61  return (make_vector(x, *n).cwiseProduct(make_vector(y, *n))).sum();
62  else if (*incx > 0 && *incy > 0)
63  return (make_vector(x, *n, *incx).cwiseProduct(make_vector(y, *n, *incy))).sum();
64  else if (*incx < 0 && *incy > 0)
65  return (make_vector(x, *n, -*incx).reverse().cwiseProduct(make_vector(y, *n, *incy))).sum();
66  else if (*incx > 0 && *incy < 0)
67  return (make_vector(x, *n, *incx).cwiseProduct(make_vector(y, *n, -*incy).reverse())).sum();
68  else if (*incx < 0 && *incy < 0)
69  return (make_vector(x, *n, -*incx).reverse().cwiseProduct(make_vector(y, *n, -*incy).reverse())).sum();
70  else
71  return 0;
72 }
Scalar * y
Definition: level1_cplx_impl.h:128
int RealScalar int RealScalar int * incy
Definition: level1_cplx_impl.h:124
int RealScalar int RealScalar * py
Definition: level1_cplx_impl.h:124

References incx, incy, make_vector(), n, px, py, x, and y.

Referenced by oomph::FixedVolumeSpineLineMarangoniFluidInterfaceElement< ELEMENT >::add_additional_residual_contributions_interface(), oomph::LinearisedAxisymPoroelasticBJS_FSIElement< FLUID_BULK_ELEMENT, POROELASTICITY_BULK_ELEMENT >::contribution_to_enclosed_volume(), oomph::LineVolumeConstraintBoundingElement::contribution_to_enclosed_volume(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_enclosed_volume(), oomph::AxisymmetricVolumeConstraintBoundingElement::contribution_to_volume_flux(), DataFiles::DataFiles(), EIGEN_DECLARE_TEST(), oomph::PointFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineFluidInterfaceBoundingElement::fill_in_generic_residual_contribution_interface_boundary(), oomph::LineVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::AxisymmetricVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), oomph::SurfaceVolumeConstraintBoundingElement::fill_in_generic_residual_contribution_volume_constraint(), smc.smc::getLikelihood(), Eigen::MatrixBase< Derived >::isUnitary(), smc.smc::recursiveBayesian(), adjoint_specific< true >::run(), adjoint_specific< false >::run(), Eigen::QuaternionBase< Derived >::slerp(), and Eigen::ParametrizedLine< Scalar_, AmbientDim_, Options_ >::squaredDistance().

◆ EIGEN_CAT() [1/2]

int EIGEN_CAT ( i  ,
EIGEN_BLAS_FUNC_NAME(amax  
)

References n.

◆ EIGEN_CAT() [2/2]

int EIGEN_CAT ( i  ,
EIGEN_BLAS_FUNC_NAME(amin  
)

References abs(), incx, int(), make_vector(), n, px, ret, and x.

◆ int()

return int ( ret  )

Referenced by EIGEN_CAT().

◆ make_vector() [1/2]

if incx make_vector ( x  ,
n 
) &

Referenced by asum(), dot(), EIGEN_CAT(), nrm2(), and rot().

◆ make_vector() [2/2]

else make_vector ( x  ,
n,
std::abs incx 
) &

◆ nrm2()

Scalar EIGEN_BLAS_FUNC_NAME() nrm2 ( int n,
Scalar px,
int incx 
)
76  {
77  // std::cerr << "_nrm2 " << *n << " " << *incx << "\n";
78  if (*n <= 0) return 0;
79 
80  Scalar *x = reinterpret_cast<Scalar *>(px);
81 
82  if (*incx == 1)
83  return make_vector(x, *n).stableNorm();
84  else
85  return make_vector(x, *n, std::abs(*incx)).stableNorm();
86 }

References abs(), incx, make_vector(), n, px, and x.

◆ rot()

EIGEN_BLAS_FUNC() rot ( int n,
Scalar px,
int incx,
Scalar py,
int incy,
Scalar pc,
Scalar ps 
)
88  {
89  // std::cerr << "_rot " << *n << " " << *incx << " " << *incy << "\n";
90  if (*n <= 0) return;
91 
92  Scalar *x = reinterpret_cast<Scalar *>(px);
93  Scalar *y = reinterpret_cast<Scalar *>(py);
94  Scalar c = *reinterpret_cast<Scalar *>(pc);
95  Scalar s = *reinterpret_cast<Scalar *>(ps);
96 
99 
102 
103  if (*incx < 0 && *incy > 0)
105  else if (*incx > 0 && *incy < 0)
107  else
109 }
Rotation given by a cosine-sine pair.
Definition: Jacobi.h:38
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
Expression of the reverse of a vector or matrix.
Definition: Reverse.h:65
RealScalar s
Definition: level1_cplx_impl.h:130
StridedVectorType vy(make_vector(y, *n, std::abs(*incy)))
int RealScalar int RealScalar int RealScalar RealScalar * ps
Definition: level1_cplx_impl.h:124
StridedVectorType vx(make_vector(x, *n, std::abs(*incx)))
Eigen::Reverse< StridedVectorType > rvy(vy)
Eigen::Reverse< StridedVectorType > rvx(vx)
int RealScalar int RealScalar int RealScalar * pc
Definition: level1_cplx_impl.h:124
EIGEN_DEVICE_FUNC void apply_rotation_in_the_plane(DenseBase< VectorX > &xpr_x, DenseBase< VectorY > &xpr_y, const JacobiRotation< OtherScalar > &j)
Definition: Jacobi.h:400
int c
Definition: calibrate.py:100

References abs(), Eigen::internal::apply_rotation_in_the_plane(), calibrate::c, incx, incy, make_vector(), n, pc, ps, px, py, rvx(), rvy(), s, vx(), vy(), x, and y.

Referenced by alignedboxNonIntegralRotatable(), alignedboxRotatable(), oomph::SolidHelpers::doc_2D_principal_stress(), Eigen::EulerAngles< Scalar_, _System >::EulerAngles(), hyperplane(), Eigen::MatrixPower< MatrixType >::initialize(), jacobi(), openglsupport_test_loop(), Eigen::EulerAngles< Scalar_, _System >::operator=(), parametrizedline(), Eigen::ComplexSchur< MatrixType_ >::reduceToTriangularForm(), Eigen::internal::svd_precondition_2x2_block_to_be_real< MatrixType, Options, true >::run(), Eigen::RealSchur< MatrixType_ >::splitOffTwoRows(), and Eigen::internal::tridiagonal_qr_step().

Variable Documentation

◆ incx

int Scalar int* incx
Initial value:
{
if (*n <= 0) return 0

Referenced by asum(), dot(), EIGEN_CAT(), nrm2(), and rot().

◆ px

int Scalar* px

Referenced by asum(), dot(), EIGEN_CAT(), nrm2(), and rot().

◆ ret

Referenced by EIGEN_CAT().

◆ x

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

Referenced by asum(), dot(), EIGEN_CAT(), nrm2(), and rot().