awslabs / homomorphic-implementors-toolkit
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 370 units with 2,782 lines of code in units (63.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (101 lines of code)
    • 20 simple units (531 lines of code)
    • 348 very simple units (2,150 lines of code)
0% | 0% | 3% | 19% | 77%
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% | 0% | 3% | 19% | 76%
h0% | 0% | 0% | 13% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/hit/api/evaluator0% | 0% | 7% | 8% | 84%
src/hit/api/linearalgebra0% | 0% | 2% | 27% | 70%
src/hit0% | 0% | 0% | 59% | 40%
src/hit/api0% | 0% | 0% | 4% | 95%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Matrix decode_matrix()
in src/hit/api/linearalgebra/encryptedmatrix.cpp
35 14 3
void DebugEval::print_stats()
in src/hit/api/evaluator/debug.cpp
66 11 1
void EncryptedMatrix::validate()
in src/hit/api/linearalgebra/encryptedmatrix.cpp
39 10 0
EncryptedColVector LinearAlgebra::matrix_matrix_mul_loop_row_major()
in src/hit/api/linearalgebra/linearalgebra.cpp
28 10 5
string elapsed_time_to_str()
in src/hit/common.cpp
17 10 3
void DebugEval::print_parameters()
in src/hit/api/evaluator/debug.cpp
49 9 0
EncryptedMatrix LinearAlgebra::hadamard_multiply()
in src/hit/api/linearalgebra/linearalgebra.cpp
39 9 2
EncryptedMatrix LinearAlgebra::hadamard_multiply()
in src/hit/api/linearalgebra/linearalgebra.cpp
39 9 2
void hadamard_multiply_inplace()
in src/hit/api/linearalgebra/linearalgebra.h
31 9 2
20 8 1
int modulus_to_poly_degree()
in src/hit/common.cpp
22 8 1
void CKKSEvaluator::multiply_inplace()
in src/hit/api/evaluator.cpp
22 7 2
EncryptedMatrix LinearAlgebra::multiply_col_major()
in src/hit/api/linearalgebra/linearalgebra.cpp
32 7 3
void ScaleEstimator::update_max_log_scale()
in src/hit/api/evaluator/scaleestimator.cpp
20 6 1
void EncryptedColVector::validate()
in src/hit/api/linearalgebra/encryptedcolvector.cpp
22 6 0
Vector decode_col_vector()
in src/hit/api/linearalgebra/encryptedcolvector.cpp
16 6 2
void LinearAlgebra::matrix_multiply_validation()
in src/hit/api/linearalgebra/linearalgebra.cpp
22 6 3
EncryptedMatrix LinearAlgebra::multiply_row_major_mixed_unit()
in src/hit/api/linearalgebra/linearalgebra.cpp
26 6 3
EncryptedRowVector LinearAlgebra::sum_cols_many()
in src/hit/api/linearalgebra/linearalgebra.cpp
22 6 2
void EncryptedRowVector::validate()
in src/hit/api/linearalgebra/encryptedrowvector.cpp
22 6 0