Mapping high-level programming languages to OpenCL 2.0: A compiler writer's perspective

I. Jui Sung, Wen Heng Chung, Yun Wei Lee, Wen Mei Hwu

Research output: Chapter in Book/Report/Conference proceedingChapter

Abstract

While OpenCL was originally designed as an application programming interface (API) for human developers, it can also serve as an implementation platform for higher-level object-oriented programming languages such as C++. Targeting OpenCL rather than vendor-specific platforms allows high-level language compiler developers to focus on language implementation issues rather than the vendor-specific intricacies across different types of devices in a heterogeneous computing system. In this chapter, we show that OpenCL 2.0 provides a strong foundation for implementing C++ Accelerated Massive Parallelism (AMP), a parallel extension to C++. We show a mapping of C++ AMP constructs to OpenCL. We also demonstrate that the OpenCL kernels generated from C++ AMP parallel_for_all and related constructs with automatically generated data transfer API calls can achieve a performance level that is comparable to that of hand-coded OpenCL kernels. We expect that compiler developers who need to target other high-level languages to heterogeneous computing systems will benefit from the techniques and experience presented in this chapter.

Original languageEnglish (US)
Title of host publicationHeterogeneous Computing with OpenCL 2.0
Subtitle of host publicationThird Edition
PublisherElsevier Inc.
Pages249-272
Number of pages24
ISBN (Electronic)9780128016497
ISBN (Print)9780128014141
DOIs
StatePublished - May 18 2015
Externally publishedYes

Keywords

  • C++ AMP
  • Compiler target
  • Functor
  • Heterogeneous computing
  • Lambda
  • Object-oriented language
  • OpenCL
  • Variable capturing

ASJC Scopus subject areas

  • General Computer Science

Fingerprint

Dive into the research topics of 'Mapping high-level programming languages to OpenCL 2.0: A compiler writer's perspective'. Together they form a unique fingerprint.

Cite this