Rico's Nerd Cluster

「离开世界之前 一切都是过程」

C++ - Functions, Lambda

Lambda, Functors

Functor A functor is an object that acts like a function, using the overloaded operator(). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 struct greaters{ greaters(){} operator()(int a, int b){retur...

C++ - Templates

Non-Type Template Parameters, requires, concept

typename Is Required By “Dependent Names” Dependent names are names that are dependent on the type of a template parameter. To instantiate instances of them, or to simply use them as types, one ne...

C++ - Static Functions And Keyword

Static Functions And Keyword

As a very high level summary, the keyword static has two uses: File scope static variables and functions can be only accessed within the current translation unit (i.e., the cpp source file) C...

C++ - Enum

Static Functions And Keyword

Enum Class Enum class is a type safe way to initialize enums 1 2 3 4 enum class MPS_Status: uint8_t{ SENSOR_UNINITIALIZED = 0x00, SENSOR_STARTUP = 0x27 };

Common Robotics CPP Software Packages

TBB

TBB TBB (Intel Threading Building Blocks) is a parallel-programming library that abstracts out details for managing threads, synchronization, or load balancing explicitly. Key features include: ...

C++ - Constness

constexpr, if constexpr

constexpr constexpr in C++ allows expressions to be evaluated at compile time rather than runtime. This feature helps optimize programs by computing constant values during compilation and enables ...

C++ - Cpp14, 17, 20 Features

Lambda Capture

C++14 Features Lambda Capture C++ 17 Features SIMD and Vectorization in std::for_each std::optional to indicate whether a variable has trustable value std::reduce to aggregates (or “r...

C++ - Linkage

In C++, Linkage is Either External Or Internal

Linkage In C and C++, linkage determines the accessibility of functions & variables defined in one source file in other different translation units (i.e., different source files). There are t...

C++ - Container Operations

Vector, Map, Algorithms

Vector Common Operations Append vector2 to the end of vector1 1 vector1.insert(vector1.end(), vector2.begin(), vector2.end()); Map TODO Algorithms Nth Element nth_element(first, nth, l...

C++ - BLAS and LAPACK

Scientific Computing Libraries

Article: BLAS (“Basic Linear Algebra Subalgorithms”) BLAS is a set of specifications of linear algebra operations such as vector addition, scalar multiplication, dot products, etc. It’s categorize...