facebookresearch / pytorch3d
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 1,028 units with 14,612 lines of code in units (39.9% of code).
    • 1 very complex units (712 lines of code)
    • 3 complex units (930 lines of code)
    • 43 medium complex units (2,512 lines of code)
    • 77 simple units (2,774 lines of code)
    • 904 very simple units (7,684 lines of code)
4% | 6% | 17% | 18% | 52%
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
h17% | 8% | 13% | 13% | 47%
cpp0% | 16% | 26% | 30% | 27%
py0% | 2% | 16% | 18% | 62%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pytorch3d/csrc10% | 11% | 18% | 20% | 39%
projects/nerf0% | 35% | 0% | 5% | 59%
pytorch3d/structures0% | 0% | 34% | 25% | 40%
pytorch3d/io0% | 0% | 30% | 14% | 55%
pytorch3d/renderer0% | 0% | 10% | 19% | 70%
pytorch3d/datasets0% | 0% | 40% | 9% | 50%
ROOT0% | 0% | 84% | 0% | 15%
pytorch3d/ops0% | 0% | 5% | 21% | 72%
pytorch3d/transforms0% | 0% | 0% | 24% | 75%
pytorch3d/loss0% | 0% | 0% | 35% | 64%
website/pages0% | 0% | 0% | 0% | 100%
website/core0% | 0% | 0% | 0% | 100%
pytorch3d/vis0% | 0% | 0% | 0% | 100%
pytorch3d/common0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
pytorch3d/utils0% | 0% | 0% | 0% | 100%
packaging/linux_wheels0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
INLINE DEVICE bool draw()
in pytorch3d/csrc/pulsar/include/renderer.draw.device.h
712 55 30
GLOBAL void render()
in pytorch3d/csrc/pulsar/include/renderer.render.device.h
317 45 19
std::tuple Renderer::arg_check()
in pytorch3d/csrc/pulsar/pytorch/renderer.cpp
441 37 17
def main()
in projects/nerf/train_nerf.py
172 29 1
inline face_verts ClipTriByPlane()
in pytorch3d/csrc/iou_box3d/iou_utils.h
38 25 3
def __getitem__()
in pytorch3d/structures/pointclouds.py
37 24 2
def _parse_obj()
in pytorch3d/io/obj_io.py
64 23 2
void PointsToVolumesBackwardCpu()
in pytorch3d/csrc/points_to_volumes/points_to_volumes_cpu.cpp
104 22 11
HOST void destruct()
in pytorch3d/csrc/pulsar/include/renderer.destruct.device.h
65 22 1
def join_scene()
in pytorch3d/renderer/mesh/textures.py
52 20 1
def __init__()
in pytorch3d/structures/pointclouds.py
70 20 4
62 19 0
def update_padded()
in pytorch3d/structures/meshes.py
55 19 2
def __getitem__()
in pytorch3d/datasets/r2n2/r2n2.py
87 19 3
def join_cameras_as_batch()
in pytorch3d/renderer/camera_utils.py
30 18 1
def __getitem__()
in pytorch3d/structures/meshes.py
25 18 2
def join_meshes_as_batch()
in pytorch3d/structures/meshes.py
20 18 2
def __init__()
in pytorch3d/io/ply_io.py
48 18 2
void PointsToVolumesForwardCpu()
in pytorch3d/csrc/points_to_volumes/points_to_volumes_cpu.cpp
78 17 9
void forward()
in pytorch3d/csrc/pulsar/include/renderer.forward.device.h
269 16 13