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.

https://github.com/aidinhamedi/primegen_cpp_multithreaded

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
Last synced: 10 months ago · JSON representation

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
Created over 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

Multi-Threaded Prime Number Generator

C++

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

  1. Clone the repository: git clone https://github.com/Aydinhamedi/PrimeGen_CPP_Multithreaded.git
  2. Navigate to the project directory: cd prime-PrimeGen_CPP_Multithreaded
  3. Compile the project:
    • If you have CMake installed, you can build the project using: cmake . make
    • Alternatively, compile the main.cpp file directly with your C++ compiler. ### Or simply go to the github releases. ### Running
  • 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

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
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels