Replacing Branches by Polynomials in Vectorizable Elementary Functions
One of the goals for the mathematical function generator is to produce vectorizable codes. Therefore, in the generated code there should be no branching. As the most mathematical functions are implemented with domain splitting procedure and piecewise-polynomial approximation, there are several if-else statements in the final code to determine the corresponding polynomial coefficients. In this paper we propose a simple idea of replacing these if-else statements by the evaluation of a polynomial function. This is a novel approach that may not work for all the possible function implementation variants, and it needs to be improved with the use of some more sophisticated methods.
KeywordsMathematical functions Branching Vectorizable code Interpolation Reconstruction
- 1.Loosemore, R.M.S.e.a.S.: The GNU C Library Reference Manual. Free Software Foundation IncGoogle Scholar
- 4.Brisebarre, N., Chevillard, S.: Efficient polynomial l-approximations. In: 18th IEEE Symposium on Computer Arithmetic (ARITH-18 2007), 25–27 June 2007, Montpellier, France, pp. 169–176 (2007). http://doi.ieeecomputersociety.org/10.1109/ARITH.2007.17
- 8.Kupriianova, O., Lauter, C.: A domain splitting algorithm for the mathematical functions code generator. In: Asilomar Conference on Signals, Systems and Computers, Pacific Grove, CA, USA, 2–5 November 2014 (2014, to appear)Google Scholar
- 10.Brunie, N., de Dinechin, F., Kupriianova, O., Lauter, C.: Code generators for mathematical functions (2014). \(<\)hal-01084726v2\(>\)Google Scholar
Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 2.5 International License (http://creativecommons.org/licenses/by-nc/2.5/), which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.