microsoft / DirectXMath
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 876 units with 13,169 lines of code in units (38.3% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (540 lines of code)
    • 16 medium complex units (1,199 lines of code)
    • 16 simple units (656 lines of code)
    • 840 very simple units (10,774 lines of code)
0% | 4% | 9% | 4% | 81%
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
inl0% | 2% | 6% | 4% | 85%
cpp0% | 20% | 28% | 3% | 47%
h0% | 0% | 7% | 8% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Inc0% | 2% | 6% | 4% | 86%
SHMath0% | 20% | 28% | 3% | 47%
XDSP0% | 0% | 23% | 10% | 65%
Extensions0% | 0% | 0% | 12% | 87%
MatrixStack0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
inl
inline bool XM_CALLCONV Intersects()
in Inc/DirectXCollision.inl
192 40 6
HRESULT DirectX::SHProjectCubeMap()
in SHMath/DirectXSHD3D11.cpp
148 39 6
HRESULT DirectX::SHProjectCubeMap()
in SHMath/DirectXSHD3D12.cpp
121 36 6
inl
inline bool CalculateEigenVectors()
in Inc/DirectXCollision.inl
79 31 12
inl
inline bool XMVerifyCPUSupport()
in Inc/DirectXMathMisc.inl
61 21 0
bool _LoadScanline()
in SHMath/DirectXSHD3D11.cpp
61 20 1
bool _LoadScanline()
in SHMath/DirectXSHD3D12.cpp
61 20 1
86 18 7
77 17 7
89 17 7
inl
inline XMVECTOR CalculateEigenVector()
in Inc/DirectXCollision.inl
56 16 7
69 16 1
73 13 4
inl
inline float XMConvertHalfToFloat()
in Inc/DirectXPackedVector.inl
42 13 1
inl
inline HALF XMConvertFloatToHalf()
in Inc/DirectXPackedVector.inl
39 13 1
inl
inline XMVECTOR XM_CALLCONV XMLoadFloat3PK()
in Inc/DirectXPackedVector.inl
89 13 1
61 13 1
inl
150 12 1
72 12 3
inl
113 11 1