This project demonstrates matrix multiplication using the POSIX threads (pthreads) library. The implementation is designed to be easily understandable and includes detailed comments for better comprehension. The project is configured to work on Windows using the pthreads-win32 compatibility layer.
- Matrix Multiplication: Efficiently multiplies two matrices using pthreads.
- Portable: Uses local dependencies for easier management and portability.
- CMake Integration: Automates the build process and handles the copying of necessary DLL files.
- CMake (version 3.16 or higher)
- A C++ compiler that supports C++17
- pthreads-win32 library (included in the dependencies directory)
- Clone the repository:
git clone https://github.com/Syed-Arieb/PThread-Matrix-Multiplication-Assignment.git
cd PThread-Matrix-Multiplication-Assignment
- Create a build directory and navigate into it:
mkdir build
cd build
- Run CMake to configure the project:
cmake -G "Visual Studio 16 2019" ..
- Build the project using CMake:
cmake --build . --config Release
After building the project, you can run the executable:
Release\PThreadMatrixMul.exe
project_dir/
├── dependencies/
│ ├── include/
│ ├── lib/
│ └── dll/
├── main.cpp
├── CMakeLists.txt
└── build/
Thanks to the pthreads-win32 project for providing the compatibility layer for POSIX threads on Windows.