To implement a C / C ++ solution that solves the problem of factoring a given N number ([login to view URL]ón_%C3%AEntegirilor) as a product of prime numbers.
The solution is implemented sequentially but also in parallel using OMP structures.
For a received N number (which can be represented on an unsigned integer on 64 bits of type long long or long long int) determine whether it can be represented as a product of 2 prime numbers p and q (N = p * q).
The .cpp file will contain:
- sequential solution (function) that determines the prime numbers p and q (if any); if there are several possible combinations the first combination is returned
- parallel solution (on at least 2 cores) that uses basic OMP structures (but without parallel for) in which the distribution of values on cores is done manually(the programmer will manage the distribution of core processing)
- parallel solution (at least 2 cores) that uses a parallel for structure with different types of scheduler (optional) in order to check / determine prime numbers, a function with sequential processing and a version with parallel processing in OMP are implemented (the sequential variant will be used for the sequential solution)
In main () all these methods will be tested and the time required to execute them will be measured. The methods will be tested for 2 different N numbers (initialized in main) with high values (the idea is that the processing for the sequential solution takes about 20-40 seconds).
Recommendation to choose 2 long long numbers
The .cpp file containing the solution and a .txt document in which they are indicated will be loaded:
- the time required to run the parallel sequence for the chosen numbers
- the time required to run the parallel solution for the chosen numbers
- hardware used (processor type, number of cores, RAM, SDD or HDD)
Được trao cho:
11 freelancer chào giá trung bình$30 cho công việc này
Hi! I am an expert in C, C++ and data structures. I would be easily able to help you regarding any task related to them. Kindly message me to discuss more details. Thank you!
I know complete C++ along with it i also know DS and Algo . i have a 5 * on HackerRank for c++ and problem solving. so i think i can do this for you.