mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 04:00:34 +00:00
Fix C++ namespace in README
This commit is contained in:
parent
dcb5daf9a8
commit
42be9f1a35
@ -44,7 +44,7 @@ instructions) at runtime.
|
|||||||
|
|
||||||
## Code samples
|
## Code samples
|
||||||
|
|
||||||
**Note:** For C++ code, the library functions are defined in the `CpuFeatures`
|
**Note:** For C++ code, the library functions are defined in the `cpu_features`
|
||||||
namespace.
|
namespace.
|
||||||
|
|
||||||
### Checking features at runtime
|
### Checking features at runtime
|
||||||
@ -55,7 +55,7 @@ AES and the SSE4.2 instruction sets:
|
|||||||
```c
|
```c
|
||||||
#include "cpuinfo_x86.h"
|
#include "cpuinfo_x86.h"
|
||||||
|
|
||||||
// For C++, add `using namespace CpuFeatures;`
|
// For C++, add `using namespace cpu_features;`
|
||||||
static const X86Features features = GetX86Info().features;
|
static const X86Features features = GetX86Info().features;
|
||||||
|
|
||||||
void Compute(void) {
|
void Compute(void) {
|
||||||
@ -77,7 +77,7 @@ features and then check whether AES and NEON are supported.
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "cpuinfo_arm.h"
|
#include "cpuinfo_arm.h"
|
||||||
|
|
||||||
// For C++, add `using namespace CpuFeatures;`
|
// For C++, add `using namespace cpu_features;`
|
||||||
static const ArmFeatures features = GetArmInfo().features;
|
static const ArmFeatures features = GetArmInfo().features;
|
||||||
static const bool has_aes_and_neon = features.aes && features.neon;
|
static const bool has_aes_and_neon = features.aes && features.neon;
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ instruction set (e.g., `g++ -mavx`) and sets `has_avx` accordingly.
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "cpuinfo_x86.h"
|
#include "cpuinfo_x86.h"
|
||||||
|
|
||||||
// For C++, add `using namespace CpuFeatures;`
|
// For C++, add `using namespace cpu_features;`
|
||||||
static const X86Features features = GetX86Info().features;
|
static const X86Features features = GetX86Info().features;
|
||||||
static const bool has_avx = CPU_FEATURES_COMPILED_X86_AVX || features.avx;
|
static const bool has_avx = CPU_FEATURES_COMPILED_X86_AVX || features.avx;
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ set—but only if it's not Sandy Bridge.
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "cpuinfo_x86.h"
|
#include "cpuinfo_x86.h"
|
||||||
|
|
||||||
// For C++, add `using namespace CpuFeatures;`
|
// For C++, add `using namespace cpu_features;`
|
||||||
static const X86Info info = GetX86Info();
|
static const X86Info info = GetX86Info();
|
||||||
static const X86Microarchitecture uarch = GetX86Microarchitecture(&info);
|
static const X86Microarchitecture uarch = GetX86Microarchitecture(&info);
|
||||||
static const bool has_fast_avx = info.features.avx && uarch != INTEL_SNB;
|
static const bool has_fast_avx = info.features.avx && uarch != INTEL_SNB;
|
||||||
|
Loading…
Reference in New Issue
Block a user