/piCalculator

a C++ program that demonstrates the use of a thread pool for efficiently calculating the value of PI using multiple threads. The program utilizes a thread pool to distribute the computation of PI across available CPU cores, improving performance through parallel processing.

Primary LanguageMakefile

piCalculator

Title: Thread Pool for Fast Calculation of PI

Description: This repository contains a C++ program that demonstrates the use of a thread pool for efficiently calculating the value of PI using multiple threads. The program utilizes a thread pool to distribute the computation of PI across available CPU cores, improving performance through parallel processing. The calculation method employed is based on the Leibniz formula for PI. The program measures the time taken to compute PI and provides the results for comparison with the standard value of PI (M_PI).

Features:

Utilizes a thread pool to parallelize the computation of PI across multiple CPU cores. Implements the Leibniz formula for PI calculation. Measures and displays the time taken to calculate PI in milliseconds. Provides comparison results between the calculated PI and the standard value of PI (M_PI). Usage: To use the program, compile the provided source code and execute the resulting binary. Adjust the limit constant in the main function to change the precision of the PI calculation.

Dependencies: Requires a C++ compiler that supports C++11 features.

Contributions: Contributions, suggestions, and improvements are welcome. Feel free to fork the repository and submit pull requests.

License: This software is provided under the GNU General Public License (GPL).

Author: Bardi (Masoud) Parsi

Contact: farsi.masoud@gmail.com

Feel free to customize this explanation according to your preferences and add any additional details you deem necessary for your repository.