There is an iterator to enumerate the CGPortHoles of a CGStar: class CGStarPortIter. The
operator++methods return type
virtual void outputComment(const char* msg, const char* stream=NULL);This method adds a comment
msgto the target
stream.If no target stream is specified, the
myCodestream is used.
StringList expandPortName(const char* name);If the argument specifies the name of a MultiPortHole, the index may be indicated by a State. In this case, this method gets the value of the State as the index to the MultiPortHole and returns a valid MultiPortHole name. This method is used in the
void advance();This method updates the offset variable of all PortHoles of the CGStar by the number of samples consumed or produced. It calls the
advancemethod of each PortHole.
IntState procId;This is an integer state to indicate processor assignment for parallel code generation. By default, the value is -1 to indicate that the star is not yet assigned.
int dataParallelThis is a flag to be set if this star is a wormhole or a parallel star.
Profile* profile;This is a pointer to a Profile object, which can be used to indicate the local schedule of a data parallel star or macro actor. If it is not a parallel star, this pointer is set
int deferrable();When constructing a schedule for a single processor, we can defer the firing of a star as long as possible in order to reduce the buffer requirements on every output arc. In this method, we never defer a Fork star, and always defer any non-Fork star that feeds into a Fork. This prevents the resulting fork buffer from being larger than necessary, because new tokens are not added until they must be.
const char* domain() const;The first method returns
int isA(const char* class);
"CG". The second method returns
TRUEif the argument
CGStaror a base class of CGStar.
int isSDF() const;Returns
TRUEif it is a star with SDF semantics (default). For BDF and DDF stars, it will return
virtual void initCode();This method allows a star to generate code outside the main loop. This method will be called after the schedule is created and before the schedule is executed. In contrast, the
go()method is called during the execution of the schedule, to form code blocks into a main loop body.
int run();In CG domains, this method does not perform any actual data movement, but executes the
go()method followed by the
CGTarget* cgTarget();These methods get and set the pointer to the target to which this star is assigned. When we set the target pointer, we also initialize the SymbolLists and the CodeStream pointers. If this method is successful, it returns
int setTarget(Target* t);
TRUE, otherwise it returns
virtual int isParallel() const;The first method returns
virtual Profile* getProfile(int ix=0);
TRUEif this star is a wormhole or a parallel star. If it is parallel, the second method returns the pointer to a Profile, indexed by the argument. A parallel star stores its internal scheduling results in a Profile object .
int maxComm();Returns the maximum communication overhead with all ancestors. It calls the
commTimemethod of the target class to obtain the communication cost.
virtual void setProcId(int i);These methods set and get the processor ID to which this star is assigned.
virtual int getProcId();