arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1109.1264cs.MS
收藏

一种新的C++表达式模板矢量化技术

A New Vectorization Technique for Expression Templates in C++

J. Progsch, Y. Ineichen, A. Adelmann

摘要:

向量运算在高性能计算中起着重要作用,通常由实现BLAS(基本线性代数子程序)接口的高度优化库提供。在C++中,模板和运算符重载允许将这些向量操作实现为表达式模板,在编译时构建自定义循环并提供更抽象的接口。不幸的是,现有的表达式模板库缺乏快速BLAS(基本线性代数子程序)实现的性能。本文提出了一种新的方法-静态加速循环模板(SALT)-通过将表达式模板与积极的循环展开技术相结合来缩小这一性能差距。使用英特尔C++编译器和GNU编译器集合进行了基准测试,以评估我们的库相对于英特尔数学内核库和Eigen模板库的性能。结果表明,该方法能够提供最快的BLAS实现相媲美的优化,同时保留了模板库的方便性和灵活性。

英文摘要:

Vector operations play an important role in high performance computing and are typically provided by highly optimized libraries that implement the BLAS (Basic Linear Algebra Subprograms) interface. In C++ templates and operator overloading allow the implementation of these vector operations as expression templates which construct custom loops at compile time and providing a more abstract interface. Unfortunately existing expression template libraries lack the performance of fast BLAS(Basic Linear Algebra Subprograms) implementations. This paper presents a new approach - Statically Accelerated Loop Templates (SALT) - to close this performance gap by combining expression templates with an aggressive loop unrolling technique. Benchmarks were conducted using the Intel C++ compiler and GNU Compiler Collection to assess the performance of our library relative to Intel's Math Kernel Library as well as the Eigen template library. The results show that the approach is able to provide optimization comparable to the fastest available BLAS implementations, while retaining the convenience and flexibility of a template library.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑