MaxConstantFoldIterations limits the number of times literals may be folding during optimization. Defaults to 100 if not set.
(limit int)
| 34 | // |
| 35 | // Defaults to 100 if not set. |
| 36 | func MaxConstantFoldIterations(limit int) ConstantFoldingOption { |
| 37 | return func(opt *constantFoldingOptimizer) (*constantFoldingOptimizer, error) { |
| 38 | opt.maxFoldIterations = limit |
| 39 | return opt, nil |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // FoldKnownValues adds an Activation which provides known values for the folding evaluator |
| 44 | // |
no outgoing calls