Lines Matching +full:- +full:- +full:all +full:- +full:features
1 …-ci.org/google/cpu_features.svg?branch=master)](https://travis-ci.org/google/cpu_features) [
9 - [Code samples](#codesample)
10 - [Running sample code](#usagesample)
11 - [What's supported](#support)
12 - [Android NDK's drop in replacement](#ndk)
13 - [License](#license)
14 - [Build with cmake](#cmake)
19 - **Simple to use.** See the snippets below for examples.
20 - **Extensible.** Easy to add missing features or architectures.
21 - **Compatible with old compilers** and available on many architectures so it
24 - **Sandbox-compatible.** The library uses a variety of strategies to cope
27 - **Thread safe, no memory allocation, and raises no exceptions.**
30 - **Unit tested.**
37 ### Checking features at runtime
46 static const X86Features features = GetX86Info().features;
49 if (features.aes && features.sse4_2) {
59 If you wish, you can read all the features at once into a global variable, and
60 then query for the specific features you care about. Below, we store all the ARM
61 features and then check whether AES and NEON are supported.
68 static const ArmFeatures features = GetArmInfo().features;
69 static const bool has_aes_and_neon = features.aes && features.neon;
74 This is a good approach to take if you're checking for combinations of features
75 when using a compiler that is slow to extract individual bits from bit-packed
81 instruction set (e.g., `g++ -mavx`) and sets `has_avx` accordingly.
88 static const X86Features features = GetX86Info().features;
89 static const bool has_avx = CPU_FEATURES_COMPILED_X86_AVX || features.avx;
113 static const bool has_fast_avx = info.features.avx && uarch != INTEL_SNB;
128 brand : Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz
137 % ./build/list_cpu_features --json
138 {"arch":"x86","brand":" Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz","family":6,"model":45,"step…
145 |---------|:----:|:-------:|:-------:|:------:|:-------:|
152 1. **Features revealed from Linux.** We gather data from several sources
155 [getauxval](https://www.gnu.org/software/libc/manual/html_node/Auxiliary-Vector.html)
158 2. **Features revealed from CPU.** features are retrieved by using the `cpuid`
160 3. **Microarchitecture detection.** On x86 some features are not always
163 4. All flavors of Mips are supported, little and big endian as well as 32/64
170 … of for the NDK's [cpu-features.h](https://android.googlesource.com/platform/ndk/+/master/sources/…
187 - build `list_cpu_features`
189 cmake -B/tmp/cpu_features -H. -GNinja -DCMAKE_BUILD_TYPE=Release
190 ninja -C/tmp/cpu_features
191 /tmp/cpu_features/list_cpu_features --json
194 - run tests
196 cmake -B/tmp/cpu_features -H. -GNinja -DBUILD_TESTING=ON
197 ninja -C/tmp/cpu_features
198 ninja -C/tmp/cpu_features test