Struct no_scope_guard¶
Defined in File eval.hpp
Struct Documentation¶
-
struct no_scope_guard¶
Default scope-guard factory for make_batched_custom_evaluator: produces a no-op guard. A backend may supply a factory whose returned RAII object relaxes block-sparse screening for the duration of the batched partial contractions, so that a result block whose norm clears the screening threshold over the full batch mode is not dropped in every individual batch (which would lose its contribution to the sum). The factory is called with the batch count, so the backend can scale the relaxation accordingly (e.g. divide a Cauchy-Schwarz norm-product screening threshold by n_batches: the bound for a sub-sum over 1/n of the batch mode is ~1/n of the full bound). See make_batched_custom_evaluator’s
make_scope_guardparameter.Nesting: the factory is reused unchanged at every re-entrant (nested) level (see
make_scope_guard'sdoc on make_batched_custom_evaluator), so nested levels each construct their own guard, scaled by their own level’s batch count, and the outer guard(s) remain alive while the inner one is constructed and used. A per-level relaxation therefore composes multiplicatively: net relaxation = product of batch counts over all alive nesting levels, which is exactly the factor needed for a contribution significant over the full product of batch modes to survive per-cell screening at every nesting depth.