| 925 | } |
| 926 | |
| 927 | bool enable_fastpath(py::handle inp) { |
| 928 | auto&& tm_tr = TransformationManager::get_instance() |
| 929 | .segments[TransformationManager::Segment::ModuleTrace]; |
| 930 | bool is_varnode = PyObject_TypeCheck(inp.ptr(), py_varnode_type); |
| 931 | if (is_varnode || |
| 932 | TransformationManager::get_instance() |
| 933 | .segments[TransformationManager::Segment::Trace] |
| 934 | .size() > 0 || |
| 935 | (tm_tr.size() > 0 && |
| 936 | reinterpret_cast<ModuleTraceTransformation*>(tm_tr[0].get())->enabled())) { |
| 937 | return false; |
| 938 | } |
| 939 | return true; |
| 940 | } |
| 941 | |
| 942 | bool subtensor_fastpath(py::handle inp_hdl, py::tuple tuple_val) { |
| 943 | bool use_fastpath = true; |
no test coverage detected