mercredi 28 décembre 2016

Standard way to call `ffsl` in C++?

The ffsl function is part of glibc. In GCC it is also available via __builtin_ffsl. It returns the index of the least significant bit in a long.

Is there a way to access this functionality in standards-conforming C++ code? I would like to get at these versions (if available) because they are written in assembly for high performance. (Most architectures provide an instruction for this function or similar.)

Aucun commentaire:

Enregistrer un commentaire