ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
Data Structures | Macros | Typedefs | Functions
abtd_affinity_parser.c File Reference
#include "abti.h"
Include dependency graph for abtd_affinity_parser.c:

Go to the source code of this file.

Data Structures

struct  alloc_header
 
struct  alloc_list
 

Macros

#define MAX_NUM_ELEMS   (1024 * 1024)
 
#define ALLOC_HEADER_SIZE
 

Typedefs

typedef struct alloc_header alloc_header
 

Functions

static ABTU_ret_err int list_calloc (alloc_list *p_alloc_list, size_t size, void **p_ptr)
 
static ABTU_ret_err int list_realloc (alloc_list *p_alloc_list, size_t old_size, size_t new_size, void **p_ptr)
 
static void list_free_all (void *p_head)
 
static ABTU_ret_err int id_list_create (alloc_list *p_alloc_list, ABTD_affinity_id_list **pp_id_list)
 
static ABTU_ret_err int id_list_add (alloc_list *p_alloc_list, ABTD_affinity_id_list *p_id_list, int id, uint32_t num, int stride)
 
static ABTU_ret_err int list_create (alloc_list *p_alloc_list, ABTD_affinity_list **pp_affinity_list)
 
static ABTU_ret_err int list_add (alloc_list *p_alloc_list, ABTD_affinity_list *p_list, ABTD_affinity_id_list *p_base, uint32_t num, int stride)
 
static int is_whitespace (char c)
 
static int consume_int (const char *str, uint32_t *p_index, int *p_val)
 
static int consume_pint (const char *str, uint32_t *p_index, int *p_val)
 
static int consume_symbol (const char *str, uint32_t *p_index, char symbol)
 
static ABTU_ret_err int parse_es_id_list (alloc_list *p_alloc_list, const char *affinity_str, uint32_t *p_index, ABTD_affinity_id_list **pp_affinity_id_list)
 
static ABTU_ret_err int parse_list (alloc_list *p_alloc_list, const char *affinity_str, ABTD_affinity_list **pp_affinity_list)
 

Macro Definition Documentation

◆ ALLOC_HEADER_SIZE

#define ALLOC_HEADER_SIZE
Value:
ABTU_MAX_ALIGNMENT)

Definition at line 15 of file abtd_affinity_parser.c.

◆ MAX_NUM_ELEMS

#define MAX_NUM_ELEMS   (1024 * 1024)

Definition at line 9 of file abtd_affinity_parser.c.

Typedef Documentation

◆ alloc_header

typedef struct alloc_header alloc_header

Function Documentation

◆ consume_int()

static int consume_int ( const char *  str,
uint32_t *  p_index,
int *  p_val 
)
static

Definition at line 158 of file abtd_affinity_parser.c.

Referenced by consume_pint().

◆ consume_pint()

static int consume_pint ( const char *  str,
uint32_t *  p_index,
int *  p_val 
)
static

Definition at line 195 of file abtd_affinity_parser.c.

◆ consume_symbol()

static int consume_symbol ( const char *  str,
uint32_t *  p_index,
char  symbol 
)
static

Definition at line 209 of file abtd_affinity_parser.c.

◆ id_list_add()

static ABTU_ret_err int id_list_add ( alloc_list p_alloc_list,
ABTD_affinity_id_list *  p_id_list,
int  id,
uint32_t  num,
int  stride 
)
static

Definition at line 97 of file abtd_affinity_parser.c.

◆ id_list_create()

static ABTU_ret_err int id_list_create ( alloc_list p_alloc_list,
ABTD_affinity_id_list **  pp_id_list 
)
static

Definition at line 90 of file abtd_affinity_parser.c.

◆ is_whitespace()

static int is_whitespace ( char  c)
inlinestatic

Definition at line 152 of file abtd_affinity_parser.c.

Referenced by consume_int(), and consume_symbol().

◆ list_add()

static ABTU_ret_err int list_add ( alloc_list p_alloc_list,
ABTD_affinity_list *  p_list,
ABTD_affinity_id_list *  p_base,
uint32_t  num,
int  stride 
)
static

Definition at line 121 of file abtd_affinity_parser.c.

◆ list_calloc()

static ABTU_ret_err int list_calloc ( alloc_list p_alloc_list,
size_t  size,
void **  p_ptr 
)
static

Definition at line 26 of file abtd_affinity_parser.c.

Referenced by list_realloc().

◆ list_create()

static ABTU_ret_err int list_create ( alloc_list p_alloc_list,
ABTD_affinity_list **  pp_affinity_list 
)
static

Definition at line 114 of file abtd_affinity_parser.c.

◆ list_free_all()

static void list_free_all ( void *  p_head)
static

Definition at line 80 of file abtd_affinity_parser.c.

◆ list_realloc()

static ABTU_ret_err int list_realloc ( alloc_list p_alloc_list,
size_t  old_size,
size_t  new_size,
void **  p_ptr 
)
static

Definition at line 47 of file abtd_affinity_parser.c.

◆ parse_es_id_list()

static ABTU_ret_err int parse_es_id_list ( alloc_list p_alloc_list,
const char *  affinity_str,
uint32_t *  p_index,
ABTD_affinity_id_list **  pp_affinity_id_list 
)
static

Definition at line 228 of file abtd_affinity_parser.c.

◆ parse_list()

static ABTU_ret_err int parse_list ( alloc_list p_alloc_list,
const char *  affinity_str,
ABTD_affinity_list **  pp_affinity_list 
)
static

Definition at line 284 of file abtd_affinity_parser.c.

alloc_header
struct alloc_header alloc_header
ABTU_MAX_ALIGNMENT
#define ABTU_MAX_ALIGNMENT
Definition: abtu.h:151