multi-threaded C/C++ program

the program should create a number of threads and have each thread test a portion of the numbers for primeness. That is, suppose the user enters the value 5000. And one thread finds the primes between 0 and 1000, and another thread finds the primes between 1000 and 2000 etc.

in C++ has a set class that is very similar to the TreeSet that is in the Java library. It is a templated class so when you declare a set you have to give the type of data that the set will hold. So you might say: set<int> example; Your threads will be testing integers to see if they are prime. If a number is prime it should be added to your set. The C++ set class is implemented using a tree in the same way that the Java TreeSet is implemented. The data in the set is kept in sorted order. Each time you insert a new value into the set the set is modified and pointers are changed. Therefore adding an element to a set is a critical section and can be protected with a mutex.

Taidot: C++ -ohjelmointi

Näytä lisää: multithreading in c++ pdf, c++ thread class, c++ 11 multithreading, multithreading in c++ linux, multithreading in c++ interview questions, multithreading c++ geeksforgeeks, c++ multithreading tutorial, multithreading in c++ windows, example php code create order report using fpdf, magento create order status, creloaded create order warning invalid argument supplied foreach, create order form using access, magento create order, customer order form example web page template, magento webservices create order

Tietoa työnantajasta:
( 2 arvostelua ) New Rochelle, United States

Projektin tunnus: #15455192

Myönnetty käyttäjälle:


expert in c++ and Java, written many multi threading applications , this is VERY simple. Relevant Skills and Experience c++ expert, multi threading game design Proposed Milestones $50 USD - whole project

50 $ USD 1 päivässä
(4 arvostelua)

4 freelanceria on tarjonnut keskimäärin 35 $ tähän työhön


I can deliver this multithreaded prime checker program in C++ within 24 hours. I've already done something similar a week ago. I didn't use mutexes because I used arrays. Yet I can do it with mutexes. Relevant Skills Lisää

35 $ USD 1 päivässä
(36 arvostelua)
30 $ USD 1 päivässä
(3 arvostelua)
25 $ USD 1 päivässä
(1 arvostelu)