Skip to content

Final project done for the Parallel and Distributed Systems: paradigms and models (2019).

Notifications You must be signed in to change notification settings

Ruggiero-Santo/Parallel-Distributed-Systems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Parallel-Distributed-Systems

Final project done for the Parallel and Distributed Systems: paradigms and models (2019).

Implementation in C++ of the "Divide and Conquer" paradigm using only the standard libraries. The implemented code gives the possibility to execute in parallel, with a custom number of threads, any problem that can be solved with this paradigm. The problem must be defined by four basic functions that model the problem and the resolution steps:

  1. std::vector Divide(inType) : Divides the problem into two or more simpler sub-problems
  2. bool BaseCaseTest(inType) : Checks if the input problem is the base case
  3. outType BaseCaseSolution(inType) : Solves the base problem
  4. outType ConquerFunc(std::vector&) : Merges two solutions

Thanks to the use of templates, functions can handle any type in both input and output (must be consistent between functions).

The implemented solution although very general makes a basic assumption that the aggregation function respects the commutative property. This can be a problem when used when the order of aggregation is important.

⚠️ WARNING

- If you want to test the code make sure you have enough physical cores 
- otherwise the high number of threads will only produce hoverheads.

About

Final project done for the Parallel and Distributed Systems: paradigms and models (2019).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages