MCPcopy Create free account
hub / github.com/pytorch/pytorch / get_cpp_namespace

Method get_cpp_namespace

torchgen/utils.py:447–452  ·  view source on GitHub ↗

Return the namespace string from joining all the namespaces by "::" (hence no leading "::"). Return default if namespace string is empty.

(self, default: str = "")

Source from the content-addressed store, hash-verified

445
446 # Only allow certain level of namespaces
447 def get_cpp_namespace(self, default: str = "") -> str:
448 """
449 Return the namespace string from joining all the namespaces by "::" (hence no leading "::").
450 Return default if namespace string is empty.
451 """
452 return self.cpp_namespace_ if self.cpp_namespace_ else default
453
454
455class OrderedSet(Generic[T]):

Callers 4

from_yamlMethod · 0.80
parse_from_yamlFunction · 0.80

Calls

no outgoing calls

Tested by 2