Replacing Branches by Polynomials in Vectorizable Elementary Functions

Olga Kupriianova, Christoph Lauter · Lecture notes in computer science · 2016

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.

Read the paper · More papers on PaperTik