32 #ifndef SRC_DEFINE_TABLES_H_ 33 #define SRC_DEFINE_TABLES_H_ 35 #define FEATURE(ENUM, NAME, CPUINFO_FLAG, HWCAP, HWCAP2) [ENUM] = CPUINFO_FLAG, 39 #ifndef DEFINE_TABLE_DONT_GENERATE_HWCAPS 40 #define FEATURE(ENUM, NAME, CPUINFO_FLAG, HWCAP, HWCAP2) \ 41 [ENUM] = (HardwareCapabilities){HWCAP, HWCAP2}, 45 #endif // DEFINE_TABLE_DONT_GENERATE_HWCAPS 47 #define FEATURE(ENUM, NAME, CPUINFO_FLAG, HWCAP, HWCAP2) \ 48 static void set_##ENUM(DEFINE_TABLE_FEATURE_TYPE* features, bool value) { \ 49 features->NAME = value; \ 51 static int get_##ENUM(const DEFINE_TABLE_FEATURE_TYPE* features) { \ 52 return features->NAME; \ 57 #define FEATURE(ENUM, NAME, CPUINFO_FLAG, HWCAP, HWCAP2) [ENUM] = set_##ENUM, 62 #define FEATURE(ENUM, NAME, CPUINFO_FLAG, HWCAP, HWCAP2) [ENUM] = get_##ENUM, 67 #endif // SRC_DEFINE_TABLES_H_ VOLK_API void
Call into a specific implementation given by name.
static const char * kCpuInfoFlags[]
Definition: define_tables.h:36
static int(*const kGetters[])(const DEFINE_TABLE_FEATURE_TYPE *)
Definition: define_tables.h:63
static const HardwareCapabilities kHardwareCapabilities[]
Definition: define_tables.h:42
#define DEFINE_TABLE_FEATURES
Definition: cpuinfo_aarch64.c:27
#define DEFINE_TABLE_FEATURE_TYPE
Definition: cpuinfo_aarch64.c:79
static void(*const kSetters[])(DEFINE_TABLE_FEATURE_TYPE *, bool)
Definition: define_tables.h:58