Skip to main content
Log in

Support for Parallel and Concurrent Programming in C++

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

C++ was originally designed as a sequential programming language. For development of multithreaded applications, libraries, such as Pthreads, Windows threads, and Boost, are traditionally used. The C++11 standard introduced some basic concepts and means for developing parallel and concurrent programs, but the direct use of these low-level means requires high programming skills and significant efforts. The absence of high-level models of parallelism in C++ is somewhat compensated for by various parallel libraries and directive parallelization tools (such as OpenMP), as well as by language extensions supported by some compilers (Intel CilkPlus). Nevertheless, we still require more advanced means to express parallelism in programs at the level of language standard and language library. In this survey, we consider the means for parallel and concurrent programming that are included into the C++17 standard, as well as some capabilities that are to be expected in the future standards.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Shumakov, S.M., Obzor metodov optimizatsii koda dlya protsessorov s podderzhkoi parallelizma na urovne komand (Survey of Code Optimization Methods for Processors Supporting Instruction-Level Parallelism), Moscow: Inst. Sistemnogo Program. Ross. Akad. Nauk, 2002, pp. 4–59.

    Google Scholar 

  2. V'yukova, N.I., Galatenko, V.A., and Samborskii, S.V., Use of vector extensions for modern processors, Program. Inzheneriya, 2016, no. 4, pp. 147–157.

    Article  Google Scholar 

  3. Volkonskii, V.Yu., Breger, A.V., Buchnev, A.Yu., Grabezhnoi, A.V., Ermolitskii, A.V., Mukhanov, L.E., Neimanzade, M.I., Stepanov, P.A., and Chetverina, O.A., Software parallelization methods in an optimizing compiler, Vopr. Radioelektron., 2012, vol. 4, no. 3, pp. 63–88.

    Google Scholar 

  4. Cetus: A Source-to-Source Compiler Infrastructure for C Programs. https://engineering.purdue.edu/Cetus.

  5. Bakhtin, V.A., Zhukova, O.F., Kataev, N.A., Kolganov, A.S., Kryukov, V.A., Podderyugina, N.V., Pritula, M.N., Savitskaya, O.A., and Smirnov, A.A., Automating the parallelization of software complexes, Tr. XVIII Vseros. nauchn. konf. Nauchnyi servis v seti Internet (Novorossiisk, 2016) (Proc. XVIII All-Rus. Sci. Conf. Scientific Service on the Internet), Moscow: Inst. Prikl. Mat. Keldysha, 2016, pp. 76–85.

    Google Scholar 

  6. HSA Foundation. http://www.hsafoundation.com/standards.

  7. Paltashev, T. and Perminov, I., Heterogeneous architecture for CPU, GPU, and DSP, Otkrytye sist. SUBD, 2013, no. 8, pp. 12–15. http://www.osp.ru/os/2013/08/13037850.

    Google Scholar 

  8. Boehm, H.-J., Threads cannot be implemented as a library, Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation (PLDI), 2005, pp. 261–268.

    Google Scholar 

  9. V’yukova, N.I., Galatenko, V.A., and Samborskii, S.V., Multithreading support in the C11 standard, Program. Inzheneriya, 2013, no. 9, pp. 2–8.

    Google Scholar 

  10. V’yukova, N.I., Galatenko, V.A., and Samborskii, S.V., Memory model of multithreaded programs in the C11 standard, Program. Inzheneriya, 2013, no. 10, pp. 2–9.

    Google Scholar 

  11. Williams, A., C++ Concurrency in Action: Practical Multithreading, Manning Publications, 2012.

    Google Scholar 

  12. Intel Developer Zone, Intel Threading Building Blocks. https://software.intel.com/en-us/intel-tbb.

  13. Microsoft Developer Network, C++ AMP Overview. https://msdn.microsoft.com/ru-ru/library/hh265136. aspx.

  14. NVIDIA Accelerated Computing, Thrust. https://developer.nvidia.com/thrust.

  15. Dvorskii, M., Parallel algorithms of the standard template library. https://events.yandex.ru/lib/talks/4347.

  16. Parallel STL: Parallel algorithms in standard template library. https://software.intel.com/en-us/articles/parallel-stl-parallel-algorithms-in-standard-templatelibrary.

  17. Parallel STL. http://parallelstl.codeplex.com.

  18. Open source parallel STL implementation. https://github.com/KhronosGroup/SyclParallelSTL.

  19. Khronos Group, SYCL Overview. http://www.khronos. org/sycl.

  20. The GNU C++ library manual, Chapter 18: Parallel mode. https://gcc.gnu.org/onlinedocs/libstdc++/manual.

  21. The OpenMP API specification for parallel programming. http://www.openmp.org/specifications.

  22. Task block (formerly task region) R4. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015 /n4411.pdf.

  23. Template library for parallel for-loops. http://openstd. org/JTC1/SC22/WG21/docs/papers/2016/p0075r 1.pdf.

  24. Technical specification for C++ extensions for transactional memory. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4514.pdf.

  25. Technical specification for C++ extensions for coroutines. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4649.pdf.

  26. C++ User Group, Russia, C++ coroutines: A negative overhead abstraction. http://cpp-russia.ru/?page_id =991.

  27. Coroutines belong in a TS. http://www.open-std.org /jtc1/sc22/wg21/docs/papers/2015/p0158r0.html.

  28. LLVM Coroutines. http://releases.llvm.org/4.0.0/docs/leaseNotes.html#llvm-coroutines.

  29. Technical specification for C++ extensions for concurrency. http://www.open-std.org/jtc1/sc22/wg21/docs /papers/2015/n4538.pdf.

  30. CUDA parallel computing. http://www.nvidia.ru/object/cuda-parallel-computing-ru.html.

  31. Khronos Group, OpenCL Overview. http://www.khronos. org/opencl.

  32. What is OpenACC? http://www.openacc.org.

  33. Edwards, H.C. and Sunderland, D., Kokkos array performance-portable manycore programming model, Proc. Int. Workshop Programming Models and Applications for Multicores and Manycores, New Orleans, 2012, p. 1–10.

    Google Scholar 

  34. Wang, M., Richards, A., Rovatsou, M., and Reyers, R., Khronos’s OpenCL SYCL to support heterogeneous devices for C++. http://www.open-std.org/jtc1/sc22/wg21/docs/pers/2016/p0236r0.pdf.

  35. SYCL Tutorial 1: The Vector Addition. http://www. codeplay.com/portal/sycl-tutorial-1-the-vector-addition.

  36. Kukanov, A., Parallelism in C++: Manage the application and not the threads. https://events.yandex.ru/lib/talks/1795.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to N. I. V’yukova.

Additional information

Original Russian Text © N.I. V’yukova, V.A. Galatenko, S.V. Samborskii, 2018, published in Programmirovanie, 2018, Vol. 44, No. 1.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

V’yukova, N.I., Galatenko, V.A. & Samborskii, S.V. Support for Parallel and Concurrent Programming in C++. Program Comput Soft 44, 35–42 (2018). https://doi.org/10.1134/S0361768818010073

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768818010073

Navigation