# mattiagrigoli/high_perfomance_assignment architecture

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

- Interactive diagram: https://gitdiagram.com/mattiagrigoli/high_perfomance_assignment
- Repository: https://github.com/mattiagrigoli/high_perfomance_assignment

## Overview

This repository is an OpenMP-oriented collection of independent PolyBench-style benchmarks, not one application pipeline. Each benchmark generally initializes arrays, runs a computational kernel, and emits results; the sampled correlation source shows that flow directly. The README documents compiling and running correlation with OpenMP target offload. The tree also exposes application, data-mining, linear-algebra, medley, and stencil branches. Many benchmark implementations are unsampled, so their internal calls and shared-runtime wiring are not asserted here.

Main entry points: [`OpenMP/datamining/correlation/correlation.c`](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c) (Correlation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_apps["Applications"]
  node_bfs["BFS<br/>[bfs.cpp]"]
  node_graphgen["Graph generator<br/>[graphgen.cpp]"]
  node_cfd["Euler CFD<br/>[euler3d_cpu.cpp]"]
  node_kmeans["K-means"]
  node_kmeans_cli["K-means options<br/>[getopt.c]"]
  node_particle["Particle filter<br/>[particle_filter.c]"]
end

subgraph group_mining["Data Mining"]
  node_correlation["Correlation<br/>[correlation.c]"]
  node_covariance["Covariance<br/>[covariance.c]"]
  node_corr_init["Input initialization<br/>[correlation.c]"]
  node_corr_kernel["Correlation kernel<br/>[correlation.c]"]
  node_corr_output["Matrix output<br/>[correlation.c]"]
end

subgraph group_linear["Linear Algebra"]
  node_linear_kernels["Linear algebra kernels"]
  node_linear_solvers["Linear algebra solvers"]
end

subgraph group_medley["Medley"]
  node_floyd["Floyd–Warshall<br/>[floyd-warshall.c]"]
  node_regdetect["Reg detection<br/>[reg_detect.c]"]
end

subgraph group_stencils["Stencils"]
  node_stencils["Stencil benchmarks"]
end

subgraph group_support["Benchmark Support"]
  node_polybench["PolyBench support<br/>[polybench.c]"]
  node_common_polybench["Common PolyBench support<br/>[polybench.c]"]
end

node_user(("Benchmark user"))

node_user -->|"runs"| node_correlation
node_correlation -->|"initializes"| node_corr_init
node_correlation -->|"calls"| node_corr_kernel
node_correlation -->|"prints"| node_corr_output

click node_bfs "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/bfs/bfs.cpp"
click node_graphgen "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/bfs/data/inputGen/graphgen.cpp"
click node_cfd "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/cfd/euler3d_cpu.cpp"
click node_kmeans "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/kmeans/kmeans_clustering.c"
click node_kmeans_cli "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/kmeans/getopt.c"
click node_particle "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/particlefilter/particle_filter.c"
click node_correlation "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c"
click node_covariance "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/covariance/covariance.c"
click node_linear_kernels "https://github.com/mattiagrigoli/high_perfomance_assignment/tree/main/OpenMP/linear-algebra/kernels"
click node_linear_solvers "https://github.com/mattiagrigoli/high_perfomance_assignment/tree/main/OpenMP/linear-algebra/solvers"
click node_floyd "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/medley/floyd-warshall/floyd-warshall.c"
click node_regdetect "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/medley/reg_detect/reg_detect.c"
click node_stencils "https://github.com/mattiagrigoli/high_perfomance_assignment/tree/main/OpenMP/stencils"
click node_corr_init "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c"
click node_corr_kernel "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c"
click node_corr_output "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c"
click node_polybench "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/utilities/polybench.c"
click node_common_polybench "https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/common/polybench.c"

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_bfs,node_graphgen,node_cfd,node_kmeans,node_kmeans_cli,node_particle,node_user toneBlue
class node_correlation,node_covariance,node_corr_init,node_corr_kernel,node_corr_output toneAmber
class node_linear_kernels,node_linear_solvers toneMint
class node_floyd,node_regdetect toneRose
class node_stencils toneIndigo
class node_polybench,node_common_polybench toneTeal
```

## Components

### Applications

- [BFS](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/bfs/bfs.cpp): `OpenMP/apps/bfs/bfs.cpp`
- [Graph generator](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/bfs/data/inputGen/graphgen.cpp): `OpenMP/apps/bfs/data/inputGen/graphgen.cpp`
- [Euler CFD](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/cfd/euler3d_cpu.cpp): `OpenMP/apps/cfd/euler3d_cpu.cpp`
- [K-means](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/kmeans/kmeans_clustering.c): `OpenMP/apps/kmeans/kmeans_clustering.c`
- [K-means options](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/kmeans/getopt.c): `OpenMP/apps/kmeans/getopt.c`
- [Particle filter](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/apps/particlefilter/particle_filter.c): `OpenMP/apps/particlefilter/particle_filter.c`

### Data Mining

- [Correlation](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c): `OpenMP/datamining/correlation/correlation.c`
- [Covariance](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/covariance/covariance.c): `OpenMP/datamining/covariance/covariance.c`
- [Input initialization](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c): `OpenMP/datamining/correlation/correlation.c`
- [Correlation kernel](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c): `OpenMP/datamining/correlation/correlation.c`
- [Matrix output](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/datamining/correlation/correlation.c): `OpenMP/datamining/correlation/correlation.c`

### Linear Algebra

- [Linear algebra kernels](https://github.com/mattiagrigoli/high_perfomance_assignment/tree/main/OpenMP/linear-algebra/kernels): `OpenMP/linear-algebra/kernels`
- [Linear algebra solvers](https://github.com/mattiagrigoli/high_perfomance_assignment/tree/main/OpenMP/linear-algebra/solvers): `OpenMP/linear-algebra/solvers`

### Medley

- [Floyd–Warshall](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/medley/floyd-warshall/floyd-warshall.c): `OpenMP/medley/floyd-warshall/floyd-warshall.c`
- [Reg detection](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/medley/reg_detect/reg_detect.c): `OpenMP/medley/reg_detect/reg_detect.c`

### Stencils

- [Stencil benchmarks](https://github.com/mattiagrigoli/high_perfomance_assignment/tree/main/OpenMP/stencils): `OpenMP/stencils`

### Benchmark Support

- [PolyBench support](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/OpenMP/utilities/polybench.c): `OpenMP/utilities/polybench.c`
- [Common PolyBench support](https://github.com/mattiagrigoli/high_perfomance_assignment/blob/main/common/polybench.c): `common/polybench.c`

### Other components

- **Benchmark user**

## Connections

- Benchmark user → Correlation: runs
- Correlation → Input initialization: initializes (evidence: `OpenMP/datamining/correlation/correlation.c`)
- Correlation → Correlation kernel: calls (evidence: `OpenMP/datamining/correlation/correlation.c`)
- Correlation → Matrix output: prints (evidence: `OpenMP/datamining/correlation/correlation.c`)
