LIBINT
2.1.0-stable
|
RecurrenceRelation describes all recurrence relations. More...
#include <rr.h>
Public Types | |
typedef RecurrenceRelation | this_type |
typedef AlgebraicOperator< DGVertex > | ExprType |
Numerical expression of a recurrence relation is always expressed as an AlgebraicOperator<DGVertex> | |
Public Member Functions | |
virtual unsigned int | num_children () const =0 |
num_children() returns the actual number of children. More... | |
virtual SafePtr< DGVertex > | rr_child (unsigned int i) const =0 |
Returns i-th child. | |
virtual SafePtr< DGVertex > | rr_target () const =0 |
Returns the target. | |
const SafePtr< ExprType > & | rr_expr () const |
Returns the expression. | |
virtual bool | is_simple () const =0 |
Returns true is this recurrence relation is simple enough to optimize away. More... | |
virtual bool | invariant_type () const |
Returns true is the type of target and all children are exactly the same. | |
virtual int | partindex_direction () const |
size_t | size_of_children () const |
const std::string & | label () const |
label() returns a unique, short, descriptive label of this RR (e.g. More... | |
virtual std::string | description () const |
description() returns a verbose description of this RR | |
virtual void | generate_code (const SafePtr< CodeContext > &context, const SafePtr< ImplicitDimensions > &dims, const std::string &funcname, std::ostream &decl, std::ostream &def) |
Generate declaration and definition for the recurrence relation. | |
virtual void | generate_generic_code (const SafePtr< CodeContext > &context, const SafePtr< ImplicitDimensions > &dims, const std::string &funcname, std::ostream &decl, std::ostream &def) |
Generate declaration and definition for the recurrence relation using generic code (typically, a manually written code) | |
virtual std::string | spfunction_call (const SafePtr< CodeContext > &context, const SafePtr< ImplicitDimensions > &dims) const |
Generate a callback for this recurrence relation. | |
unsigned int | nflops () const |
Return the number of FLOPs per this recurrence relation. | |
void | inst_id (const SingletonStack< RecurrenceRelation, string >::InstanceID &i) |
RecurrenceRelation is managed by SingletonStack but doesn't need to keep track of instance ID. | |
Protected Member Functions | |
void | add_expr (const SafePtr< ExprType > &a, int minus=1) |
Adds a (or -a, if minus = -1) to expr_. | |
virtual std::string | generate_label () const =0 |
Generates the label. | |
template<class RR > | |
bool | register_with_rrstack () |
Registers with the stack. | |
Protected Attributes | |
unsigned int | nflops_ |
std::string | label_ |
SafePtr< ExprType > | expr_ |
RecurrenceRelation describes all recurrence relations.
|
pure virtual |
Returns true is this recurrence relation is simple enough to optimize away.
As a result of such optimization, standalone function will NOT be generated for this recurrence relation. Instead, it's source will be inlined and optimized.
Implemented in libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >, libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >, libint2::IntegralSet_to_Integrals< I >, libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, AuxQuanta >, F, GenIntegralSet_1_1< F, Oper, AuxQuanta > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::CR_11_R1dotR1G12_11< I, BFSet >, libint2::CR_11_R1dotR2G12_11< I, BFSet >, libint2::CR_11_R2dotR2G12_11< I, BFSet >, and libint2::Uncontract_Integral< I >.
const std::string & RecurrenceRelation::label | ( | ) | const |
label() returns a unique, short, descriptive label of this RR (e.g.
"VRR A (p s | 1/r_{12} | d s )" for Obara-Saika recurrence relation applied to center A to compute (ps|ds) ERI)
Referenced by libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >::child().
|
pure virtual |
num_children() returns the actual number of children.
For example, VRR for ERIs has 5 children on the right-hand side, however, for some ERI classes (ss|ps) the actual number may be smaller.
Implemented in libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >, libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >, libint2::IntegralSet_to_Integrals< I >, libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, AuxQuanta >, F, GenIntegralSet_1_1< F, Oper, AuxQuanta > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::CR_11_R1dotR1G12_11< I, BFSet >, libint2::CR_11_R1dotR2G12_11< I, BFSet >, libint2::CR_11_R2dotR2G12_11< I, BFSet >, and libint2::Uncontract_Integral< I >.
|
inlinevirtual |
Reimplemented in libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >.
size_t RecurrenceRelation::size_of_children | ( | ) | const |
References libint2::operator*().