facebookresearch / SparseConvNet
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 623 units with 7,904 lines of code in units (59.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (287 lines of code)
    • 6 medium complex units (358 lines of code)
    • 26 simple units (772 lines of code)
    • 589 very simple units (6,487 lines of code)
0% | 3% | 4% | 9% | 82%
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
h0% | 9% | 9% | 19% | 61%
py0% | 5% | 4% | 6% | 84%
cpp0% | 0% | 2% | 8% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sparseconvnet/SCN/Metadata0% | 13% | 8% | 35% | 42%
sparseconvnet0% | 5% | 4% | 6% | 84%
sparseconvnet/SCN/CPU0% | 0% | 6% | 7% | 85%
sparseconvnet/SCN/Metadata/sparsehash/internal0% | 0% | 6% | 14% | 78%
sparseconvnet/SCN0% | 0% | 0% | 0% | 100%
sparseconvnet/SCN/CUDA0% | 0% | 0% | 0% | 100%
sparseconvnet/SCN/misc0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void blRules()
in sparseconvnet/SCN/Metadata/IOLayersRules.h
146 38 7
def ClassificationTrainValidate()
in sparseconvnet/classificationTrainValidate.py
141 26 3
void inputLayerRules()
in sparseconvnet/SCN/Metadata/IOLayersRules.h
99 24 8
def SparseVggNet()
in sparseconvnet/networkArchitectures.py
117 14 3
void BatchNormalization_ForwardPass()
in sparseconvnet/SCN/CPU/BatchNormalization.cpp
48 12 16
bool serialize()
in sparseconvnet/SCN/Metadata/sparsehash/internal/densehashtable.h
24 12 2
bool unserialize()
in sparseconvnet/SCN/Metadata/sparsehash/internal/densehashtable.h
27 12 2
void BatchNormalization_BackwardPass()
in sparseconvnet/SCN/CPU/BatchNormalization.cpp
43 11 17
void AffineReluTrivialConvolution_BackwardPass()
in sparseconvnet/SCN/CPU/AffineReluTrivialConvolution.cpp
38 10 15
bool resize_delta()
in sparseconvnet/SCN/Metadata/sparsehash/internal/densehashtable.h
30 10 1
void Metadata::addSampleFromThresholdedTensor()
in sparseconvnet/SCN/Metadata/Metadata.cpp
48 10 5
void Metadata::createMetadataForDenseToSparse()
in sparseconvnet/SCN/Metadata/Metadata.cpp
35 9 3
def compute_weight()
in sparseconvnet/spectral_norm.py
16 8 2
def SparseResNet()
in sparseconvnet/networkArchitectures.py
64 8 3
def UNet()
in sparseconvnet/networkArchitectures.py
38 8 8
Int Convolution_InputSgsToRulesAndOutputSgs_OMP()
in sparseconvnet/SCN/Metadata/ConvolutionRules.h
41 8 7
Int FullConvolution_InputSgsToRulesAndOutputSgs_OMP()
in sparseconvnet/SCN/Metadata/FullConvolutionRules.h
41 8 7
std::pair find_position()
in sparseconvnet/SCN/Metadata/sparsehash/internal/densehashtable.h
23 8 1
Int RSR_InputSgsToRulesAndOutputSgs_OMP()
in sparseconvnet/SCN/Metadata/RandomizedStrideRules.h
44 8 8
void Metadata::setInputSpatialLocations()
in sparseconvnet/SCN/Metadata/Metadata.cpp
36 8 4