6947

A Template Metaprogramming Approach to Support Parallel Programs for Multicores

Xin Liu, Daqiang Zhang, Jingyu Zhou, Minyi Guo, Yao Shen
Department of Computer Science, Shanghai Jiao Tong University, No. 800, Dongchuan Road, Shanghai, P.R.China
Shanghai Jiao Tong University, 2012

@article{liu2012template,

   title={A Template Metaprogramming approach to Support Parallel Programs for Multicores},

   author={Liu, X. and Guo, M. and Zhang, D. and Zhou, J. and Shen, Y.},

   year={2012}

}

Download Download (PDF)   View View   Source Source   Source codes Source codes

Package:

641

views

In advent of multicore era, plain C/C++ programming language can not fully reflect computer architectures any more. Source-to-source transformation helps tailor programs close to contemporary hardwares. We propose a template-based approach to perform transformation for programs with rich static information. The template metaprogramming techniques we present can conduct parallelization and memory hierarchical optimization for specific multicores. They enable programmers to utilize new architectural features and parallel patterns by extending template library. In this paper, we implement a prototype template library – libvina to demonstrate the idea. Finally, We evaluate our template library on commodity x86 and GPU platforms by a variety of typical applications in multimedia and scientific fields. In experiments, we show that our approach is flexible to support multiple parallel models and capable of transforming sequential code to parallel equivalence according to specific multicore architectures. Moreover, the cost of programmability using our approach to adapt more than one multicore platform is manageable.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2017 hgpu.org

All rights belong to the respective authors

Contact us: