GPU621/CamelCaseTeam

From CDOT Wiki
Revision as of 02:03, 22 July 2021 by Htruong (talk | contribs) (C++ Threading - explanation of C++ thread library)
Jump to: navigation, search


GPU621/DPS921 | Participants | Groups and Projects | Resources | Glossary

Project Name

C++11 Threads Library Comparison to OpenMP

Group Members

Andrei Fedchenko Hung Truong Ren Ren

Overview

Our team will do a research on comparison between c++ 11 threads library and openmp. We will code problems with both libraries to demonstrate the coding differences and do the performance analysis on those two approaches. We will highlight the techniques and best practices to achieve the best performance and avoid the pitfalls.

C++ Threading

C++ threading consists of the creation of a thread that works on a function. By having multiple threads, multiple functions are able to be performed at the same time which enables parallel processing.

template<class Function, class... args>

explicit thread( Function&& f, Args&&... args);

As seen above, a single thread takes a function through overloading and performs the task by passing the arguments to the function parameter which would execute separate to other threads. Once these threads are finished performing their function, the child thread must be joined using the .join() function in the thread library to the parent thread.

OpenMP Threading