MOAB  4.9.3pre
Eigen::internal::nested_eval< T, n, PlainObject > Struct Template Reference

#include <XprHelper.h>

Inheritance diagram for Eigen::internal::nested_eval< T, n, PlainObject >:

List of all members.

Public Types

enum  {
  ScalarReadCost = NumTraits<typename traits<T>::Scalar>::ReadCost, CoeffReadCost = evaluator<T>::CoeffReadCost, NAsInteger = n == Dynamic ? HugeCost : n, CostEval = (NAsInteger+1) * ScalarReadCost + CoeffReadCost,
  CostNoEval = NAsInteger * CoeffReadCost
}

Detailed Description

template<typename T, int n, typename PlainObject = typename plain_object_eval<T>::type>
struct Eigen::internal::nested_eval< T, n, PlainObject >

Determines how a given expression should be nested when evaluated multiple times. For example, when you do a * (b+c), Eigen will determine how the expression b+c should be evaluated into the bigger product expression. The choice is between nesting the expression b+c as-is, or evaluating that expression b+c into a temporary variable d, and nest d so that the resulting expression is a*d. Evaluating can be beneficial for example if every coefficient access in the resulting expression causes many coefficient accesses in the nested expressions -- as is the case with matrix product for example.

Template Parameters:
Tthe type of the expression being nested.
nthe number of coefficient accesses in the nested expression for each coefficient access in the bigger expression.
PlainObjectthe type of the temporary if needed.

Definition at line 397 of file XprHelper.h.


Member Enumeration Documentation

template<typename T, int n, typename PlainObject = typename plain_object_eval<T>::type>
anonymous enum
Enumerator:
ScalarReadCost 
CoeffReadCost 
NAsInteger 
CostEval 
CostNoEval 

Definition at line 399 of file XprHelper.h.

       {
    ScalarReadCost = NumTraits<typename traits<T>::Scalar>::ReadCost,
    CoeffReadCost = evaluator<T>::CoeffReadCost,  // NOTE What if an evaluator evaluate itself into a tempory?
                                                  //      Then CoeffReadCost will be small (e.g., 1) but we still have to evaluate, especially if n>1.
                                                  //      This situation is already taken care by the EvalBeforeNestingBit flag, which is turned ON
                                                  //      for all evaluator creating a temporary. This flag is then propagated by the parent evaluators.
                                                  //      Another solution could be to count the number of temps?
    NAsInteger = n == Dynamic ? HugeCost : n,
    CostEval   = (NAsInteger+1) * ScalarReadCost + CoeffReadCost,
    CostNoEval = NAsInteger * CoeffReadCost
  };

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines