https://github.com/ahmadrafidev/learn-cuda
A place where I learn about CUDA
https://github.com/ahmadrafidev/learn-cuda
cuda cuda-programming gpu os parallel-programming
Last synced: about 1 year ago
JSON representation
A place where I learn about CUDA
- Host: GitHub
- URL: https://github.com/ahmadrafidev/learn-cuda
- Owner: ahmadrafidev
- Created: 2024-05-07T03:49:07.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T05:03:36.000Z (almost 2 years ago)
- Last Synced: 2025-04-13T03:57:21.331Z (about 1 year ago)
- Topics: cuda, cuda-programming, gpu, os, parallel-programming
- Language: Cuda
- Homepage:
- Size: 993 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parallel Programming Source Code
A place where I learn about CUDA 🐎
## Introduction
This repository contains implementations of Parallel Jacobi Iteration and Gauss-Seidel Iteration using CUDA. These methods are used to solve systems of linear equations and are optimized to run on NVIDIA GPUs.
## Prerequisites
To compile and run these programs, you need:
- An NVIDIA GPU with CUDA support
- CUDA Toolkit installed
- A C++ compiler (e.g., `g++` or `nvcc`)
## Compilation
### Jacobi Iteration
To compile the Jacobi Iteration program, use the following command:
```bash
nvcc -o jacobi jacobi.cu
```
### Gauss-Seidel Iteration
To compile the Gauss-Seidel Iteration program, use the following command:
```bash
nvcc -o gauss_seidel gauss_seidel.cu
```
## Running the Programs
### Jacobi Iteration
To run the Jacobi Iteration program, use the following command:
```bash
./jacobi
```
Replace with the size of the matrix you want to use. For example, to run with a 32x32 matrix:
```bash
./jacobi 32
```
### Gauss-Seidel Iteration
To run the Gauss-Seidel Iteration program, use the following command:
```bash
./gauss_seidel
```
Replace with the size of the matrix you want to use. For example, to run with a 64x64 matrix:
```bash
./gauss_seidel 64
```
## Example Output
![Gauss Seidel 16]()
![Gauss Seidel 32]()
![Gauss Seidel 64]()