Beispiel #1
0
void GotoStatement::simplify()
{
    if (isComputed()) {
        m_dest = m_dest->simplifyArith();
        m_dest = m_dest->simplify();
    }
}
Beispiel #2
0
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();
  }
}
Beispiel #3
0
const Expr TensorIndex::computeColidx(Expr coord) const {
  simit_iassert(isComputed());
  if (getKind() == Sten) {
    not_supported_yet;
    return Expr();
  }
  else {
    simit_unreachable;
    return Expr();
  }
}
Beispiel #4
0
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();
          }
        }
      }
    }
Beispiel #5
0
const Var& TensorIndex::getColidxArray() const {
  simit_iassert(!isComputed());
  return content->sinkArray;
}
Beispiel #6
0
const Var& TensorIndex::getRowptrArray() const {
  simit_iassert(!isComputed());
  return content->coordArray;
}