# parshcodes/acceleratedcomputing architecture

> Architecture diagram of the GitHub repository parshcodes/acceleratedcomputing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/parshcodes/acceleratedcomputing
- Repository: https://github.com/parshcodes/acceleratedcomputing

## Overview

##### Main Components & Their Technologies
- For each module, include sub-components or key files to represent its internal implementation:
- The DGEMM assignment is likely a matrix multiplication implementation that might also compare performance between CPU and other acceleration methods. Represent this with a block labeled “DGEMM” and note “matrix.c” as its implementation file.
- Simpson's Rule is a standalone module demonstrating integration, likely using parallel principles even though it is a C++ program.

##### Interactions and Data Flow
- For the Linear Equations assignment, show clearly how the program interacts with the Cusolver API (or external service/library).
- Control flow (e.g., setup, computation, and cleanup phases) inside modules that have distinct phases such as Jacobi and Reduction.

##### Architectural Patterns and Design Principles
- Where applicable, mark the use of acceleration frameworks (CUDA, OpenMP, MPI, OpenACC, HIP) as labels along the modules. This will help in immediately identifying the parallel programming strategy used in each part.

## Diagram (Mermaid)

```mermaid
flowchart TD
    repo["Accelerated Computing Coursework"]:::repo

    subgraph "Assignments"
      direction TB
      dg["DGEMM Matrix Multiplication: matrix.c"]
      ed["Edge Detection (CUDA): edge.c"]:::gpu
      jac_cpu["Jacobi CPU: jacobi_cpu.c"]
      jac_gpu["Jacobi GPU: jacobi_4.c"]:::gpu
      le["Linear Equations (Cusolver API): cusolver.c"]
      ll_make["Linked List Locking: Makefile"]
      ll_linked["Linked List Locking: linked"]
      ll_list["Linked List Locking: linkedlist.c"]
      mm["MatrixMultiplication in CUDA (Tiled): matrix.c"]:::gpu
      mm_tiled["MatrixMultiplication in CUDA (Tiled): matrixTiled"]:::gpu
      red["Reduction (CUDA): reduction.cu"]:::gpu
      red_dir["Reduction (CUDA): reduction"]:::gpu
      simp["Simpson's Rule: simpf.cpp"]
    end

    %% Repository connections to assignments (representing inclusion)
    repo --> dg
    repo --> ed
    repo --> jac_cpu
    repo --> le
    repo --> ll_make
    repo --> mm
    repo --> red
    repo --> simp

    %% Internal module interactions
    jac_cpu -->|"toGPU"| jac_gpu
    le -->|"calls"| cusolver["Cusolver Library"]:::external

    %% GPU accelerated modules interaction with GPU
    ed -->|"executes_on"| gpu["GPU Device"]:::gpu
    jac_gpu -->|"executes_on"| gpu
    mm -->|"executes_on"| gpu
    mm_tiled -->|"executes_on"| gpu
    red -->|"executes_on"| gpu
    red_dir -->|"executes_on"| gpu

    %% Click Events for Repository and modules
    click repo "https://github.com/parshcodes/acceleratedcomputing/blob/main/README.md"
    click dg "https://github.com/parshcodes/acceleratedcomputing/blob/main/DGEMM Matrix Multiplication/matrix.c"
    click ed "https://github.com/parshcodes/acceleratedcomputing/blob/main/Edge Detection(CUDA)/edge.c"
    click jac_gpu "https://github.com/parshcodes/acceleratedcomputing/blob/main/Jacobi(using GPU offloading and hardware threads)/jacobi_4.c"
    click jac_cpu "https://github.com/parshcodes/acceleratedcomputing/blob/main/Jacobi(using GPU offloading and hardware threads)/jacobi_cpu.c"
    click le "https://github.com/parshcodes/acceleratedcomputing/blob/main/Linear Equations(Cusolver API)/cusolver.c"
    click ll_make "https://github.com/parshcodes/acceleratedcomputing/tree/main/Linked List Locking/Makefile"
    click ll_linked "https://github.com/parshcodes/acceleratedcomputing/tree/main/Linked List Locking/linked"
    click ll_list "https://github.com/parshcodes/acceleratedcomputing/blob/main/Linked List Locking/linkedlist.c"
    click mm "https://github.com/parshcodes/acceleratedcomputing/blob/main/MatrixMultiplication in CUDA(Tiled)/matrix.c"
    click mm_tiled "https://github.com/parshcodes/acceleratedcomputing/tree/main/MatrixMultiplication in CUDA(Tiled)/matrixTiled"
    click red "https://github.com/parshcodes/acceleratedcomputing/blob/main/Reduction(CUDA)/reduction.cu"
    click red_dir "https://github.com/parshcodes/acceleratedcomputing/tree/main/Reduction(CUDA)/reduction"
    click simp "https://github.com/parshcodes/acceleratedcomputing/blob/main/Simpson's Rule/simpf.cpp"

    %% Styles
    classDef gpu fill:#ffdddd,stroke:#cc0000,stroke-width:2px;
    classDef external fill:#ddeeff,stroke:#003366,stroke-width:2px;
    classDef repo fill:#eeeeee,stroke:#333333,stroke-width:2px;
    class dg,ed,jac_cpu,jac_gpu,le,ll_make,ll_linked,ll_list,mm,mm_tiled,red,red_dir,simp fill:#ffffff,stroke:#000000,stroke-width:1px;
```
