ARGOBOTS  1.1
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)
 
ABTU_ret_err int ABTD_affinity_list_create (const char *affinity_str, ABTD_affinity_list **pp_affinity_list)
 
void ABTD_affinity_list_free (ABTD_affinity_list *p_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

◆ ABTD_affinity_list_create()

ABTU_ret_err int ABTD_affinity_list_create ( const char *  affinity_str,
ABTD_affinity_list **  pp_affinity_list 
)

Definition at line 337 of file abtd_affinity_parser.c.

Referenced by ABTD_affinity_init().

◆ ABTD_affinity_list_free()

void ABTD_affinity_list_free ( ABTD_affinity_list p_affinity_list)

Definition at line 356 of file abtd_affinity_parser.c.

Referenced by ABTD_affinity_init().

◆ 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(), parse_es_id_list(), and parse_list().

◆ 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.

Referenced by parse_es_id_list(), and parse_list().

◆ 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.

Referenced by parse_es_id_list(), and parse_list().

◆ 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.

Referenced by parse_es_id_list().

◆ 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.

Referenced by list_add(), and parse_es_id_list().

◆ 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.

Referenced by parse_list().

◆ 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 id_list_create(), list_add(), list_create(), and 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.

Referenced by parse_list().

◆ list_free_all()

static void list_free_all ( void *  p_head)
static

Definition at line 80 of file abtd_affinity_parser.c.

Referenced by ABTD_affinity_list_create(), and ABTD_affinity_list_free().

◆ 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.

Referenced by id_list_add(), and list_add().

◆ 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.

Referenced by parse_list().

◆ 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.

Referenced by ABTD_affinity_list_create().

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