LIKWID
Thread affinity module

Data type definition for Lua thread affinity module in the Lua API

Affinity Info

This structure is returned by getAffinityInfo function
It is similar to the C struct AffinityDomains

Membername Comment
numberOfAffinityDomains Total amount of affinity domains in the system
numberOfSocketDomains Amount of affinity domains for CPU sockets in the system
numberOfNumaDomains Amount of affinity domains for NUMA domains in the system
numberOfCacheDomains Amount of affinity domains for LLC domains in the system
numberOfProcessorsPerSocket Amount of hardware threads for each CPU socket in the system
numberOfCoresPerCache Amount of physical CPU cores for each LLC in the system
numberOfProcessorsPerCache Amount of hardware threads for each LLC in the system
domains
Membername Comment
tag Tag identifiying the affinity domain
numberOfCores Amount of physical CPU cores in the affinity domain
numberOfProcessors Amount of hardware threads in the affinity domain
processorList List with hardware thread IDs that are in the affinity domain

Function definitions for Lua thread affinity module in the Lua API

getAffinityInfo()

Get information about the affinity domains in the system

Direction Data type(s)
Input Parameter None
Returns Affinity Info lua_affinityinfo

putAffinityInfo()

Frees C struct AffinityDomains. You can still use the lua_affinityinfo data structure
If you call getAffinityInfo function again after calling this function, the thread affinity information will be read again.

Direction Data type(s)
Input Parameter None
Returns None

pinProcess(cpuID, silent)

Pins the current pocess to the given CPU ID

Direction Data type(s)
Input Parameter
cpuID CPU to pin the process on
silent Verbosity of pinning method
Returns None

*/

/*!