Skip to content

Lazy semantics for compile/assemble/compute in Tensors #90

@fredrikbk

Description

@fredrikbk

The current state machine semantics for TensorBase::operator(), TensorBase::compile, TensorBase::compute and TensorBase::assemble can be difficult to get right. They can also cause code to be less clear since you have to build and compile expressions outside the loop where you want to do the computation:

a(i) = B(i,j)*c(j);
a.compile();
a.assemble();
while (!converged(a)) {
  a.compute();
}

We should consider lazy semantics, where you can write:

while (!converged(a)) {
  a(i) = B(i,j)*c(j);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions