|
LIBINT 2.7.2
|
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. More... | |
| virtual SafePtr< DGVertex > | rr_target () const =0 |
| Returns the target. More... | |
| 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. More... | |
| virtual int | partindex_direction () const |
| virtual BraketDirection | braket_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. More... | |
| unsigned int | nflops () const |
| Return the number of FLOPs per this recurrence relation. | |
| void | inst_id (const SingletonStack< RecurrenceRelation, std::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. More... | |
| 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.
|
inlinevirtual |
Reimplemented in libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >.
|
protectedpure virtual |
Generates the label.
Implemented in libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where, -1, InBra >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, EmptySet >, F, GenIntegralSet_1_1< F, Oper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, and libint2::GenericRecurrenceRelation< VRR_1_SMultipole_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, SphericalMultipoleOper, EmptySet > >.
Referenced by label().
|
virtual |
Returns true is the type of target and all children are exactly the same.
Reimplemented in libint2::IntegralSet_to_Integrals< I >.
|
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::CR_11_R1dotR1G12_11< I, BFSet >, libint2::CR_11_R1dotR2G12_11< I, BFSet >, libint2::CR_11_R2dotR2G12_11< I, BFSet >, libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where, -1, InBra >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, EmptySet >, F, GenIntegralSet_1_1< F, Oper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_SMultipole_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, SphericalMultipoleOper, EmptySet > >, libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >, libint2::IntegralSet_to_Integrals< I >, libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >, 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)
References generate_label().
Referenced by description(), generate_code(), and spfunction_call().
|
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::CR_11_R1dotR1G12_11< I, BFSet >, libint2::CR_11_R1dotR2G12_11< I, BFSet >, libint2::CR_11_R2dotR2G12_11< I, BFSet >, libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where, -1, InBra >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, EmptySet >, F, GenIntegralSet_1_1< F, Oper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_SMultipole_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, SphericalMultipoleOper, EmptySet > >, libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >, libint2::IntegralSet_to_Integrals< I >, libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >, and libint2::Uncontract_Integral< I >.
Referenced by size_of_children(), and spfunction_call().
|
inlinevirtual |
from to particle to where from < to , -1 if from > to , and 0 if neither Reimplemented in libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >.
|
pure virtual |
Returns i-th child.
Implemented in libint2::CR_11_R1dotR1G12_11< I, BFSet >, libint2::CR_11_R1dotR2G12_11< I, BFSet >, libint2::CR_11_R2dotR2G12_11< I, BFSet >, libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where, -1, InBra >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, EmptySet >, F, GenIntegralSet_1_1< F, Oper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_SMultipole_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, SphericalMultipoleOper, EmptySet > >, libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >, libint2::IntegralSet_to_Integrals< I >, libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >, and libint2::Uncontract_Integral< I >.
Referenced by size_of_children(), and spfunction_call().
|
pure virtual |
Returns the target.
Implemented in libint2::CR_11_R1dotR1G12_11< I, BFSet >, libint2::CR_11_R1dotR2G12_11< I, BFSet >, libint2::CR_11_R2dotR2G12_11< I, BFSet >, libint2::GenericRecurrenceRelation< RRImpl, F, Target >, libint2::GenericRecurrenceRelation< CR_11_DivG12prime_xTx_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, DivG12prime_xTx, mType > >, libint2::GenericRecurrenceRelation< CR_11_G12TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, G12TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_11_GTG_11_1d< Axis >, CGShell1d< Axis >, GenIntegralSet_11_11< CGShell1d< Axis >, GTG_1d, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_R12kR12lG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, R12kR12lG12, EmptySet > >, libint2::GenericRecurrenceRelation< CR_11_TiG12_11< BFSet >, BFSet, GenIntegralSet_11_11< BFSet, TiG12, mType > >, libint2::GenericRecurrenceRelation< CR_DerivGauss< IntType, part, where, -1, InBra >, IntType::BasisFunctionType, IntType >, libint2::GenericRecurrenceRelation< CR_XYZ_1_1< F, Oper, EmptySet >, F, GenIntegralSet_1_1< F, Oper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_11_R12kG12_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, R12kG12, mType > >, libint2::GenericRecurrenceRelation< VRR_11_TwoPRep_11< BFSet, part, where >, BFSet, GenIntegralSet_11_11< BFSet, TwoPRep, mType > >, libint2::GenericRecurrenceRelation< VRR_1_ElecPot_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, ElecPotOper, mType > >, libint2::GenericRecurrenceRelation< VRR_1_Kinetic_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, KineticOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_Overlap_1_1d< Axis, where >, CGF1d< Axis >, GenIntegralSet_1_1< CGF1d< Axis >, OverlapOper, EmptySet > >, libint2::GenericRecurrenceRelation< VRR_1_SMultipole_1< BFSet, where >, BFSet, GenIntegralSet_1_1< BFSet, SphericalMultipoleOper, EmptySet > >, libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >, libint2::IntegralSet_to_Integrals< I >, libint2::ITR_11_TwoPRep_11< ERI, BFSet, part, where >, and libint2::Uncontract_Integral< I >.
Referenced by generate_code(), generate_generic_code(), and spfunction_call().
| size_t RecurrenceRelation::size_of_children | ( | ) | const |
References num_children(), and rr_child().
|
virtual |
Generate a callback for this recurrence relation.
Reimplemented in libint2::HRR< IntType, BFSet, part, loc_a, pos_a, loc_b, pos_b >.
References label(), libint2::label_to_funcname(), num_children(), rr_child(), and rr_target().