https://github.com/aidinhamedi/primegen_cpp_multithreaded
A multi-threaded prime number generator that efficiently finds and logs prime numbers to a file. Utilizes modern C++ features like atomic variables, mutexes, and condition variables for thread synchronization. The program dynamically adjusts the number of threads based on the hardware concurrency or a custom number, ensuring optimal performance.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Repository
A multi-threaded prime number generator that efficiently finds and logs prime numbers to a file. Utilizes modern C++ features like atomic variables, mutexes, and condition variables for thread synchronization. The program dynamically adjusts the number of threads based on the hardware concurrency or a custom number, ensuring optimal performance.
Basic Info
- Host: GitHub
- Owner: AidinHamedi
- License: mit
- Language: C++
- Default Branch: main
- Size: 16.6 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
Multi-Threaded Prime Number Generator
This project is a multi-threaded prime number generator written in C++. It efficiently finds prime numbers and logs them to a file.
Getting Started
Prerequisites
- A C++ compiler that supports C++11 or later.
- CMake (optional, for building the project).
Building
- Clone the repository:
git clone https://github.com/Aydinhamedi/PrimeGen_CPP_Multithreaded.git - Navigate to the project directory:
cd prime-PrimeGen_CPP_Multithreaded - Compile the project:
- If you have CMake installed, you can build the project using:
cmake . make - Alternatively, compile the
main.cppfile directly with your C++ compiler. ### Or simply go to the github releases. ### Running
- If you have CMake installed, you can build the project using:
- Run the compiled binary:
./PrimeGen_CPP_Multithreaded.exe - The program will start generating prime numbers and logging them to
Prime_nums.txt.
Usage
The program automatically adjusts the number of threads based on the hardware concurrency or a custom number for optimal performance. It displays the speed of prime number generation in primes per second.
Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues for any improvements or bug fixes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Owner
- Name: Aidin
- Login: AidinHamedi
- Kind: user
- Repositories: 1
- Profile: https://github.com/AidinHamedi
Segmentation fault
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0