longest_common_prefix() — pytorch Function Reference
Architecture documentation for the longest_common_prefix() function in join_results.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 941c9c45_672f_2175_f07a_216a4fb53eee["longest_common_prefix()"] ed3a07d3_3bc2_b1e3_91eb_6fe78c42020a["main()"] ed3a07d3_3bc2_b1e3_91eb_6fe78c42020a -->|calls| 941c9c45_672f_2175_f07a_216a4fb53eee style 941c9c45_672f_2175_f07a_216a4fb53eee fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/join_results.py lines 14–20
def longest_common_prefix(strs):
shortest_str = min(strs, key=len)
for i, char in enumerate(shortest_str):
for other in strs:
if other[i] != char:
return shortest_str[:i]
return ""
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does longest_common_prefix() do?
longest_common_prefix() is a function in the pytorch codebase.
What calls longest_common_prefix()?
longest_common_prefix() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free