C++ reflection for high performance problem solving environments

  • Authors:
  • Tharaka Devadithya;Kenneth Chiu;Wei Lu

  • Affiliations:
  • Indiana University;State University of New York, Binghamton;Indiana University

  • Venue:
  • SpringSim '07 Proceedings of the 2007 spring simulation multiconference - Volume 2
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Problem Solving Environments (PSE) in scientific computing domains require the ability to couple High Performance Computing (HPC) components. A PSE facilitates coupling of tasks or computations in order to aid a scientist in finding a solution to a problem or at least getting closer to a solution. Reflection capabilities are required in order to effectively dynamically couple these components. Reflection facilitates adaptive behavior such as rebinding calls to different functions at run-time, or integrating flexible interpreted languages with compiled languages such as C++ or Fortran. Currently, however, reflection is not available in languages commonly used in high performance computing. While there have been several attempts to incorporate reflection into C++, all of them are either intrusive or are not fully compliant with the C++ standard. In this paper, we present a number of use cases for reflective programming, and show how it can be efficiently and robustly implemented in languages such as C++. Our implementation uses code generation to add metadata, and is fully compliant with the standard C++ specification. We compare the overhead of reflection with languages such as Java, and show that our overhead is acceptable for many scenarios. Our reflection library is open-source, and is available at http://www.extreme.indiana.edu/reflcpp.