https://github.com/babak2/optimizedsum
Optimized Parallel Sum program demonstrating CPU vs GPU performance
https://github.com/babak2/optimizedsum
cuda cuda-programming gpu-acceleration gpu-computing gpu-parallelism visual-studio
Last synced: 3 months ago
JSON representation
Optimized Parallel Sum program demonstrating CPU vs GPU performance
- Host: GitHub
- URL: https://github.com/babak2/optimizedsum
- Owner: babak2
- License: mit
- Created: 2023-11-04T20:13:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-09T16:43:31.000Z (over 1 year ago)
- Last Synced: 2025-02-01T19:44:34.867Z (5 months ago)
- Topics: cuda, cuda-programming, gpu-acceleration, gpu-computing, gpu-parallelism, visual-studio
- Language: Cuda
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OptimizedSum
OptimizedSum is a C++ program developed on Visual Studio that provides an optimized parallel method for calculating the sum of numbers.
It demonstrates the performance (execution speed) difference between CPU and CUDA implementations.
## Installation
You can install OptimizedSum by following these steps:
1. Clone the GitHub repository to your local machine:
```
git clone https://github.com/babak2/OptimizedSum.git
```Navigate to the project directory:
```
cd OptimizedSum
```3. Build the program using Visual Studio or your preferred C++ compiler.
4. Run the compiled program to perform optimized summation calculations.
## Program Requirement
To use OptimizedSum, you need the following software and hardware requirements:
- C++ compiler (e.g., Visual Studio, g++, clang++)
- CMake (optional, for building with CMake)
- CUDA (Compute Unified Device Architecture) from NVIDIA installed, along with an NVIDIA GPU, if you plan to utilize GPU acceleration for certain calculations.Make sure you have CUDA from NVIDIA installed and properly configured with a compatible NVIDIA GPU if you intend to take advantage of GPU acceleration.
Users without an NVIDIA GPU may still use the CPU-based functionality of the program.
## Usage
To use OptimizedSum, follow these steps:
1. Compile the program as mentioned in the Installation section.
2. Run the compiled executable from the command line.
``` ./OptimizedSum ```4. Follow the on-screen instructions to input numbers for summation.
5. The program will calculate the sum of the entered numbers using an optimized algorithm.
## Output Example
Here's an example of the OptimizedSum output:
CPU Sum: 494483662 - Time: 0.035 seconds
CUDA Sum: 494483662 - Time: 0.021 seconds
CPU Time: 0.035 seconds
CUDA Time: 0.021 seconds
Speedup: 1.66667x## License
This project is licensed under the MIT License. See the LICENSE file for details.
## Author
Babak Mahdavi Aresetani