DenseLinAlgPack_DVectorOpBLAS.cpp File Reference

#include <algorithm>
#include <functional>
#include <math.h>
#include "DenseLinAlgPack_DVectorClass.hpp"
#include "DenseLinAlgPack_DVectorOp.hpp"
#include "DenseLinAlgPack_BLAS_Cpp.hpp"
#include "DenseLinAlgPack_AssertOp.hpp"

Include dependency graph for DenseLinAlgPack_DVectorOpBLAS.cpp:

Go to the source code of this file.

Defines

#define UNARYOP_VECSLC(LHS, RHS, FUNC)
#define BINARYOP_VECSLC(LHS, RHS1, RHS2, FUNC)
#define BINARYOP_BIND1ST_VECSLC(LHS, RHS1, RHS2, FUNC)
#define BINARYOP_BIND2ND_VECSLC(LHS, RHS1, RHS2, FUNC)
#define UNARYOP_VEC(LHS, RHS, FUNC)
#define BINARYOP_VEC(LHS, RHS1, RHS2, FUNC)
#define BINARYOP_BIND1ST_VEC(LHS, RHS1, RHS2, FUNC)
#define BINARYOP_BIND2ND_VEC(LHS, RHS1, RHS2, FUNC)

Typedefs

typedef DenseLinAlgPack::value_type value_type
typedef DVectorSlice::size_type size_type
typedef DVectorSlice::difference_type difference_type

Functions

template<class T>
my_max (const T &v1, const T &v2)
template<class T>
my_min (const T &v1, const T &v2)
void i_assign (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
value_type local_prod (const value_type &v1, const value_type &v2)
void DenseLinAlgPack::Vp_S (DVectorSlice *vs_lhs, value_type alpha)
 vs_lhs += alpha
void DenseLinAlgPack::Vt_S (DVectorSlice *vs_lhs, value_type alpha)
 vs_lhs *= alpha (BLAS xSCAL) (*** Note that alpha == 0.0 is handeled as vs_lhs = 0.0)
void DenseLinAlgPack::Vp_StV (DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 vs_lhs += alpha * vs_rhs (BLAS xAXPY)
void DenseLinAlgPack::assign (DVectorSlice *vs_lhs, value_type alpha)
 vs_lhs = alpha (elementwise)
void DenseLinAlgPack::assign (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = vs_rhs
void DenseLinAlgPack::V_VpV (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = vs_rhs1 + vs_rhs2
void DenseLinAlgPack::V_VmV (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = vs_rhs1 - vs_rhs2
void DenseLinAlgPack::V_mV (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = - vs_rhs
void DenseLinAlgPack::V_StV (DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 vs_lhs = alpha * vs_rhs
void DenseLinAlgPack::abs (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = abs(vs_rhs)
void DenseLinAlgPack::asin (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = asin(vs_rhs)
void DenseLinAlgPack::acos (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = acos(vs_rhs)
void DenseLinAlgPack::atan (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = atan(vs_rhs)
void DenseLinAlgPack::atan2 (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = atan(vs_rhs1/vs_rhs2)
void DenseLinAlgPack::atan2 (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs, value_type alpha)
 vs_lhs = atan(vs_rhs/alpha)
void DenseLinAlgPack::atan2 (DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 vs_lhs = atan(alpha/vs_rhs)
void DenseLinAlgPack::cos (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = cos(vs_rhs)
void DenseLinAlgPack::cosh (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = cosh(vs_rhs)
void DenseLinAlgPack::exp (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = exp(vs_rhs)
void DenseLinAlgPack::max (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = max(vs_rhs1,vs_rhs2)
void DenseLinAlgPack::max (DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 vs_lhs = max(alpha,vs_rhs)
void DenseLinAlgPack::min (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = min(vs_rhs1,vs_rhs2)
void DenseLinAlgPack::min (DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 vs_lhs = mim(alpha,vs_rhs)
void DenseLinAlgPack::pow (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = pow(vs_rhs1,vs_rhs2)
void DenseLinAlgPack::pow (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs, value_type alpha)
 vs_lhs = pow(vs_rhs,alpha)
void DenseLinAlgPack::pow (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs, int n)
 vs_lhs = pow(vs_rhs,n)
void DenseLinAlgPack::pow (DVectorSlice *vs_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 vs_lhs = pow(alpha,vs_rhs)
void DenseLinAlgPack::prod (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs(i) = vs_rhs1(i) * vs_rhs2(i), i = 1...n
void DenseLinAlgPack::sqrt (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = sqrt(vs_rhs)
void DenseLinAlgPack::sin (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = sin(vs_rhs)
void DenseLinAlgPack::sinh (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = sinh(vs_rhs)
void DenseLinAlgPack::tan (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = tan(vs_rhs)
void DenseLinAlgPack::tanh (DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
 vs_lhs = tanh(vs_rhs)
void DenseLinAlgPack::assign (DVector *v_lhs, value_type alpha)
 v_lhs = alpha (elementwise)
void DenseLinAlgPack::assign (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = vs_rhs.
void DenseLinAlgPack::V_VpV (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = vs_rhs1 + vs_rhs2
void DenseLinAlgPack::V_VmV (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = vs_rhs1 - vs_rhs2
void DenseLinAlgPack::V_mV (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = - vs_rhs
void DenseLinAlgPack::V_StV (DVector *v_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 v_lhs = alpha * vs_rhs
void DenseLinAlgPack::rot (const value_type c, const value_type s, DVectorSlice *x, DVectorSlice *y)
 
void DenseLinAlgPack::abs (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = abs(vs_rhs)
void DenseLinAlgPack::asin (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = asin(vs_rhs)
void DenseLinAlgPack::acos (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = acos(vs_rhs)
void DenseLinAlgPack::atan (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = atan(vs_rhs)
void DenseLinAlgPack::atan2 (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = atan(vs_rhs1/vs_rhs2)
void DenseLinAlgPack::atan2 (DVector *v_lhs, const DVectorSlice &vs_rhs, value_type alpha)
 v_lhs = atan(vs_rhs/alpha)
void DenseLinAlgPack::atan2 (DVector *v_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 v_lhs = atan(alpha/vs_rhs)
void DenseLinAlgPack::cos (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = cos(vs_rhs)
void DenseLinAlgPack::cosh (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = cosh(vs_rhs)
void DenseLinAlgPack::exp (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = exp(vs_rhs)
void DenseLinAlgPack::max (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = max(vs_rhs1,vs_rhs2)
void DenseLinAlgPack::max (DVector *v_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 v_lhs = max(alpha,vs_rhs)
void DenseLinAlgPack::min (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = min(vs_rhs1,vs_rhs2)
void DenseLinAlgPack::min (DVector *v_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 v_lhs = mim(alpha,vs_rhs)
void DenseLinAlgPack::pow (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = pow(vs_rhs1,vs_rhs2)
void DenseLinAlgPack::pow (DVector *v_lhs, const DVectorSlice &vs_rhs, value_type alpha)
 v_lhs = pow(vs_rhs,alpha)
void DenseLinAlgPack::pow (DVector *v_lhs, const DVectorSlice &vs_rhs, int n)
 v_lhs = pow(vs_rhs,n)
void DenseLinAlgPack::pow (DVector *v_lhs, value_type alpha, const DVectorSlice &vs_rhs)
 v_lhs = pow(alpha,vs_rhs)
void DenseLinAlgPack::prod (DVector *v_lhs, const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs(i) = vs_rhs1(i) * vs_rhs2(i), i = 1...n
void DenseLinAlgPack::sqrt (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = sqrt(vs_rhs)
void DenseLinAlgPack::sin (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = sin(vs_rhs)
void DenseLinAlgPack::sinh (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = sinh(vs_rhs)
void DenseLinAlgPack::tan (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = tan(vs_rhs)
void DenseLinAlgPack::tanh (DVector *v_lhs, const DVectorSlice &vs_rhs)
 v_lhs = tanh(vs_rhs)
DenseLinAlgPack::value_type DenseLinAlgPack::dot (const DVectorSlice &vs_rhs1, const DVectorSlice &vs_rhs2)
 result = vs_rhs1' * vs_rhs2 (BLAS xDOT)
DenseLinAlgPack::value_type DenseLinAlgPack::max (const DVectorSlice &vs_rhs)
 result = max(vs_rhs)
DenseLinAlgPack::value_type DenseLinAlgPack::min (const DVectorSlice &vs_rhs)
 result = min(vs_rhs)
DenseLinAlgPack::value_type DenseLinAlgPack::norm_1 (const DVectorSlice &vs_rhs)
 result = ||vs_rhs||1 (BLAS xASUM)
DenseLinAlgPack::value_type DenseLinAlgPack::norm_2 (const DVectorSlice &vs_rhs)
 result = ||vs_rhs||2 (BLAS xNRM2)
DenseLinAlgPack::value_type DenseLinAlgPack::norm_inf (const DVectorSlice &vs_rhs)
 result = ||vs_rhs||infinity (BLAS IxAMAX)
void DenseLinAlgPack::swap (DVectorSlice *vs1, DVectorSlice *vs2)
 swap(vs1, vs2). Swaps the contents of vs1 and vs2


Define Documentation

#define UNARYOP_VECSLC ( LHS,
RHS,
FUNC   ) 

Value:

DenseLinAlgPack::Vp_V_assert_sizes( (LHS)->dim(), (RHS).dim() );                      \
  DVectorSlice::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs;                   \
  for(itr_lhs = LHS->begin(), itr_rhs = RHS.begin(); itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs)     \
  { *itr_lhs = FUNC(*itr_rhs); }

Definition at line 150 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define BINARYOP_VECSLC ( LHS,
RHS1,
RHS2,
FUNC   ) 

Value:

DenseLinAlgPack::VopV_assert_sizes( (RHS1).dim(), (RHS2).dim() );                     \
  DenseLinAlgPack::Vp_V_assert_sizes( (LHS)->dim(), (RHS1).dim() );                     \
  DVectorSlice::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs1, itr_rhs2;              \
  for(itr_lhs = LHS->begin(), itr_rhs1 = RHS1.begin(), itr_rhs2 = RHS2.begin();             \
    itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs1, ++itr_rhs2)                     \
  { *itr_lhs = FUNC(*itr_rhs1, *itr_rhs2); }

Definition at line 157 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define BINARYOP_BIND1ST_VECSLC ( LHS,
RHS1,
RHS2,
FUNC   ) 

Value:

DenseLinAlgPack::Vp_V_assert_sizes( (LHS)->dim(), (RHS2).dim() );                     \
  DVectorSlice::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs2;                  \
  for(itr_lhs = LHS->begin(), itr_rhs2 = RHS2.begin();                          \
    itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs2)                           \
  { *itr_lhs = FUNC(RHS1, *itr_rhs2); }

Definition at line 165 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define BINARYOP_BIND2ND_VECSLC ( LHS,
RHS1,
RHS2,
FUNC   ) 

Value:

DenseLinAlgPack::Vp_V_assert_sizes( (LHS)->dim(), (RHS1).dim());                      \
  DVectorSlice::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs1;                  \
  for(itr_lhs = LHS->begin(), itr_rhs1 = RHS1.begin();                          \
    itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs1)                           \
  { *itr_lhs = FUNC(*itr_rhs1, RHS2); }

Definition at line 172 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define UNARYOP_VEC ( LHS,
RHS,
FUNC   ) 

Value:

LHS->resize(RHS.dim());                                       \
  DVector::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs;                      \
  for(itr_lhs = LHS->begin(), itr_rhs = RHS.begin(); itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs)     \
  { *itr_lhs = FUNC(*itr_rhs); }

Definition at line 322 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define BINARYOP_VEC ( LHS,
RHS1,
RHS2,
FUNC   ) 

Value:

DenseLinAlgPack::assert_vs_sizes(RHS1.dim(), RHS2.dim()); LHS->resize(RHS1.dim());            \
  DVector::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs1, itr_rhs2;               \
  for(itr_lhs = LHS->begin(), itr_rhs1 = RHS1.begin(), itr_rhs2 = RHS2.begin();             \
    itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs1, ++itr_rhs2)                     \
  { *itr_lhs = FUNC(*itr_rhs1, *itr_rhs2); }

Definition at line 328 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define BINARYOP_BIND1ST_VEC ( LHS,
RHS1,
RHS2,
FUNC   ) 

Value:

LHS->resize(RHS2.dim());                                        \
  DVector::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs2;                     \
  for(itr_lhs = LHS->begin(), itr_rhs2 = RHS2.begin();                          \
    itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs2)                           \
  { *itr_lhs = FUNC(RHS1, *itr_rhs2); }

Definition at line 335 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

#define BINARYOP_BIND2ND_VEC ( LHS,
RHS1,
RHS2,
FUNC   ) 

Value:

LHS->resize(RHS1.dim());                                        \
  DVector::iterator itr_lhs; DVectorSlice::const_iterator itr_rhs1;                     \
  for(itr_lhs = LHS->begin(), itr_rhs1 = RHS1.begin();                          \
    itr_lhs != LHS->end(); ++itr_lhs, ++itr_rhs1)                           \
  { *itr_lhs = FUNC(*itr_rhs1, RHS2); }

Definition at line 342 of file DenseLinAlgPack_DVectorOpBLAS.cpp.


Typedef Documentation

typedef DenseLinAlgPack::value_type value_type [static]

Definition at line 43 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

typedef DVectorSlice::size_type size_type [static]

Definition at line 44 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

typedef DVectorSlice::difference_type difference_type [static]

Definition at line 45 of file DenseLinAlgPack_DVectorOpBLAS.cpp.


Function Documentation

template<class T>
T @58::my_max ( const T &  v1,
const T &  v2 
) [inline, static]

Definition at line 50 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

template<class T>
T @58::my_min ( const T &  v1,
const T &  v2 
) [inline, static]

Definition at line 54 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

void @58::i_assign ( DVectorSlice vs_lhs,
const DVectorSlice vs_rhs 
) [static]

Definition at line 57 of file DenseLinAlgPack_DVectorOpBLAS.cpp.

value_type @58::local_prod ( const value_type v1,
const value_type v2 
) [inline, static]

Definition at line 75 of file DenseLinAlgPack_DVectorOpBLAS.cpp.


Generated on Tue Oct 20 12:52:43 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7