FAUST compiler  0.9.9.6b8
Public Member Functions | Private Attributes | List of all members
Occurences Class Reference

#include <occurences.hh>

Public Member Functions

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

Private Attributes

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

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.

27  : fXVariability(xVariability(v,r)) {
28  for (int i=0; i<4; i++) fOccurences[i]=0;
29  fMultiOcc = false;
30  fMaxDelay = 0;
31  fOutDelayOcc = false;
32 }
const int fXVariability
Extended Variability of the expression.
Definition: occurences.hh:9
int fOccurences[4]
Occurences count according to Contexts.
Definition: occurences.hh:10
static int xVariability(int v, int r)
Extended Variability with recursiveness indication.
Definition: occurences.cpp:14
bool fMultiOcc
True when exp has multiple occ. or occ. in higher ctxt.
Definition: occurences.hh:11
int fMaxDelay
Maximal fix delay usage.
Definition: occurences.hh:14
bool fOutDelayOcc
True when exp has at least one occ. outside a delay.
Definition: occurences.hh:12

Member Function Documentation

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

return the minimal delay collected

bool Occurences::hasMultiOccurences ( ) const

true if multiple occurences or occ. in higher ctxt

Definition at line 50 of file occurences.cpp.

References fMultiOcc.

50 { return fMultiOcc; }
bool fMultiOcc
True when exp has multiple occ. or occ. in higher ctxt.
Definition: occurences.hh:11
bool Occurences::hasOutDelayOccurences ( ) const

true if has occurences outside a a delay

Definition at line 52 of file occurences.cpp.

References fOutDelayOcc.

52 { return fOutDelayOcc; }
bool fOutDelayOcc
True when exp has at least one occ. outside a delay.
Definition: occurences.hh:12
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().

34  {
35  int ctxt = xVariability(v,r);
36  //assert (ctxt >= fXVariability);
37  fOccurences[ctxt] += 1;
38  fMultiOcc = fMultiOcc | (ctxt > fXVariability) | (fOccurences[ctxt] > 1);
39  if (d == 0) {
40  //cerr << "Occurence outside a delay " << endl;
41  fOutDelayOcc = true;
42  }
43  if (d > fMaxDelay) {
44  //cerr << "Max delay : " << fMaxDelay << " <- " << d << endl;
45  fMaxDelay = d;
46  }
47  return this;
48 }
const int fXVariability
Extended Variability of the expression.
Definition: occurences.hh:9
int fOccurences[4]
Occurences count according to Contexts.
Definition: occurences.hh:10
static int xVariability(int v, int r)
Extended Variability with recursiveness indication.
Definition: occurences.cpp:14
bool fMultiOcc
True when exp has multiple occ. or occ. in higher ctxt.
Definition: occurences.hh:11
int fMaxDelay
Maximal fix delay usage.
Definition: occurences.hh:14
bool fOutDelayOcc
True when exp has at least one occ. outside a delay.
Definition: occurences.hh:12

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: