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

用于高性能计算的任意秩张量的C++11实现

A C++11 implementation of arbitrary-rank tensors for high-performance computing

Alejandro M. Aragón

摘要:

本文通过使用最近发布的C++ ISO标准(C++11)中介绍的一些习惯用法,讨论了任意秩张量的有效实现。为了提供高性能计算的基本构建块,我们精心制作了一个Array类模板,从中可以创建向量、矩阵甚至更高阶的张量。还围绕数组类模板构建了一个表达式模板工具,以提供方便的数学语法。因此,通过使用模板,在处理代数对象及其操作时,在C++语言中添加了一个额外的高级层,而不会影响性能。该实现在CPU和GPU上进行了测试。

英文摘要:

This article discusses an efficient implementation of tensors of arbitrary rank by using some of the idioms introduced by the recently published C++ ISO Standard (C++11). With the aims at providing a basic building block for high-performance computing, a single Array class template is carefully crafted, from which vectors, matrices, and even higher-order tensors can be created. An expression template facility is also built around the array class template to provide convenient mathematical syntax. As a result, by using templates, an extra high-level layer is added to the C++ language when dealing with algebraic objects and their operations, without compromising performance. The implementation is tested running on both CPU and GPU.

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

↑