Advertisement

A C++ Generic Parallel Pattern Interface for Stream Processing

  • David del Rio Astorga
  • Manuel F. Dolz
  • Luis Miguel Sanchez
  • Javier García Blas
  • J. Daniel García
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10048)

Abstract

Current parallel programming frameworks aid to a great extent developers to implement applications in order to exploit parallel hardware resources. Nevertheless, developers require additional expertise to properly use and tune them to operate on specific parallel platforms. On the other hand, porting applications between different parallel programming models and platforms is not straightforward and requires, in most of the cases, considerable efforts. Apart from that, the lack of high-level parallel pattern abstractions in these frameworks increases even more the complexity for developing parallel applications. To pave the way in this direction, this paper proposes GrPPI, a generic and reusable high-level parallel pattern interface for stream-based C++ applications. Thanks to its high-level C++ API, this interface allows users to easily expose parallelism in sequential applications using already existing parallel frameworks, such as C++ threads, OpenMP and Intel TBB. We evaluate this approach using an image processing use case to demonstrate its benefits from the usability, flexibility, and performance points of view.

Keywords

Parallel programming framework Parallel pattern Stream processing High-level API 

References

  1. 1.
    Aldinucci, M., Danelutto, M., Kilpatrick, P., Meneghin, M., Torquati, M.: Accelerating code on multi-cores with fastflow. In: Jeannot, E., Namyst, R., Roman, J. (eds.) Euro-Par 2011. LNCS, vol. 6853, pp. 170–181. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-23397-5_17 CrossRefGoogle Scholar
  2. 2.
    Aldinucci, M., Danelutto, M., Kilpatrick, P., Torquati, M.: FastFlow: high-level and efficient streaming on multi-core. In: S. Pllana (ed.) Programming Multi-core and Many-core Computing Systems, Parallel and Distributed Computing, p. 13 (2012)Google Scholar
  3. 3.
    Amarasinghe, S., Hall, M., Lethin, R., Pingali, K., Quinlan, D., Sarkar, V., Shalf, J., Lucas, R., Yelick, K.: ASCR programming challenges for exascale computing. Technical report, U.S. DOE Office of Science (SC) (2011)Google Scholar
  4. 4.
    Beard, J.C., Li, P., Chamberlain, R.D.: RaftLib: a C++ template library for high performance stream parallel processing. In: Proceedings of the Sixth International Workshop on Programming Models and Applications for Multicores and Manycores, PMAM 2015, pp. 96–105. ACM, New York (2015)Google Scholar
  5. 5.
    Enmyren, J., Kessler, C.W.: SkePU: A multi-backend skeleton programming library for multi-GPU systems. In: Proceedings of the Fourth International Workshop on High-level Parallel Programming and Applications, HLPP 2010, pp. 5–14. ACM, New York (2010)Google Scholar
  6. 6.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman Publishing Co. Inc., Boston (1995)zbMATHGoogle Scholar
  7. 7.
    González-Vélez, H., Leyton, M.: A survey of algorithmic skeleton frameworks: high-level structured parallel programming enablers. Softw. Pract. Exp. 40(12), 1135–1160 (2010)CrossRefGoogle Scholar
  8. 8.
    Hoberock, J.: N4507: Programming Languages - Technical Specification for C++ Extensions for Parallelism. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4507.pdf
  9. 9.
    Khronos OpenCL Working Group: SYCL: C++ Single-source Heterogeneous Programming for OpenCL. https://www.khronos.org/sycl. Accessed May 2015
  10. 10.
    Kist, D., Pinto, B., Bazo, R., Bois, A.R.D., Cavalheiro, G.G.H.: Kanga: a skeleton-based generic interface for parallel programming. In: 2015 International Symposium on Computer Architecture and High Performance Computing Workshop (SBAC-PADW), pp. 68–72, October 2015Google Scholar
  11. 11.
    Mattson, T., Sanders, B., Massingill, B.: Patterns for Parallel Programming. Addison-Wesley Professional, Salt Lake (2004)zbMATHGoogle Scholar
  12. 12.
    McCool, M., Reinders, J., Robison, A.: Structured Parallel Programming: Patterns for Efficient Computation, 1st edn. Morgan Kaufmann Publishers Inc., San Francisco (2012)Google Scholar
  13. 13.
    Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proceedings of the Fifteenth Annual ACM Symposium on Principles of Distributed Computing, PODC 1996, pp. 267–275. ACM, New York (1996)Google Scholar
  14. 14.
    Newburn, C.J., So, B., Liu, Z., McCool, M., Ghuloum, A., Toit, S.D., Wang, Z.G., Du, Z.H., Chen, Y., Wu, G., Guo, P., Liu, Z., Zhang, D.: Intel’s array building blocks: a retargetable, dynamic compiler and embedded language. In: 2011 9th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO), pp. 224–235, April 2011Google Scholar
  15. 15.
    NVIDIA Corporation: Thrust. https://thrust.github.io/
  16. 16.
    Rabhi, F.A., Gorlatch, S. (eds.): Patterns and Skeletons for Parallel and Distributed Computing. Springer, London (2003)zbMATHGoogle Scholar
  17. 17.
    Reinders, J.: Intel Threading Building Blocks - Outfitting C++ for Multi-core Processor Parallelism. O’Reilly, Sebastopol (2007)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • David del Rio Astorga
    • 1
  • Manuel F. Dolz
    • 1
  • Luis Miguel Sanchez
    • 1
  • Javier García Blas
    • 1
  • J. Daniel García
    • 1
  1. 1.Department of Computer ScienceUniversity Carlos III of MadridLeganésSpain

Personalised recommendations