Reference CPU: Multicore AVX 2 capable
- Compiler / compile units / linker.
- Setup makefile
- Imperative algorithm
- Understand our processor
- bit/byte/word/dword/qword
| --- fileA.h --- | |
| struct Singleton() | |
| { | |
| static Singleton* Get() | |
| { | |
| static Singleton the_instance; | |
| return &the_instance; | |
| } |
| #include <benchmark/benchmark.h> | |
| #include <vector> | |
| #include <algorithm> | |
| size_t linear_search(int* buffer, size_t count, int to_find) | |
| { | |
| #if 1 | |
| const size_t batch = 0; | |
| size_t count_4 = 0; | |
| #else |
| #pragma once | |
| #include <type_traits> | |
| #include <functional> | |
| #include "function_traits.hpp" | |
| template<typename T> | |
| struct ViewTraits | |
| { | |
| typedef decltype(std::declval<T>().read()) ViewValue_t; |
| class UsbLampManager : public LampManager | |
| { | |
| bool switch_lamp(bool turn_on) override; | |
| }; | |
| class BluetoothLampManager : public LampManager | |
| { | |
| bool switch_lamp(bool turn_on) override; | |
| }; |