
Use OpenMP Tasks for Recursive Parallelism
Parallelize recursive C code such as Fibonacci and tree walks with OpenMP tasks, taskwait and a cutoff, and see why a task per call runs slower than serial.
Tag
362 posts

Parallelize recursive C code such as Fibonacci and tree walks with OpenMP tasks, taskwait and a cutoff, and see why a task per call runs slower than serial.

Run low-priority background work in vApplicationIdleHook: enable it, keep it short and non-blocking, work in slices, and know when a task is better.

Use WaitForSingleObject and WaitForMultipleObjects to block on events, threads, processes and mutexes, read the return codes and avoid the 64 handle limit.

Bring up a USB CDC serial port on an STM32F4 with TinyUSB: 48 MHz clock, OTG_FS pins, VBUS sensing, the interrupt handler, tusb_config.h and a printf retarget.

The number systems and bit operations behind every emulator: binary, hex, shifts, AND, OR, XOR, masks, signed bytes and sign extension, with C examples.

Build a file parser with afl-clang-fast and AddressSanitizer, seed and run afl-fuzz 4.x, read the crashes directory and shrink a crash with afl-tmin.

Learn what IEEE 754 NaN, infinity and negative zero are, how they arise, why NaN is not equal to itself, and how to test for each safely in C.

Build a resumable state-machine parser in C that takes a protocol in any chunking, so TCP segmentation never breaks framing, and test it at every split offset.

Pick the right OpenMP loop schedule by looking at how iteration cost varies, with deterministic examples of static, dynamic, guided and runtime scheduling.

Compile a C program with clang -g, load it in LLDB, break on main, run, read the stop report, step with next and step, and quit. A first session with output.

Change a running FreeRTOS timer's period with xTimerChangePeriod: what happens to the countdown, the block time, ISR use and a retry backoff example.

Compare CreateThread and _beginthreadex on Windows, see why C runtime code should use the second, and pass arguments, return values and handles safely.