MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / is_in

Method is_in

tools/Polygraphy/tests/test_examples.py:92–97  ·  view source on GitHub ↗

Whether we are currently on a line between the specified start and end marker. This will always return False for a line containing the marker itself.

(self, marker)

Source from the content-addressed store, hash-verified

90 yield line.rstrip()
91
92 def is_in(self, marker):
93 """
94 Whether we are currently on a line between the specified start and end marker.
95 This will always return False for a line containing the marker itself.
96 """
97 return marker in self.active_markers and not (self.entering(marker) or self.exiting(marker))
98
99 def entering(self, marker):
100 return marker in self.entering_markers

Callers 2

__iter__Method · 0.95

Calls 2

enteringMethod · 0.95
exitingMethod · 0.95

Tested by

no test coverage detected