Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.38 KB

File metadata and controls

37 lines (24 loc) · 1.38 KB

Consumer-Producer Model using Mutex in C++


Preface

This project showcases a producer-consumer model using mutual exclusions (Mutex) using C++ in order to draw the well known Barnsley fern (see resulting image below). Therein, the computational workload can distributed among several workers in order to speed up the entire process. The number of workers is selectable and can be adjusted according to the computational hardware at hand.

resulting barnsley fern


Repository Structure

  • assets includes image of the final Barnsely fern
  • src contains source files of the project

Prerequisits for Linux Enviroment (Tested on Ubuntu 20.04)

  • CMake - Platform for build automation, testing and packaging using a compiler-independent method
    sudo apt-get update
    sudo apt-get install cmake gcc clang gdb built-essential

  • imagemagick library and dependencies in order to be able to work with PNG images
    sudo apt-get install imagemagick libpng-dev zlib1g-dev


Execution

In order to make use of the code, please invoke make compile in the root directory of this repository. Subsequently:

  1. cd src/
  2. cd build/
  3. ./BarnselyFern