void GotoStatement::simplify() { if (isComputed()) { m_dest = m_dest->simplifyArith(); m_dest = m_dest->simplify(); } }
const Expr TensorIndex::computeRowptr(Expr source) const { simit_iassert(isComputed()); if (getKind() == Sten) { return source * Expr((int)content->stencil.getLayout().size()); } else { simit_unreachable; return Expr(); } }
const Expr TensorIndex::computeColidx(Expr coord) const { simit_iassert(isComputed()); if (getKind() == Sten) { not_supported_yet; return Expr(); } else { simit_unreachable; return Expr(); } }
void Property::setDependantsDirty() { if(!isDynamic()) { const PropertyInstanceInformation *childBase = baseInstanceInformation(); const EmbeddedPropertyInstanceInformation *child = childBase->embeddedInfo(); const xsize *affectsLocations = child->affects(); if(affectsLocations) { xuint8* parentLocation = (xuint8*)this; parentLocation -= child->location(); for(;*affectsLocations; ++affectsLocations) { xuint8* affectedLocation = parentLocation + *affectsLocations; Property *affectsProp = (Property *)affectedLocation; xAssert(affectsProp); affectsProp->setDirty(); } } } for(Property *o=output(); o; o = o->nextOutput()) { xAssert(o != o->nextOutput()); o->setDirty(); } // if there is an input, a parent input or this is computed, // then when we are dirtied we need to dirty our children if(!isUpdating() && (input() || _flags.hasFlag(Property::ParentHasInput) || isComputed())) { Container *c = castTo<Container>(); if(c) { xForeach(auto child, LightWalker(c)) { if(Property *childProp = child->castTo<Property>()) { childProp->setDirty(); } } } }
const Var& TensorIndex::getColidxArray() const { simit_iassert(!isComputed()); return content->sinkArray; }
const Var& TensorIndex::getRowptrArray() const { simit_iassert(!isComputed()); return content->coordArray; }