FAUST compiler  0.9.9.6b8
Public Member Functions | Private Attributes
Occurences Class Reference

#include <occurences.hh>

List of all members.

Public Member Functions

 Occurences (int v, int r)
OccurencesincOccurences (int v, int r, int d)
 inc occurences in context v,r,d
bool hasMultiOccurences () const
 true if multiple occurences or occ. in higher ctxt
bool hasOutDelayOccurences () const
 true if has occurences outside a a delay
int getMaxDelay () const
 return the maximal delay collected
int getMinDelay () const
 return the minimal delay collected

Private Attributes

const int fXVariability
 Extended Variability of the expression.
int fOccurences [4]
 Occurences count according to Contexts.
bool fMultiOcc
 True when exp has multiple occ. or occ. in higher ctxt.
bool fOutDelayOcc
 True when exp has at least one occ. outside a delay.
int fMinDelay
 Minimal fix delay usage.
int fMaxDelay
 Maximal fix delay usage.

Detailed Description

Definition at line 7 of file occurences.hh.


Constructor & Destructor Documentation

Occurences::Occurences ( int  v,
int  r 
)

Definition at line 27 of file occurences.cpp.

References fMaxDelay, fMultiOcc, fOccurences, and fOutDelayOcc.

                                   : fXVariability(xVariability(v,r)) {
    for (int i=0; i<4; i++) fOccurences[i]=0;
    fMultiOcc = false;
    fMaxDelay = 0;
    fOutDelayOcc = false;
}

Member Function Documentation

int Occurences::getMaxDelay ( ) const
int Occurences::getMinDelay ( ) const

return the minimal delay collected

true if multiple occurences or occ. in higher ctxt

Definition at line 50 of file occurences.cpp.

References fMultiOcc.

{ return fMultiOcc; }

true if has occurences outside a a delay

Definition at line 52 of file occurences.cpp.

References fOutDelayOcc.

{ return fOutDelayOcc; }
Occurences * Occurences::incOccurences ( int  v,
int  r,
int  d 
)

inc occurences in context v,r,d

Definition at line 34 of file occurences.cpp.

References fMaxDelay, fMultiOcc, fOccurences, fOutDelayOcc, fXVariability, and xVariability().

Referenced by OccMarkup::incOcc().

                                                         {
    int ctxt = xVariability(v,r);
    //assert (ctxt >= fXVariability);
    fOccurences[ctxt] += 1;
    fMultiOcc = fMultiOcc | (ctxt > fXVariability) | (fOccurences[ctxt] > 1);
    if (d == 0) {
        //cerr << "Occurence outside a delay " << endl;
        fOutDelayOcc = true;
    }
    if (d > fMaxDelay) {
        //cerr << "Max delay : " << fMaxDelay << " <- " << d << endl;
        fMaxDelay = d;
    }
    return this;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int Occurences::fMaxDelay [private]

Maximal fix delay usage.

Definition at line 14 of file occurences.hh.

Referenced by getMaxDelay(), incOccurences(), and Occurences().

int Occurences::fMinDelay [private]

Minimal fix delay usage.

Definition at line 13 of file occurences.hh.

bool Occurences::fMultiOcc [private]

True when exp has multiple occ. or occ. in higher ctxt.

Definition at line 11 of file occurences.hh.

Referenced by hasMultiOccurences(), incOccurences(), and Occurences().

int Occurences::fOccurences[4] [private]

Occurences count according to Contexts.

Definition at line 10 of file occurences.hh.

Referenced by incOccurences(), and Occurences().

bool Occurences::fOutDelayOcc [private]

True when exp has at least one occ. outside a delay.

Definition at line 12 of file occurences.hh.

Referenced by hasOutDelayOccurences(), incOccurences(), and Occurences().

const int Occurences::fXVariability [private]

Extended Variability of the expression.

Definition at line 9 of file occurences.hh.

Referenced by incOccurences().


The documentation for this class was generated from the following files: