ARGOBOTS  1227c643f7a7f974f1f1778a9ffebd29d7dafecf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Functions | Variables
abtd_affinity.c File Reference
#include "abti.h"
#include <unistd.h>
Include dependency graph for abtd_affinity.c:

Go to the source code of this file.

Data Structures

struct  global_affinity
 

Functions

static int int_rem (int a, unsigned int b)
 
static ABTU_ret_err int get_num_cores (pthread_t native_thread, int *p_num_cores)
 
static ABTU_ret_err int read_cpuset (pthread_t native_thread, ABTD_affinity_cpuset *p_cpuset)
 
static ABTU_ret_err int apply_cpuset (pthread_t native_thread, const ABTD_affinity_cpuset *p_cpuset)
 
void ABTD_affinity_init (const char *affinity_str)
 
void ABTD_affinity_finalize (void)
 
ABTU_ret_err int ABTD_affinity_cpuset_read (ABTD_xstream_context *p_ctx, ABTD_affinity_cpuset *p_cpuset)
 
ABTU_ret_err int ABTD_affinity_cpuset_apply (ABTD_xstream_context *p_ctx, const ABTD_affinity_cpuset *p_cpuset)
 
ABTU_ret_err int ABTD_affinity_cpuset_apply_default (ABTD_xstream_context *p_ctx, int rank)
 
void ABTD_affinity_cpuset_destroy (ABTD_affinity_cpuset *p_cpuset)
 

Variables

static global_affinity g_affinity
 

Function Documentation

ABTU_ret_err int ABTD_affinity_cpuset_apply ( ABTD_xstream_context p_ctx,
const ABTD_affinity_cpuset p_cpuset 
)

Definition at line 392 of file abtd_affinity.c.

Referenced by ABT_xstream_set_affinity(), and ABT_xstream_set_cpubind().

ABTU_ret_err int ABTD_affinity_cpuset_apply_default ( ABTD_xstream_context p_ctx,
int  rank 
)
void ABTD_affinity_cpuset_destroy ( ABTD_affinity_cpuset p_cpuset)
ABTU_ret_err int ABTD_affinity_cpuset_read ( ABTD_xstream_context p_ctx,
ABTD_affinity_cpuset p_cpuset 
)

Definition at line 385 of file abtd_affinity.c.

Referenced by ABT_xstream_get_affinity(), and ABT_xstream_get_cpubind().

void ABTD_affinity_finalize ( void  )

Definition at line 362 of file abtd_affinity.c.

Referenced by ABT_finalize().

void ABTD_affinity_init ( const char *  affinity_str)

Definition at line 265 of file abtd_affinity.c.

Referenced by ABTD_env_init().

static ABTU_ret_err int apply_cpuset ( pthread_t  native_thread,
const ABTD_affinity_cpuset p_cpuset 
)
static
static ABTU_ret_err int get_num_cores ( pthread_t  native_thread,
int *  p_num_cores 
)
static

Definition at line 201 of file abtd_affinity.c.

Referenced by ABTD_affinity_init().

static int int_rem ( int  a,
unsigned int  b 
)
inlinestatic

Definition at line 192 of file abtd_affinity.c.

Referenced by ABTD_affinity_init(), and apply_cpuset().

static ABTU_ret_err int read_cpuset ( pthread_t  native_thread,
ABTD_affinity_cpuset p_cpuset 
)
static

Definition at line 222 of file abtd_affinity.c.

Referenced by ABTD_affinity_cpuset_read(), and ABTD_affinity_init().

Variable Documentation

global_affinity g_affinity
static

Definition at line 190 of file abtd_affinity.c.