ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
SimdInline.h File Reference

The vector kernels of ADS that are inlined in the middle of a search, on Google Highway, with ADS_WITH_HIGHWAY: a comparison of the 16 control bytes of a group of a hash table with a fingerprint, the place of a byte among the 16 keys of a node of a tree, a count of the keys below a key in a block, where a call through the table of the kernels of Simd.h would cost more than the kernel. More...

#include "ADS/Simd.h"

Go to the source code of this file.

Detailed description

The vector kernels of ADS that are inlined in the middle of a search, on Google Highway, with ADS_WITH_HIGHWAY: a comparison of the 16 control bytes of a group of a hash table with a fingerprint, the place of a byte among the 16 keys of a node of a tree, a count of the keys below a key in a block, where a call through the table of the kernels of Simd.h would cost more than the kernel.

They are compiled for the set of vector instructions that the flags of the compiler give (the static target of Highway, SSE2 on x86-64 and NEON on AArch64 by default), in the namespace ADS::detail::simd::HWY_NAMESPACE of that set, which enters the name of the configuration of the layouts [see Abi.h], so that two translation units built with different flags get distinct functions; the classes that call them out of that inline namespace (the B-trees, the searches in a node) must be compiled with the same flags in all the units of a program, as any inline code. Each kernel works on any number of lanes, one included, so that it compiles for every target of Highway, the scalar ones too.

Without ADS_WITH_HIGHWAY, or with ADS_SIMD_SCALAR [see Simd.h], this header declares nothing, and the structures run their broadword code.

Author
Donato Meoli
Dipartimento di Informatica
Università di Pisa