C++ Concurrency, Part I Threads
This chapter introduces the C++ Concurrency library by first focusing on how it supports multithreading, that is creating programs that are executed by multiple independent threads of control. It shows how the library supports multithreading by introducing each syntax feature in the library, creatin...
Saved in:
| Published in | Financial Instrument Pricing Using C++ pp. 899 - 934 |
|---|---|
| Main Author | |
| Format | Book Chapter |
| Language | English |
| Published |
United Kingdom
John Wiley & Sons, Incorporated
2018
Wiley |
| Subjects | |
| Online Access | Get full text |
| ISBN | 0470971193 9780470971192 |
| DOI | 10.1002/9781119170518.ch28 |
Cover
| Summary: | This chapter introduces the C++ Concurrency library by first focusing on how it supports multithreading, that is creating programs that are executed by multiple independent threads of control. It shows how the library supports multithreading by introducing each syntax feature in the library, creating examples and then using these features to write simple and complete multithreaded programs. The chapter also provides initial examples and exercises from computational finance based on some of the numerical methods and option pricing models. Next, it discusses how to use threads to improve the speedup of compute‐intensive applications. The chapter also discusses how to parallelise the binomial method in a particular case. A special class of objects is atomic variables whose operations are guaranteed to be thread safe. The chapter argues that smart pointers are not thread safe in general, but C++ provides several atomic operations for them. |
|---|---|
| ISBN: | 0470971193 9780470971192 |
| DOI: | 10.1002/9781119170518.ch28 |