LLVM OpenMP 20.0.0git
Classes | Macros | Typedefs | Functions
libomp_test_affinity.h File Reference
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  affinity_mask_t
 

Macros

#define _GNU_SOURCE
 
#define AFFINITY_MAX_CPUS   (32 * 64)
 

Typedefs

typedef struct affinity_mask_t affinity_mask_t
 

Functions

static void affinity_mask_zero (affinity_mask_t *mask)
 
static affinity_mask_taffinity_mask_alloc ()
 
static void affinity_mask_free (affinity_mask_t *mask)
 
static void affinity_mask_copy (affinity_mask_t *dest, const affinity_mask_t *src)
 
static void affinity_mask_set (affinity_mask_t *mask, int cpu)
 
static void affinity_mask_clr (affinity_mask_t *mask, int cpu)
 
static int affinity_mask_isset (const affinity_mask_t *mask, int cpu)
 
static int affinity_mask_count (const affinity_mask_t *mask)
 
static int affinity_mask_equal (const affinity_mask_t *mask1, const affinity_mask_t *mask2)
 
static void get_thread_affinity (affinity_mask_t *mask)
 
static void set_thread_affinity (const affinity_mask_t *mask)
 
static void affinity_update_snprintf_values (char **ptr, size_t *remaining, size_t n, size_t *retval)
 
static size_t affinity_mask_snprintf (char *buf, size_t bufsize, const affinity_mask_t *mask)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 5 of file libomp_test_affinity.h.

◆ AFFINITY_MAX_CPUS

#define AFFINITY_MAX_CPUS   (32 * 64)

Definition at line 21 of file libomp_test_affinity.h.

Typedef Documentation

◆ affinity_mask_t

Function Documentation

◆ affinity_mask_alloc()

static affinity_mask_t * affinity_mask_alloc ( )
static

◆ affinity_mask_clr()

static void affinity_mask_clr ( affinity_mask_t mask,
int  cpu 
)
static

Definition at line 50 of file libomp_test_affinity.h.

References mask.

Referenced by set_subset_affinity().

◆ affinity_mask_copy()

static void affinity_mask_copy ( affinity_mask_t dest,
const affinity_mask_t src 
)
static

Definition at line 41 of file libomp_test_affinity.h.

References affinity_mask_t::set.

Referenced by set_subset_affinity().

◆ affinity_mask_count()

static int affinity_mask_count ( const affinity_mask_t mask)
static

◆ affinity_mask_equal()

static int affinity_mask_equal ( const affinity_mask_t mask1,
const affinity_mask_t mask2 
)
static

◆ affinity_mask_free()

static void affinity_mask_free ( affinity_mask_t mask)
static

◆ affinity_mask_isset()

static int affinity_mask_isset ( const affinity_mask_t mask,
int  cpu 
)
static

◆ affinity_mask_set()

static void affinity_mask_set ( affinity_mask_t mask,
int  cpu 
)
static

◆ affinity_mask_snprintf()

static size_t affinity_mask_snprintf ( char buf,
size_t  bufsize,
const affinity_mask_t mask 
)
static

◆ affinity_mask_zero()

static void affinity_mask_zero ( affinity_mask_t mask)
static

Definition at line 25 of file libomp_test_affinity.h.

References mask.

Referenced by affinity_mask_alloc().

◆ affinity_update_snprintf_values()

static void affinity_update_snprintf_values ( char **  ptr,
size_t *  remaining,
size_t  n,
size_t *  retval 
)
static

Definition at line 81 of file libomp_test_affinity.h.

Referenced by affinity_mask_snprintf().

◆ get_thread_affinity()

static void get_thread_affinity ( affinity_mask_t mask)
static

◆ set_thread_affinity()

static void set_thread_affinity ( const affinity_mask_t mask)
static

Definition at line 74 of file libomp_test_affinity.h.

References mask.

Referenced by set_subset_affinity().