This project implements the Monte Carlo method for approximating the value of
For GUI based building, use the Code::Blocks project file.
In the main file (Main.cpp), the flow of execution is conditioned by the SECUENCIAL and PARALELO macros, which determine which code section will run. The purpose of this approach is to enable direct comparison between the sequential and parallel versions of the
-
Sequential Version (
SECUENCIAL):- If the
SECUENCIALmacro is defined, the code runs the$\pi$ calculation using a single processing thread. - The execution time is measured using the C++
chronolibrary to determine how long the calculation takes. - The estimated value of
$\pi$ and the execution time are printed to the console.
- If the
-
Parallel Version (
PARALELO):- If the
PARALELOmacro is defined, the$\pi$ calculation is distributed across multiple threads using the#pragma omp paralleldirective. - Just like in the sequential version, the execution time is measured.
- The estimated value of
$\pi$ and the execution time are printed to the console.
- If the
This project was written as part of the Masters in Computer Science course "Parallel Computing" at the University of the Bío-Bío.
Some of the TeX/PDF files are in Spanish, as the course was taught in Spanish.