Introduction
This part is a self-contained tutorial and reference on high-performance programming in C++, with a special focus on parallel and concurrent programming. The second part applies the notions and constructs developed here to build a generic parallel financial simulation library.
A working knowledge of C++ is expected from readers. We cover modern and parallel C++11, and we illustrate the application of many STL (standard template library) data structures and algorithms, but we don't review the basic syntax, constructs, and idioms of C++. Readers unfamiliar with basic C++ should read an introductory textbook before proceeding. Mark Joshi's website http://www.markjoshi.com/RecommendedBooks.html#C contains a list of recommended C++ textbooks.
Readers already familiar with advanced C++ and concurrent programming, or those using different material, such as Anthony Williams' [15], may skip this part and move on to Parts II and III. They will need the thread pool, which we build in Section 3.18 and use in the rest of the publication. The code for the thread pool is in ThreadPool.h, ThreadPool.cpp, and ConcurrentQueue.h in our repository.
PARALLEL ALGORITHMS
Parallel programming may allow calculations to complete faster by computing various parts simultaneously on multiple processing units. The improvement in speed is at best linear in the number of units. To hit a linear improvement (or any improvement at all), parallel algorithms must be carefully designed and implemented. ...
Get Modern Computational Finance now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.