Rico's Nerd Cluster

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

CMake - Concepts and Options

CMake Concepts, Compile Options, Commands, CMake-Format, Header-Only Library, Static Library

Concepts CMake is a “write-only” language 😉, because it was only meant to be written, not for reading, jokingly. This is because: The syntax is not quite a real scripting language CMake uses...

My Journey Into CUDA

GPU Architecture, Tensor Cores, SIMD SIMT, Pinned Memory

A Great introduction video can be found here GPU (GA102) Architecture A graphics card’s brain is its GPU. NVidia’s Ampere GPU architecture family has GA102 and GA104. GA102 is shared across NVidi...

Bash Magic

Bash is great. Here is a list of bash tricks & knowledge points that I found magical

Builtins Declare The declare builtin is used to explictly declare variables declare -r var is to declare a read-only variable 1 2 declare -r var="123" var="456" # see "var: readonly varia...

C++ - [Memory Access - 1] Layout

Cache

Memory Access: The Hidden Bottleneck Reference Why Memory Access Matters Even as CPU speeds continue to improve, the cost of fetching data from memory has become a limiting factor. Operating sys...

C++ Tool Websites

CppInsights, Compiler Explorer, Conan

CppInsights CppInsights does these things: how the standard library objects (like stringstream, vector, etc.) get instantiated how overloaded operators are actually resolved. 1 2 3 4 5 6 7...

C++ Profiling and Speed Ups

gprof, perf, CMake Release and Debug BoilerPlate, CMake Settings

Gprof GNU gprof provides CPU execution times (not wall time, so sleep is not accounted for) of functions and their subfunctions in percentage. Gprof outputs data in a text-based format, which can ...

C++ - GTest

GTest For ROS

Concepts Google Test (a.k.a GTest) is an open source unit testing structure. From the official website Test Suite vs Test Case: A test suite contains one or many tests. You should group your t...

ROS - GDB

GDB for ROS, Core Dump

Introduction GDB is EXTREMELY handy. I used to doing a lot of print statements, but now I use GDB a lot. The reason is simple: I can check multiple things at once without recompiling everytime, es...

C++ - [Compilation 4] Name Mangling

nm

Motivating Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 void foo(){ const size_t N = 100'000'000; std::vector<int> v(N); // fill v with 1,2,3,... std::...

C++ - [Compilation 3] 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...