Public Member Functions | |
~EvalVector () | |
Static Public Member Functions | |
static double & | totalFlops () |
Private Member Functions | |
EvalVector (TempStack *s) | |
EvalVector (TempStack *s, const RCP< Array< double > > &data, const std::string &str) | |
Static Private Member Functions | |
static void | addFlops (const double &flops) |
Private Attributes | |
TempStack * | s_ |
RCP< Array< double > > | data_ |
std::string | str_ |
Friends | |
class | EvalManager |
class | TempStack |
Mathematical operations | |
void | add_SV (const double &alpha, const EvalVector *B) |
void | add_SVV (const double &alpha, const EvalVector *B, const EvalVector *C) |
void | add_V (const EvalVector *A) |
void | add_S (const double &alpha) |
void | add_VV (const EvalVector *A, const EvalVector *B) |
void | multiply_S_add_SV (const double &alpha, const double &beta, const EvalVector *C) |
void | multiply_S_add_S (const double &alpha, const double &beta) |
void | multiply_V_add_VVV (const EvalVector *A, const EvalVector *B, const EvalVector *C, const EvalVector *D) |
void | multiply_V_add_SVV (const EvalVector *A, const double &beta, const EvalVector *C, const EvalVector *D) |
void | multiply_V_add_SV (const EvalVector *A, const double &beta, const EvalVector *C) |
void | multiply_VV (const EvalVector *A, const EvalVector *B) |
void | multiply_SV (const double &alpha, const EvalVector *B) |
void | multiply_V (const EvalVector *A) |
void | multiply_S (const double &alpha) |
void | setTo_S_add_SVV (const double &alpha, const double &beta, const EvalVector *C, const EvalVector *D) |
void | setTo_S_add_VV (const double &alpha, const EvalVector *B, const EvalVector *C) |
void | setTo_S_add_SV (const double &alpha, const double &beta, const EvalVector *C) |
void | setTo_S_add_V (const double &alpha, const EvalVector *B) |
void | setTo_V (const EvalVector *A) |
void | setTo_VV (const EvalVector *A, const EvalVector *B) |
void | setTo_SV (const double &alpha, const EvalVector *B) |
void | setTo_SVV (const double &alpha, const EvalVector *B, const EvalVector *C) |
void | setToConstant (const double &alpha) |
void | applyUnaryOperator (const UnaryFunctor *func, Array< RCP< EvalVector > > &opDerivs) |
RCP< EvalVector > | clone () const |
void | resize (int n) |
int | length () const |
void | print (std::ostream &os) const |
const double * | start () const |
double * | start () |
const std::string & | str () const |
void | setString (const std::string &str) |
bool | isValid () const |
static bool & | shadowOps () |
Definition at line 49 of file SundanceEvalVector.hpp.
EvalVector::EvalVector | ( | TempStack * | s | ) | [private] |
Definition at line 46 of file SundanceEvalVector.cpp.
References data_, and Sundance::TempStack::vecSize().
Referenced by clone().
EvalVector::EvalVector | ( | TempStack * | s, | |
const RCP< Array< double > > & | data, | |||
const std::string & | str | |||
) | [private] |
EvalVector::~EvalVector | ( | ) |
EvalVector has a nontrivial destructor. Upon destruction, the vector's underlying data object is not destroyed, but rather is put back on the stack of temporary vectors.
Definition at line 76 of file SundanceEvalVector.cpp.
References data_, Sundance::TempStack::pushVectorData(), and s_.
void EvalVector::add_S | ( | const double & | alpha | ) |
Definition at line 136 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().
void EvalVector::add_SV | ( | const double & | alpha, | |
const EvalVector * | B | |||
) |
Definition at line 109 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().
void EvalVector::add_SVV | ( | const double & | alpha, | |
const EvalVector * | B, | |||
const EvalVector * | C | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 185 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::add_V | ( | const EvalVector * | A | ) |
Definition at line 161 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), and str_.
void EvalVector::add_VV | ( | const EvalVector * | A, | |
const EvalVector * | B | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 213 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), and str_.
static void Sundance::EvalVector::addFlops | ( | const double & | flops | ) | [inline, static, private] |
Definition at line 314 of file SundanceEvalVector.hpp.
References totalFlops().
Referenced by add_S(), add_SV(), add_SVV(), add_V(), add_VV(), multiply_S(), multiply_S_add_S(), multiply_S_add_SV(), multiply_SV(), multiply_V(), multiply_V_add_SV(), multiply_V_add_SVV(), multiply_V_add_VVV(), multiply_VV(), setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), and setTo_VV().
void EvalVector::applyUnaryOperator | ( | const UnaryFunctor * | func, | |
Array< RCP< EvalVector > > & | opDerivs | |||
) |
Apply a unary function
Definition at line 722 of file SundanceEvalVector.cpp.
References data_, Sundance::UnaryFunctor::eval0(), Sundance::UnaryFunctor::eval1(), Sundance::UnaryFunctor::eval2(), Sundance::UnaryFunctor::name(), Sundance::TempStack::popVector(), s_, shadowOps(), start(), and str().
RCP< EvalVector > EvalVector::clone | ( | ) | const |
Definition at line 88 of file SundanceEvalVector.cpp.
References data_, EvalVector(), s_, and str_.
Referenced by Sundance::ChainRuleSum::evalVar().
bool Sundance::EvalVector::isValid | ( | ) | const [inline] |
int Sundance::EvalVector::length | ( | ) | const [inline] |
void EvalVector::multiply_S | ( | const double & | alpha | ) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 475 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().
void EvalVector::multiply_S_add_S | ( | const double & | alpha, | |
const double & | beta | |||
) |
Scale and add a constant to this vector. The operation is done in-place, overwriting the old values of the vector. Each element x[i] is updated as:
Definition at line 270 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().
void EvalVector::multiply_S_add_SV | ( | const double & | alpha, | |
const double & | beta, | |||
const EvalVector * | C | |||
) |
Perform a scaled addition with another vector,
The operation is done in-place, overwriting the old values of the vector.
Definition at line 241 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str_, and Sundance::toString().
void EvalVector::multiply_SV | ( | const double & | alpha, | |
const EvalVector * | B | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 450 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::multiply_V | ( | const EvalVector * | A | ) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 296 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), and str_.
void EvalVector::multiply_V_add_SV | ( | const EvalVector * | A, | |
const double & | beta, | |||
const EvalVector * | C | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 396 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::multiply_V_add_SVV | ( | const EvalVector * | A, | |
const double & | beta, | |||
const EvalVector * | C, | |||
const EvalVector * | D | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 351 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::multiply_V_add_VVV | ( | const EvalVector * | A, | |
const EvalVector * | B, | |||
const EvalVector * | C, | |||
const EvalVector * | D | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 319 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), and str_.
void EvalVector::multiply_VV | ( | const EvalVector * | A, | |
const EvalVector * | B | |||
) |
Perform the operation
which shows up in the chain rule expansion of a second derivative.
Definition at line 424 of file SundanceEvalVector.cpp.
References addFlops(), data_, shadowOps(), start(), str(), and str_.
void EvalVector::print | ( | std::ostream & | os | ) | const |
Definition at line 783 of file SundanceEvalVector.cpp.
References data_, shadowOps(), and str_.
Referenced by std::operator<<().
void EvalVector::resize | ( | int | n | ) |
Definition at line 82 of file SundanceEvalVector.cpp.
References data_.
Referenced by setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), setTo_V(), and setTo_VV().
void Sundance::EvalVector::setString | ( | const std::string & | str | ) | [inline] |
void EvalVector::setTo_S_add_SV | ( | const double & | alpha, | |
const double & | beta, | |||
const EvalVector * | C | |||
) |
Definition at line 556 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::setTo_S_add_SVV | ( | const double & | alpha, | |
const double & | beta, | |||
const EvalVector * | C, | |||
const EvalVector * | D | |||
) |
Definition at line 498 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::setTo_S_add_V | ( | const double & | alpha, | |
const EvalVector * | B | |||
) |
Definition at line 586 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::setTo_S_add_VV | ( | const double & | alpha, | |
const EvalVector * | B, | |||
const EvalVector * | C | |||
) |
Definition at line 528 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::setTo_SV | ( | const double & | alpha, | |
const EvalVector * | B | |||
) |
Definition at line 695 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::setTo_SVV | ( | const double & | alpha, | |
const EvalVector * | B, | |||
const EvalVector * | C | |||
) |
Definition at line 638 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), str_, and Sundance::toString().
void EvalVector::setTo_V | ( | const EvalVector * | A | ) |
Definition at line 613 of file SundanceEvalVector.cpp.
References data_, resize(), shadowOps(), start(), str(), and str_.
void EvalVector::setTo_VV | ( | const EvalVector * | A, | |
const EvalVector * | B | |||
) |
Definition at line 667 of file SundanceEvalVector.cpp.
References addFlops(), data_, resize(), shadowOps(), start(), str(), and str_.
void EvalVector::setToConstant | ( | const double & | alpha | ) |
Set every element to a constant value
Definition at line 93 of file SundanceEvalVector.cpp.
References data_, shadowOps(), str_, and Teuchos::toString().
static bool& Sundance::EvalVector::shadowOps | ( | ) | [inline, static] |
Definition at line 303 of file SundanceEvalVector.hpp.
Referenced by add_S(), add_SV(), add_SVV(), add_V(), add_VV(), applyUnaryOperator(), Sundance::CurveNormEvaluator::internalEval(), Sundance::CellDiameterExprEvaluator::internalEval(), multiply_S(), multiply_S_add_S(), multiply_S_add_SV(), multiply_SV(), multiply_V(), multiply_V_add_SV(), multiply_V_add_SVV(), multiply_V_add_VVV(), multiply_VV(), print(), setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), setTo_V(), setTo_VV(), and setToConstant().
double* Sundance::EvalVector::start | ( | ) | [inline] |
Definition at line 297 of file SundanceEvalVector.hpp.
const double* Sundance::EvalVector::start | ( | ) | const [inline] |
Definition at line 294 of file SundanceEvalVector.hpp.
Referenced by add_S(), add_SV(), add_SVV(), add_V(), add_VV(), applyUnaryOperator(), multiply_S(), multiply_S_add_S(), multiply_S_add_SV(), multiply_SV(), multiply_V(), multiply_V_add_SV(), multiply_V_add_SVV(), multiply_V_add_VVV(), multiply_VV(), setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), setTo_V(), and setTo_VV().
const std::string& Sundance::EvalVector::str | ( | ) | const [inline] |
Definition at line 299 of file SundanceEvalVector.hpp.
References str_.
Referenced by add_SVV(), add_VV(), applyUnaryOperator(), multiply_SV(), multiply_V(), multiply_V_add_SV(), multiply_V_add_SVV(), multiply_V_add_VVV(), multiply_VV(), setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), setTo_V(), and setTo_VV().
static double& Sundance::EvalVector::totalFlops | ( | ) | [inline, static] |
friend class EvalManager [friend] |
Definition at line 52 of file SundanceEvalVector.hpp.
friend class TempStack [friend] |
Definition at line 53 of file SundanceEvalVector.hpp.
RCP<Array<double> > Sundance::EvalVector::data_ [private] |
Definition at line 318 of file SundanceEvalVector.hpp.
Referenced by add_S(), add_SV(), add_SVV(), add_V(), add_VV(), applyUnaryOperator(), clone(), EvalVector(), isValid(), length(), multiply_S(), multiply_S_add_S(), multiply_S_add_SV(), multiply_SV(), multiply_V(), multiply_V_add_SV(), multiply_V_add_SVV(), multiply_V_add_VVV(), multiply_VV(), print(), resize(), setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), setTo_V(), setTo_VV(), setToConstant(), and ~EvalVector().
TempStack* Sundance::EvalVector::s_ [mutable, private] |
Definition at line 316 of file SundanceEvalVector.hpp.
Referenced by applyUnaryOperator(), clone(), isValid(), and ~EvalVector().
std::string Sundance::EvalVector::str_ [private] |
Definition at line 320 of file SundanceEvalVector.hpp.
Referenced by add_S(), add_SV(), add_SVV(), add_V(), add_VV(), clone(), multiply_S(), multiply_S_add_S(), multiply_S_add_SV(), multiply_SV(), multiply_V(), multiply_V_add_SV(), multiply_V_add_SVV(), multiply_V_add_VVV(), multiply_VV(), print(), setString(), setTo_S_add_SV(), setTo_S_add_SVV(), setTo_S_add_V(), setTo_S_add_VV(), setTo_SV(), setTo_SVV(), setTo_V(), setTo_VV(), setToConstant(), and str().