#include <xi-Chare.h>
Public Types | |
enum | { CMIGRATABLE = 1 << 2, CPYTHON = 1 << 3, CCHARE = 1 << 9, CMAINCHARE = 1 << 10, CARRAY = 1 << 11, CGROUP = 1 << 12, CNODEGROUP = 1 << 13 } |
typedef unsigned int | attrib_t |
Public Member Functions | |
Chare (int ln, attrib_t Nattr, NamedType *t, TypeList *b=0, AstChildren< Member > *l=0) | |
void | genProxyNamesExceptFirst (XStr &str, const char *prefix, const char *middle, const char *suffix, const char *sep) |
void | genProxyNames (XStr &str, const char *prefix, const char *middle, const char *suffix, const char *sep) |
void | genIndexNames (XStr &str, const char *prefix, const char *middle, const char *suffix, const char *sep) |
void | printChareNames () |
XStr | proxyName (int withTemplates=1) |
XStr | indexName (int withTemplates=1) |
XStr | sectionName (int withTemplates=1) |
XStr | indexList () |
XStr | baseName (int withTemplates=1) const |
XStr | cbaseTType () |
int | isTemplated (void) |
bool | isTemplateDeclaration () |
bool | isTemplateInstantiation () |
int | isMigratable (void) |
int | isPython (void) |
int | isMainChare (void) |
int | isChare (void) |
int | isArray (void) |
int | isGroup (void) |
int | isNodeGroup (void) |
int | isForElement (void) const |
int | isForSection (void) const |
int | hasSdag () const |
void | setSdag (int f) |
forWhom | getForWhom (void) const |
void | print (XStr &str) |
void | check () |
void | genDefs (XStr &str) |
void | genReg (XStr &str) |
void | genDecls (XStr &str) |
void | genGlobalCode (XStr scope, XStr &decls, XStr &defs) |
void | genRecursivePup (XStr &scopedName, XStr templateSpec, XStr &decls, XStr &defs) |
void | preprocess () |
bool | isTramTarget () |
void | genTramTypes () |
void | genTramDecls (XStr &str) |
void | genTramInits (XStr &str) |
int | genAccels_spe_c_funcBodies (XStr &str) |
void | genAccels_spe_c_regFuncs (XStr &str) |
void | genAccels_spe_c_callInits (XStr &str) |
void | genAccels_spe_h_includes (XStr &str) |
void | genAccels_spe_h_fiCountDefs (XStr &str) |
void | genAccels_ppe_c_regFuncs (XStr &str) |
int | nextEntry (void) |
virtual void | genSubDecls (XStr &str) |
virtual void | outputClosuresDecl (XStr &str) |
virtual void | outputClosuresDef (XStr &str) |
virtual void | genClosureEntryDecls (XStr &str) |
virtual void | genClosureEntryDefs (XStr &str) |
void | genPythonDecls (XStr &str) |
void | genPythonDefs (XStr &str) |
virtual char * | chareTypeName (void) |
virtual char * | proxyPrefix (void) |
virtual void | genSubRegisterMethodDef (XStr &str) |
void | lookforCEntry (CEntry *centry) |
Data Fields | |
XStr | sdagPUPReg |
XStr | sdagDefs |
XStr | closuresDecl |
XStr | closuresDef |
std::vector< TramInfo > | tramInstances |
bool | generateTramInits |
NamedType * | type |
Protected Member Functions | |
void | genTypedefs (XStr &str) |
void | genRegisterMethodDef (XStr &str) |
void | sharedDisambiguation (XStr &str, const XStr &superclass) |
void | genMemberDecls (XStr &str) |
Protected Attributes | |
attrib_t | attrib |
int | hasElement |
forWhom | forElement |
int | hasSection |
TypeList * | bases |
TypeList * | bases_CBase |
int | entryCount |
int | hasSdagEntry |
Private Member Functions | |
XStr | virtualPupDef (const XStr &name) |
Private Attributes | |
AstChildren< Member > * | list |
Definition at line 22 of file xi-Chare.h.
typedef unsigned int xi::Chare::attrib_t |
Definition at line 36 of file xi-Chare.h.
anonymous enum |
Definition at line 27 of file xi-Chare.h.
Chare::Chare | ( | int | ln, | |
attrib_t | Nattr, | |||
NamedType * | t, | |||
TypeList * | b = 0 , |
|||
AstChildren< Member > * | l = 0 | |||
) |
Definition at line 31 of file xi-Chare.C.
References bases_CBase, entryCount, xi::forAll, forElement, hasElement, hasSdagEntry, hasSection, xi::AstNode::line, and xi::TEntity::setTemplate().
void Chare::genTypedefs | ( | XStr & | str | ) | [protected] |
Definition at line 541 of file xi-Chare.C.
References Prefix::Index, Prefix::Proxy, Prefix::ProxyElement, and Prefix::ProxySection.
Referenced by xi::Array::genSubDecls().
void Chare::genRegisterMethodDef | ( | XStr & | str | ) | [protected] |
Definition at line 49 of file xi-Chare.C.
References xi::internalMode, list, xi::templateGuardBegin(), xi::templateGuardEnd(), and type.
Definition at line 512 of file xi-Chare.C.
References Prefix::Index, and type.
Referenced by xi::Array::genSubDecls().
void Chare::genMemberDecls | ( | XStr & | str | ) | [protected] |
Definition at line 382 of file xi-Chare.C.
References list.
Referenced by xi::Array::genSubDecls().
void Chare::genProxyNamesExceptFirst | ( | XStr & | str, | |
const char * | prefix, | |||
const char * | middle, | |||
const char * | suffix, | |||
const char * | sep | |||
) |
Definition at line 493 of file xi-Chare.C.
References xi::TypeList::genProxyNames().
Referenced by xi::Array::genSubDecls().
void Chare::genProxyNames | ( | XStr & | str, | |
const char * | prefix, | |||
const char * | middle, | |||
const char * | suffix, | |||
const char * | sep | |||
) |
Definition at line 499 of file xi-Chare.C.
Referenced by xi::Array::genSubDecls().
void Chare::genIndexNames | ( | XStr & | str, | |
const char * | prefix, | |||
const char * | middle, | |||
const char * | suffix, | |||
const char * | sep | |||
) |
void Chare::printChareNames | ( | ) | [virtual] |
Reimplemented from xi::AstNode.
Definition at line 447 of file xi-Chare.C.
References endl().
Definition at line 449 of file xi-Chare.C.
References type.
Referenced by xi::Entry::genChareStaticConstructorDecl(), xi::Entry::genChareStaticConstructorDefs(), xi::Entry::genDefs(), xi::Entry::genGroupStaticConstructorDecl(), xi::Entry::genGroupStaticConstructorDefs(), xi::Member::makeDecl(), and xi::Entry::proxyName().
Definition at line 456 of file xi-Chare.C.
References Prefix::Index, and type.
Referenced by xi::Entry::aggregatorGlobalType(), xi::Entry::aggregatorType(), xi::Entry::genAccelIndexWrapperDef_spe(), xi::SdagConstruct::generateTraceEp(), xi::Entry::indexName(), and xi::Member::makeDecl().
Definition at line 464 of file xi-Chare.C.
References Prefix::ProxySection, and type.
Referenced by xi::Member::makeDecl().
XStr Chare::indexList | ( | ) |
Definition at line 471 of file xi-Chare.C.
Referenced by xi::Entry::genDefs().
Definition at line 74 of file xi-Chare.h.
References xi::NamedType::getBaseName(), xi::TEntity::tvars(), and type.
Referenced by xi::Entry::aggregatorGlobalType(), xi::Entry::aggregatorType(), xi::Entry::callThread(), xi::Entry::genAccelFullParamList(), xi::Entry::genAccelIndexWrapperDef_spe(), xi::Entry::genArrayDefs(), xi::Entry::genCall(), xi::Entry::genClosure(), xi::Entry::genDefs(), xi::generateClosureSignature(), xi::CEntry::generateCode(), xi::generateLocalWrapper(), xi::CParsedFile::generatePupFunction(), xi::generateVarSignature(), xi::Entry::genGroupDefs(), xi::Entry::genIndexDecls(), xi::Entry::genPythonDecls(), xi::Entry::genPythonDefs(), xi::Entry::genPythonStaticDefs(), xi::InitCall::genReg(), xi::Entry::genRegularCall(), xi::Entry::isConstructor(), and xi::Readonly::qName().
XStr Chare::cbaseTType | ( | ) |
Definition at line 902 of file xi-Chare.C.
References PUP::b, xi::TypeList::length(), Prefix::Python, and type.
int xi::Chare::isTemplated | ( | void | ) | [inline] |
Definition at line 81 of file xi-Chare.h.
References xi::TEntity::templat.
Referenced by xi::Entry::genArrayDefs(), xi::Entry::genClosure(), xi::Entry::genClosureEntryDefs(), xi::Entry::genDefs(), xi::Array::genSubDecls(), and xi::Member::makeDecl().
bool xi::Chare::isTemplateDeclaration | ( | ) | [inline] |
bool xi::Chare::isTemplateInstantiation | ( | ) | [inline] |
Definition at line 83 of file xi-Chare.h.
References xi::NamedType::isTemplated(), and type.
int xi::Chare::isMigratable | ( | void | ) | [inline] |
int xi::Chare::isPython | ( | void | ) | [inline] |
Definition at line 85 of file xi-Chare.h.
References attrib, and CPYTHON.
Referenced by xi::Entry::check().
int xi::Chare::isMainChare | ( | void | ) | [inline] |
Definition at line 86 of file xi-Chare.h.
References attrib, and CMAINCHARE.
Referenced by xi::Entry::check(), xi::Entry::genCall(), xi::Entry::genDefs(), xi::Entry::genReg(), and xi::Entry::setChare().
int xi::Chare::isChare | ( | void | ) | [inline] |
Definition at line 87 of file xi-Chare.h.
References attrib, and CCHARE.
Referenced by xi::Entry::check(), xi::Entry::genDefs(), and xi::ParamList::marshall().
int xi::Chare::isArray | ( | void | ) | [inline] |
Definition at line 88 of file xi-Chare.h.
References attrib, and CARRAY.
Referenced by xi::Entry::aggregatorGlobalType(), xi::Entry::aggregatorIndexType(), xi::Entry::aggregatorType(), xi::Entry::check(), xi::Entry::dataItemType(), xi::Entry::genArrayStaticConstructorDecl(), xi::Entry::genArrayStaticConstructorDefs(), xi::Entry::genCall(), xi::Entry::genDecls(), xi::Entry::genDefs(), xi::SdagConstruct::generateDummyBeginExecute(), xi::SdagConstruct::generateTraceBeginCall(), xi::Entry::genRegularCall(), xi::Entry::genTramDefs(), and xi::Entry::setChare().
int xi::Chare::isGroup | ( | void | ) | [inline] |
Definition at line 89 of file xi-Chare.h.
References attrib, and CGROUP.
Referenced by xi::Entry::aggregatorGlobalType(), xi::Entry::aggregatorIndexType(), xi::Entry::aggregatorType(), xi::Entry::check(), xi::Entry::dataItemType(), xi::Entry::genDecls(), xi::Entry::genDefs(), xi::SdagEntryConstruct::generateCode(), and xi::Entry::genTramDefs().
int xi::Chare::isNodeGroup | ( | void | ) | [inline] |
Definition at line 90 of file xi-Chare.h.
References attrib, and CNODEGROUP.
Referenced by xi::Entry::check(), xi::Entry::genGroupDecl(), xi::Entry::genGroupDefs(), xi::Entry::genGroupStaticConstructorDefs(), xi::Group::Group(), and xi::Entry::preprocessSDAG().
int xi::Chare::isForElement | ( | void | ) | const [inline] |
Definition at line 91 of file xi-Chare.h.
References forElement, and xi::forIndividual.
Referenced by xi::Entry::genArrayDecl(), xi::Entry::genArrayDefs(), xi::Entry::genDecls(), xi::Entry::genDefs(), xi::Entry::genGroupDecl(), xi::Entry::genGroupDefs(), xi::Entry::genGroupStaticConstructorDecl(), xi::Entry::genGroupStaticConstructorDefs(), xi::Entry::genRegularCall(), and xi::ParamList::marshall().
int xi::Chare::isForSection | ( | void | ) | const [inline] |
Definition at line 92 of file xi-Chare.h.
References forElement, and xi::forSection.
Referenced by xi::Entry::genArrayDefs(), xi::Entry::genGroupDecl(), xi::Entry::genGroupDefs(), xi::Entry::genGroupStaticConstructorDecl(), and xi::Entry::genGroupStaticConstructorDefs().
int xi::Chare::hasSdag | ( | ) | const [inline] |
void xi::Chare::setSdag | ( | int | f | ) | [inline] |
Definition at line 94 of file xi-Chare.h.
References hasSdagEntry.
Referenced by xi::Entry::setChare().
forWhom xi::Chare::getForWhom | ( | void | ) | const [inline] |
Definition at line 95 of file xi-Chare.h.
References forElement.
Referenced by xi::Entry::genArrayStaticConstructorDecl(), xi::Entry::genArrayStaticConstructorDefs(), and xi::Entry::genDefs().
void Chare::print | ( | XStr & | str | ) | [virtual] |
Implements xi::Printable.
Definition at line 936 of file xi-Chare.C.
References list, xi::XStr::print(), and type.
void Chare::check | ( | void | ) | [virtual] |
void Chare::genDefs | ( | XStr & | str | ) | [virtual] |
Reimplemented from xi::AstNode.
Definition at line 556 of file xi-Chare.C.
References PUP::b, xi::forAll, xi::forIndividual, xi::forSection, xi::fortranify(), xi::fortranMode, xi::TypeList::length(), list, print(), Prefix::Python, PUP::t, xi::templateGuardBegin(), xi::templateGuardEnd(), and type.
void Chare::genReg | ( | XStr & | str | ) | [virtual] |
Reimplemented from xi::AstNode.
Definition at line 923 of file xi-Chare.C.
References list, print(), and type.
void Chare::genDecls | ( | XStr & | str | ) | [virtual] |
Reimplemented from xi::AstNode.
Definition at line 107 of file xi-Chare.C.
References xi::CIClassEnd, xi::CIClassStart, xi::CParsedFile::doProcess(), xi::forAll, xi::forIndividual, xi::forSection, Prefix::Index, list, print(), Prefix::Proxy, Prefix::ProxyElement, Prefix::ProxySection, Prefix::Python, xi::resetNumbers(), xi::SdagCollection::sdagPresent, xi::Entry::setChare(), and type.
Reimplemented from xi::AstNode.
Definition at line 291 of file xi-Chare.C.
References list, xi::templateGuardBegin(), xi::templateGuardEnd(), and type.
Definition at line 269 of file xi-Chare.C.
References xi::templateGuardBegin(), and xi::templateGuardEnd().
Referenced by xi::Entry::genTramPups().
void Chare::preprocess | ( | ) | [virtual] |
Reimplemented from xi::AstNode.
Definition at line 218 of file xi-Chare.C.
References isMigratable(), list, xi::Entry::setChare(), and type.
bool Chare::isTramTarget | ( | void | ) | [virtual] |
void Chare::genTramTypes | ( | ) | [virtual] |
void Chare::genTramDecls | ( | XStr & | str | ) |
Definition at line 971 of file xi-Chare.C.
Referenced by xi::Array::genSubDecls().
void Chare::genTramInits | ( | XStr & | str | ) |
Definition at line 982 of file xi-Chare.C.
Referenced by xi::Array::genSubDecls().
void xi::Chare::genAccels_spe_c_regFuncs | ( | XStr & | str | ) | [inline, virtual] |
void xi::Chare::genAccels_spe_c_callInits | ( | XStr & | str | ) | [inline, virtual] |
void xi::Chare::genAccels_spe_h_includes | ( | XStr & | str | ) | [inline, virtual] |
void xi::Chare::genAccels_spe_h_fiCountDefs | ( | XStr & | str | ) | [inline, virtual] |
void xi::Chare::genAccels_ppe_c_regFuncs | ( | XStr & | str | ) | [inline, virtual] |
int xi::Chare::nextEntry | ( | void | ) | [inline] |
Definition at line 144 of file xi-Chare.h.
References entryCount.
Referenced by xi::Entry::setChare().
void Chare::genSubDecls | ( | XStr & | str | ) | [virtual] |
Reimplemented in xi::Array, and xi::Group.
Definition at line 329 of file xi-Chare.C.
References xi::CIClassEnd, xi::CIClassStart, xi::disambig_proxy(), and type.
void Chare::outputClosuresDecl | ( | XStr & | str | ) | [virtual] |
void Chare::outputClosuresDef | ( | XStr & | str | ) | [virtual] |
void Chare::genClosureEntryDecls | ( | XStr & | str | ) | [virtual] |
Reimplemented from xi::AstNode.
Definition at line 316 of file xi-Chare.C.
References xi::CIClassEnd, xi::CIClassStart, list, and type.
void Chare::genClosureEntryDefs | ( | XStr & | str | ) | [virtual] |
void Chare::genPythonDecls | ( | XStr & | str | ) |
Definition at line 386 of file xi-Chare.C.
References PUP::b, xi::CIClassEnd, xi::CIClassStart, xi::forPython, xi::TypeList::genProxyNames(), list, Prefix::Python, and type.
void Chare::genPythonDefs | ( | XStr & | str | ) |
virtual char* xi::Chare::chareTypeName | ( | void | ) | [inline, virtual] |
Reimplemented in xi::MainChare, xi::Array, xi::Group, and xi::NodeGroup.
Definition at line 152 of file xi-Chare.h.
char * Chare::proxyPrefix | ( | void | ) | [virtual] |
Definition at line 509 of file xi-Chare.C.
References xi::forWhomStr().
Referenced by xi::Array::genSubDecls().
virtual void xi::Chare::genSubRegisterMethodDef | ( | XStr & | str | ) | [inline, virtual] |
void Chare::lookforCEntry | ( | CEntry * | centry | ) |
Definition at line 954 of file xi-Chare.C.
References list.
Referenced by xi::Entry::check(), xi::CParsedFile::mapCEntry(), and xi::Entry::setChare().
Definition at line 261 of file xi-Chare.C.
AstChildren<Member>* xi::Chare::list [private] |
Definition at line 24 of file xi-Chare.h.
Referenced by genAccels_ppe_c_regFuncs(), genAccels_spe_c_callInits(), genAccels_spe_c_funcBodies(), genAccels_spe_c_regFuncs(), genAccels_spe_h_fiCountDefs(), and genAccels_spe_h_includes().
Definition at line 37 of file xi-Chare.h.
Referenced by xi::Entry::genClosure(), and xi::CParsedFile::generateRegisterEp().
Definition at line 38 of file xi-Chare.h.
std::vector<TramInfo> xi::Chare::tramInstances |
Definition at line 39 of file xi-Chare.h.
Referenced by xi::Entry::genTramInstantiation(), and xi::Entry::genTramTypes().
Definition at line 40 of file xi-Chare.h.
Definition at line 41 of file xi-Chare.h.
Referenced by xi::Array::Array(), baseName(), xi::Array::genSubDecls(), and isTemplateInstantiation().
attrib_t xi::Chare::attrib [protected] |
Definition at line 44 of file xi-Chare.h.
Referenced by isArray(), isChare(), isGroup(), isMainChare(), isMigratable(), isNodeGroup(), and isPython().
int xi::Chare::hasElement [protected] |
Definition at line 45 of file xi-Chare.h.
Referenced by xi::Array::Array(), Chare(), and xi::Group::Group().
forWhom xi::Chare::forElement [protected] |
Definition at line 46 of file xi-Chare.h.
Referenced by xi::Array::Array(), Chare(), xi::Array::genSubDecls(), getForWhom(), xi::Group::Group(), isForElement(), and isForSection().
int xi::Chare::hasSection [protected] |
Definition at line 47 of file xi-Chare.h.
Referenced by xi::Array::Array(), Chare(), and xi::Group::Group().
TypeList* xi::Chare::bases [protected] |
Definition at line 49 of file xi-Chare.h.
Referenced by xi::Array::Array(), xi::Array::genSubDecls(), and xi::Group::Group().
TypeList* xi::Chare::bases_CBase [protected] |
Definition at line 50 of file xi-Chare.h.
Referenced by xi::Array::Array(), Chare(), and xi::Group::Group().
int xi::Chare::entryCount [protected] |
int xi::Chare::hasSdagEntry [protected] |