Expand description
Thread-pinning helpers from AOCL-Utils.
These are very thin wrappers around the AOCL routines that take a
list of OS-level thread handles (pthread_t on Unix, HANDLE on
Windows) and pin them to physical or logical cores. Most callers
collect pthread_t / HANDLE values from their thread library
(std::thread::current().handle()-style accessors via os-specific
crates) before invoking these.
The functions are unsafe because passing a thread handle that no
longer refers to a live thread is undefined behavior on the AOCL
side.
Enums§
- PinStrategy
- Pinning strategy for a list of thread handles.
Functions§
- pin_
threads ⚠ - Pin the given thread handles using the chosen strategy.
- pin_
threads_ ⚠custom - Pin threads with a custom mapping:
affinity_vector[i]is the logical processor index threadishould bind to.
Type Aliases§
- Thread
Handle - OS-native thread handle.