Abstract

In the traditional programming paradigm, data structures and algorithms are developed for specific data types and requirements. This leads to code redundancy and inflexibility, thus not allowing effective code reuse for similar applications. One effective approach to increase code reuse is generic programming, which focuses on the development of efficient, reusable software libraries through suitable abstractions for the common requirements. In this paper, we present how we applied generic programming to an ongoing effort for mesh-based adaptive simulations on massively parallel computers. Three generic components, iterator, set and tag, were developed using design pattern, C++ template programming and the standard template library. The scaling studies on petascale supercomputers demonstrate the efficiency of the reusable, generic components which do not sacrifice the performance of the previous tools developed in the traditional object-oriented programming paradigm.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call