Function sequant::opt::schedule::record_root

Function Documentation

RecordedRoot sequant::opt::schedule::record_root(std::string label, ExprPtr const &root_sum, OptimizeOptions opts)

Runs sequant::optimize_result on root_sum with a RecordSession labeled label set as opts.recording, and returns the record (terms in the order of the optimized Sum’s summands) with the optimized expression. A root that is not a Sum is recorded as a single term. The Sum must be simplified: no two summands may have the same canonical key.

Throws:

sequant::Exception – listing the duplicate keys otherwise