# verrpower/pge2m architecture

> Architecture diagram of the GitHub repository verrpower/pge2m, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/verrpower/pge2m
- Repository: https://github.com/verrpower/pge2m

## Overview

This repository is a C++ matrix-computation project centered on cache-tiled matrix storage and multiplication, with SIMD tile kernels and optional scheduler-backed execution. A visible client path is the top-level matrix program using the matrix API; the L3 validation program also exercises tiled matrices and vectorized random initialization. The tree includes exploratory fast-log, trigonometric, and approximation work, but no README describes product capabilities. Several implementation excerpts are partial, so the graph omits unshown internal dispatch and data-flow relationships.

Main entry points: [`validation/gemm/L3test/L3test.cpp`](https://github.com/verrpower/pge2m/blob/main/validation/gemm/L3test/L3test.cpp) (L3 matrix validation), [`PGEM2/VPRNG.cpp`](https://github.com/verrpower/pge2m/blob/main/PGEM2/VPRNG.cpp) (Vector RNG), [`validation/gemm/topInt/matmul.cpp`](https://github.com/verrpower/pge2m/blob/main/validation/gemm/topInt/matmul.cpp) (Matrix program), [`PGEM2/MLCTiledMat.cpp`](https://github.com/verrpower/pge2m/blob/main/PGEM2/MLCTiledMat.cpp) (Tiled matrix API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_matrix["Tiled Matrices"]
  node_tiledmat["Tiled matrix API<br/>[MLCTiledMat.cpp]"]
  node_l3validation["L3 matrix validation<br/>[L3test.cpp]"]
  node_l2validation["L2 kernel validation<br/>[L2test.cpp]"]
  node_l1validation["L1 kernel validation<br/>[L1test.cpp]"]
end

subgraph group_compute["Compute Support"]
  node_tilekernel["SIMD tile kernels<br/>[kernel48x48.cpp]"]
  node_scheduler["SPMC scheduler<br/>[SPMC.cpp]"]
  node_rng["Vector RNG<br/>[VPRNG.cpp]"]
  node_advancedmath["Advanced math<br/>[adv_math.cpp]"]
end

subgraph group_utilities["Shared Utilities"]
  node_deque["Array deque<br/>[ArrayDeque.h]"]
  node_timer["Iteration timer"]
  node_logger["Log formatting<br/>[log_formatter.h]"]
end

subgraph group_exploration["Math Exploration"]
  node_fastlog["Fast-log experiments<br/>[fastlog_s.cpp]"]
  node_remez["Remez approximation<br/>[remez.py]"]
  node_sincosprobe["Sin-cos probes"]
end

node_engineer(("Matrix user"))
node_client["Matrix program<br/>[matmul.cpp]"]

node_engineer -->|"runs"| node_client
node_client -->|"uses API"| node_tiledmat
node_l3validation -->|"exercises"| node_tiledmat
node_l3validation -->|"generates with"| node_rng
node_l1validation -->|"invokes kernels"| node_tilekernel
node_l2validation -->|"uses kernels"| node_tilekernel
node_scheduler -->|"uses queue"| node_deque
node_timer -->|"formats output"| node_logger
node_rng -->|"formats logs"| node_logger

click node_client "https://github.com/verrpower/pge2m/blob/main/validation/gemm/topInt/matmul.cpp"
click node_tiledmat "https://github.com/verrpower/pge2m/blob/main/PGEM2/MLCTiledMat.cpp"
click node_tilekernel "https://github.com/verrpower/pge2m/blob/main/PGEM2/kernel48x48.cpp"
click node_scheduler "https://github.com/verrpower/pge2m/blob/main/PGEM2/SPMC.cpp"
click node_rng "https://github.com/verrpower/pge2m/blob/main/PGEM2/VPRNG.cpp"
click node_advancedmath "https://github.com/verrpower/pge2m/blob/main/PGEM2/adv_math.cpp"
click node_l3validation "https://github.com/verrpower/pge2m/blob/main/validation/gemm/L3test/L3test.cpp"
click node_l2validation "https://github.com/verrpower/pge2m/blob/main/validation/gemm/L2test/L2test.cpp"
click node_l1validation "https://github.com/verrpower/pge2m/blob/main/validation/gemm/L1test/L1test.cpp"
click node_deque "https://github.com/verrpower/pge2m/blob/main/include/ArrayDeque.h"
click node_timer "https://github.com/verrpower/pge2m/blob/main/include/AutoIterationTimer.h"
click node_logger "https://github.com/verrpower/pge2m/blob/main/include/log_formatter.h"
click node_fastlog "https://github.com/verrpower/pge2m/blob/main/advmathlab/fastlog/fastlog_s.cpp"
click node_remez "https://github.com/verrpower/pge2m/blob/main/advmathlab/remez/remez.py"
click node_sincosprobe "https://github.com/verrpower/pge2m/blob/main/advmathlab/sincos/svml_sincos_probe.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tiledmat,node_l3validation,node_l2validation,node_l1validation,node_engineer toneBlue
class node_tilekernel,node_scheduler,node_rng,node_advancedmath toneAmber
class node_deque,node_timer,node_logger toneMint
class node_fastlog,node_remez,node_sincosprobe toneRose
class node_client toneTeal
```

## Components

### Tiled Matrices

- [Tiled matrix API](https://github.com/verrpower/pge2m/blob/main/PGEM2/MLCTiledMat.cpp): `PGEM2/MLCTiledMat.cpp`
- [L3 matrix validation](https://github.com/verrpower/pge2m/blob/main/validation/gemm/L3test/L3test.cpp): `validation/gemm/L3test/L3test.cpp`
- [L2 kernel validation](https://github.com/verrpower/pge2m/blob/main/validation/gemm/L2test/L2test.cpp): `validation/gemm/L2test/L2test.cpp`
- [L1 kernel validation](https://github.com/verrpower/pge2m/blob/main/validation/gemm/L1test/L1test.cpp): `validation/gemm/L1test/L1test.cpp`

### Compute Support

- [SIMD tile kernels](https://github.com/verrpower/pge2m/blob/main/PGEM2/kernel48x48.cpp): `PGEM2/kernel48x48.cpp`
- [SPMC scheduler](https://github.com/verrpower/pge2m/blob/main/PGEM2/SPMC.cpp): `PGEM2/SPMC.cpp`
- [Vector RNG](https://github.com/verrpower/pge2m/blob/main/PGEM2/VPRNG.cpp): `PGEM2/VPRNG.cpp`
- [Advanced math](https://github.com/verrpower/pge2m/blob/main/PGEM2/adv_math.cpp): `PGEM2/adv_math.cpp`

### Shared Utilities

- [Array deque](https://github.com/verrpower/pge2m/blob/main/include/ArrayDeque.h): `include/ArrayDeque.h`
- [Iteration timer](https://github.com/verrpower/pge2m/blob/main/include/AutoIterationTimer.h): `include/AutoIterationTimer.h`
- [Log formatting](https://github.com/verrpower/pge2m/blob/main/include/log_formatter.h): `include/log_formatter.h`

### Math Exploration

- [Fast-log experiments](https://github.com/verrpower/pge2m/blob/main/advmathlab/fastlog/fastlog_s.cpp): `advmathlab/fastlog/fastlog_s.cpp`
- [Remez approximation](https://github.com/verrpower/pge2m/blob/main/advmathlab/remez/remez.py): `advmathlab/remez/remez.py`
- [Sin-cos probes](https://github.com/verrpower/pge2m/blob/main/advmathlab/sincos/svml_sincos_probe.cpp): `advmathlab/sincos/svml_sincos_probe.cpp`

### Other components

- **Matrix user**
- [Matrix program](https://github.com/verrpower/pge2m/blob/main/validation/gemm/topInt/matmul.cpp): `validation/gemm/topInt/matmul.cpp`

## Connections

- Matrix user → Matrix program: runs
- Matrix program → Tiled matrix API: uses API (evidence: `validation/gemm/topInt/matmul.cpp`)
- L3 matrix validation → Tiled matrix API: exercises (evidence: `validation/gemm/L3test/L3test.cpp`)
- L3 matrix validation → Vector RNG: generates with (evidence: `validation/gemm/L3test/L3test.cpp`)
- L1 kernel validation → SIMD tile kernels: invokes kernels (evidence: `validation/gemm/L1test/L1test.cpp`)
- L2 kernel validation → SIMD tile kernels: uses kernels (evidence: `validation/gemm/L2test/L2test.cpp`)
- SPMC scheduler → Array deque: uses queue
- Iteration timer → Log formatting: formats output (evidence: `include/AutoIterationTimer.h`)
- Vector RNG → Log formatting: formats logs (evidence: `PGEM2/VPRNG.cpp`)
