A place where I learn about CUDA 🐎
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.
To compile and run these programs, you need:
- An NVIDIA GPU with CUDA support
- CUDA Toolkit installed
- A C++ compiler (e.g.,
g++
ornvcc
)
To compile the Jacobi Iteration program, use the following command:
nvcc -o jacobi jacobi.cu
To compile the Gauss-Seidel Iteration program, use the following command:
nvcc -o gauss_seidel gauss_seidel.cu
To run the Jacobi Iteration program, use the following command:
./jacobi <matrix_size>
Replace <matrix_size> with the size of the matrix you want to use. For example, to run with a 32x32 matrix:
./jacobi 32
To run the Gauss-Seidel Iteration program, use the following command:
./gauss_seidel <matrix_size>
Replace <matrix_size> with the size of the matrix you want to use. For example, to run with a 64x64 matrix:
./gauss_seidel 64