| 77 | BENCHMARK(BM_RegisterBuiltins); |
| 78 | |
| 79 | InterpreterOptions OptionsForParam(BenchmarkParam param, google::protobuf::Arena& arena) { |
| 80 | InterpreterOptions options; |
| 81 | switch (param) { |
| 82 | case BenchmarkParam::kFoldConstants: |
| 83 | case BenchmarkParam::kRecursivePlanningWithConstantFolding: |
| 84 | options.constant_arena = &arena; |
| 85 | options.constant_folding = true; |
| 86 | break; |
| 87 | case BenchmarkParam::kDefault: |
| 88 | case BenchmarkParam::kRecursivePlanning: |
| 89 | options.constant_folding = false; |
| 90 | break; |
| 91 | } |
| 92 | switch (param) { |
| 93 | case BenchmarkParam::kRecursivePlanning: |
| 94 | case BenchmarkParam::kRecursivePlanningWithConstantFolding: |
| 95 | options.max_recursion_depth = 48; |
| 96 | break; |
| 97 | case BenchmarkParam::kDefault: |
| 98 | case BenchmarkParam::kFoldConstants: |
| 99 | options.max_recursion_depth = 0; |
| 100 | break; |
| 101 | } |
| 102 | return options; |
| 103 | } |
| 104 | |
| 105 | void BM_SymbolicPolicy(benchmark::State& state) { |
| 106 | auto param = static_cast<BenchmarkParam>(state.range(0)); |
no outgoing calls
no test coverage detected