anthropics / triton
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
mlir
in
ll
editorconfig
clang-format
gitmodules
  • 22 extensions are included in analyses: py, h, cpp, txt, mlir, yaml, rst, md, cc, sh, c, hpp, svg, in, toml, cmake, ll, editorconfig, html, gitignore, clang-format, gitmodules
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (14 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (5 files).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main46406 LOC (69%) 239 files
test18617 LOC (27%) 87 files
generated0 LOC (0%) 0 files
build and deployment771 LOC (1%) 14 files
other1052 LOC (1%) 76 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 239 files match defined criteria (46,406 LOC, 100.0% vs. main code):
    • 78 *.cpp files (27,168 LOC)
    • 53 *.py files (11,157 LOC)
    • 93 *.h files (5,488 LOC)
    • 6 *.cc files (1,854 LOC)
    • 3 *.c files (600 LOC)
    • 4 *.hpp files (82 LOC)
    • 1 *.yaml files (52 LOC)
    • 1 *.in files (5 LOC)
  • " *.cpp" is biggest, containing 58.54% of LOC.
  • " *.in" is smallest, containing 0.01% of LOC.


*.cpp27168 LOC (58%) 78 files
*.py11157 LOC (24%) 53 files
*.h5488 LOC (11%) 93 files
*.cc1854 LOC (3%) 6 files
*.c600 LOC (1%) 3 files
*.hpp82 LOC (<1%) 4 files
*.yaml52 LOC (<1%) 1 file
*.in5 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mlir
ll
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/testing[.].*".
  • 87 files match defined criteria (18,617 LOC, 40.1% vs. main code):
    • 41 *.mlir files (9,885 LOC)
    • 39 *.py files (8,435 LOC)
    • 4 *.cpp files (216 LOC)
    • 1 *.c files (35 LOC)
    • 1 *.ll files (28 LOC)
    • 1 *.in files (18 LOC)
  • " *.mlir" is biggest, containing 53.1% of LOC.
  • " *.in" is smallest, containing 0.1% of LOC.


*.mlir9885 LOC (53%) 41 files
*.py8435 LOC (45%) 39 files
*.cpp216 LOC (1%) 4 files
*.c35 LOC (<1%) 1 file
*.ll28 LOC (<1%) 1 file
*.in18 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
editorconfig
gitmodules
clang-format
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/CMakeLists[.]txt".
    • files with paths like ".*[.]cmake".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like "(.*/)?[.]clang[-]format".
    • files with paths like ".*/pyproject[.]toml".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]editorconfig".
    • files with paths like "(.*/)?[.]editorconfig".
    • files with paths like ".*/setup[.]py".
  • 14 files match defined criteria (771 LOC, 1.7% vs. main code):
    • 1 *.py files (324 LOC)
    • 2 *.cmake files (196 LOC)
    • 5 *.sh files (139 LOC)
    • 1 *.gitignore files (38 LOC)
    • 2 *.toml files (33 LOC)
    • 1 *.editorconfig files (30 LOC)
    • 1 *.gitmodules files (10 LOC)
    • 1 *.clang-format files (1 LOC)
  • " *.py" is biggest, containing 42.02% of LOC.
  • " *.clang-format" is smallest, containing 0.13% of LOC.


*.py324 LOC (42%) 1 file
*.cmake196 LOC (25%) 2 files
*.sh139 LOC (18%) 5 files
*.gitignore38 LOC (4%) 1 file
*.toml33 LOC (4%) 2 files
*.editorconfig30 LOC (3%) 1 file
*.gitmodules10 LOC (1%) 1 file
*.clang-format1 LOC (<1%) 1 file
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
  • 76 files match defined criteria (1,052 LOC, 2.3% vs. main code):
    • 71 *.txt files (813 LOC)
    • 2 *.md files (211 LOC)
    • 2 *.py files (21 LOC)
    • 1 *.rst files (7 LOC)
  • " *.txt" is biggest, containing 77.28% of LOC.
  • " *.rst" is smallest, containing 0.67% of LOC.


*.txt813 LOC (77%) 71 files
*.md211 LOC (20%) 2 files
*.py21 LOC (1%) 2 files
*.rst7 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.
  • *.cpp files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.py files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.cc files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.c files are analyzed with CStyleAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.hpp files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.in files are analyzed with RustAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis


2026-06-24 10:43