论文标题

雪橇:C标准数学功能的便携式矢量库

SLEEF: A Portable Vectorized Library of C Standard Mathematical Functions

论文作者

Shibata, Naoki, Petrogalli, Francesco

论文摘要

在本文中,我们介绍了用于实现C标准数学功能的便携式矢量库,完全用C语言编写。为了使库在保持良好性能的同时使库移植,向量扩展的固有功能由内联函数或预处理器宏抽象。我们实施了这些功能,以便它们可以使用矢量扩展的子功能,例如熔融乘积,掩模寄存器和曼蒂萨的提取。为了有效地使用SIMD指令进行计算,该库仅使用少量的条件分支,并且所有计算路径都被矢量化。我们设计了三角函数的Payne-Hanek参数减少和浮点的剩余变化,它们都适合向量计算。我们将图书馆的性能与英特尔SVML进行比较。

In this paper, we present techniques used to implement our portable vectorized library of C standard mathematical functions written entirely in C language. In order to make the library portable while maintaining good performance, intrinsic functions of vector extensions are abstracted by inline functions or preprocessor macros. We implemented the functions so that they can use sub-features of vector extensions such as fused multiply-add, mask registers and extraction of mantissa. In order to make computation with SIMD instructions efficient, the library only uses a small number of conditional branches, and all the computation paths are vectorized. We devised a variation of the Payne-Hanek argument reduction for trigonometric functions and a floating point remainder, both of which are suitable for vector computation. We compare the performance of our library to Intel SVML.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源