LIKWID
Classes | Typedefs | Functions | Variables
NUMA memory topology module

Classes

struct  NumaNode
 CPUs in NUMA node and general information about a NUMA domain. More...
 
struct  NumaTopology
 The NumaTopology structure describes all NUMA nodes in the current system. More...
 

Typedefs

typedef NumaTopologyNumaTopology_t
 Pointer for exporting the NumaTopology data structure.
 

Functions

NumaTopology_t get_numaTopology (void) __attribute__((visibility("default")))
 Retrieve NUMA information of the current machine. More...
 
int likwid_getNumberOfNodes (void) __attribute__((visibility("default")))
 Retrieve the number of NUMA nodes. More...
 
void numa_finalize (void) __attribute__((visibility("default")))
 Destroy NUMA information structure. More...
 
int numa_init (void) __attribute__((visibility("default")))
 Initialize NUMA information. More...
 
void numa_membind (void *ptr, size_t size, int domainId) __attribute__((visibility("default")))
 Allocate memory from a specific specific NUMA node. More...
 
void numa_setInterleaved (const int *processorList, int numberOfProcessors) __attribute__((visibility("default")))
 Set memory allocation policy to interleaved. More...
 

Variables

NumaTopology numa_info
 Variable holding the global NUMA information structure.
 

Detailed Description

Function Documentation

NumaTopology_t get_numaTopology ( void  )

Retrieve NUMA information of the current machine.

Get the previously initialized NUMA info structure

See also
NumaTopology_t
Returns
NumaTopology_t (pointer to internal numa_info structure)
int likwid_getNumberOfNodes ( void  )

Retrieve the number of NUMA nodes.

Returns the number of NUMA nodes of the current machine. Can also be read out of NumaTopology_t

See also
NumaTopology_t
Returns
Number of NUMA nodes
void numa_finalize ( void  )

Destroy NUMA information structure.

Destroys the NUMA information structure NumaTopology_t. Retrieved pointers to the structures are not valid anymore after this function call

See also
NumaTopology_t
int numa_init ( void  )

Initialize NUMA information.

Initialize NUMA information NumaTopology_t using either HWLOC or CPUID/ProcFS. If a topology config file is present it is read at topology_init() and fills NumaTopology_t

See also
NumaTopology_t
Returns
error code (0 for success, -1 if initialization failed)
void numa_membind ( void *  ptr,
size_t  size,
int  domainId 
)

Allocate memory from a specific specific NUMA node.

Parameters
[in,out]ptrStart pointer of memory
[in]sizeSize for the allocation
[in]domainIdID of NUMA node for the allocation
void numa_setInterleaved ( const int *  processorList,
int  numberOfProcessors 
)

Set memory allocation policy to interleaved.

Set the memory allocation policy to interleaved for given list of CPUs

Parameters
[in]processorListList of processors
[in]numberOfProcessorsLength of processor list