facebookresearch / HVVR
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 586 units with 4,449 lines of code in units (40.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (69 lines of code)
    • 13 medium complex units (801 lines of code)
    • 22 simple units (772 lines of code)
    • 550 very simple units (2,807 lines of code)
0% | 1% | 18% | 17% | 63%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cpp0% | 2% | 23% | 26% | 47%
h0% | 0% | 10% | 5% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
libraries/hvvr/shared0% | 5% | 2% | 8% | 84%
libraries/hvvr/raycaster0% | 0% | 28% | 12% | 58%
libraries/hvvr/samples_shared0% | 0% | 13% | 43% | 42%
projects/hvvr_samples/modelviewer0% | 0% | 20% | 39% | 40%
projects/hvvr_samples/modelconvert0% | 0% | 0% | 100% | 0%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
uint32_t helpBuildBVH4()
in libraries/hvvr/shared/bvh.cpp
69 26 4
void Raycaster::buildScene()
in libraries/hvvr/raycaster/scene_update.cpp
94 18 0
uint32_t traverseBlocks()
in libraries/hvvr/raycaster/traverse_ref_bvh.cpp
63 17 3
uint32_t traverseTiles()
in libraries/hvvr/raycaster/traverse_ref_bvh.cpp
56 16 5
void transformHierarchyCameraToWorld()
in libraries/hvvr/raycaster/render.cpp
75 14 9
__forceinline uint32_t traverseTiles()
in libraries/hvvr/raycaster/traverse_avx.h
75 13 5
void GApp::onSimulation()
in projects/hvvr_samples/modelviewer/modelviewer.cpp
41 12 2
CUDA_DEVICE_INL vector4 GGXShade()
in libraries/hvvr/raycaster/shading.h
57 12 8
uint32_t Frustum::testBVHNodeChildren()
in libraries/hvvr/raycaster/traverse_ref_frustum.cpp
33 12 1
uint64_t Raycaster::buildTileTriangleLists()
in libraries/hvvr/raycaster/traversal.cpp
98 12 2
bool importMesh()
in libraries/hvvr/samples_shared/model_import_fbx.cpp
79 12 2
uint32_t Frustum::testBVHNodeChildrenRefine()
in libraries/hvvr/raycaster/traverse_ref_frustum.cpp
31 11 2
__forceinline uint32_t traverseBlocks()
in libraries/hvvr/raycaster/traverse_avx.h
72 11 3
std::vector buildBVH4()
in libraries/hvvr/shared/bvh.cpp
27 11 1
static void cullThread()
in libraries/hvvr/raycaster/traversal.cpp
92 10 5
static Frustum get3DFrustumFrom2D()
in libraries/hvvr/raycaster/sample_hierarchy.cpp
60 9 2
size_t helpBuildBVH2()
in libraries/hvvr/shared/bvh.cpp
41 9 4
void GApp::endFrame()
in projects/hvvr_samples/modelviewer/modelviewer.cpp
44 8 0
void naiveXYCluster()
in libraries/hvvr/raycaster/sample_clustering.h
26 8 2
inline size_t getTextureSize()
in libraries/hvvr/raycaster/texture.h
21 8 3