StarPU Internal Handbook

Data Structures | Macros | Functions | Variables
memory_nodes.h File Reference
`#include <starpu.h>`
`#include <common/config.h>`
`#include <datawizard/coherency.h>`
`#include <datawizard/memalloc.h>`
`#include <datawizard/node_ops.h>`
`#include <common/utils.h>`
`#include <core/workers.h>`
`#include <core/simgrid.h>`

Go to the source code of this file.

## Data Structures
struct | _starpu_cond_and_worker
struct | _starpu_memory_node_descr

## Macros
#define | starpu_node_get_kind
#define | starpu_memory_nodes_get_count
#define | starpu_worker_get_memory_node
#define | starpu_worker_get_local_memory_node

## Functions
void | _starpu_memory_nodes_init (void)
void | _starpu_memory_nodes_deinit (void)
static void | _starpu_memory_node_add_nworkers (unsigned node)
void | _starpu_worker_drives_memory_node (struct _starpu_worker *worker, unsigned memnode)
static struct _starpu_node_ops * | _starpu_memory_node_get_node_ops (unsigned node)
static unsigned | _starpu_memory_node_get_nworkers (unsigned node)
static void | _starpu_simgrid_memory_node_set_host (unsigned node, starpu_sg_host_t host)
static starpu_sg_host_t | _starpu_simgrid_memory_node_get_host (unsigned node)
unsigned | _starpu_memory_node_register (enum starpu_node_kind kind, int devid, struct _starpu_node_ops *node_ops)
void | _starpu_memory_node_register_condition (struct _starpu_worker *worker, starpu_pthread_cond_t *cond, unsigned nodeid)
static struct _starpu_memory_node_descr * | _starpu_memory_node_get_description (void)
static enum starpu_node_kind | _starpu_node_get_kind (unsigned node)
static unsigned | _starpu_memory_nodes_get_count (void)
static unsigned | _starpu_worker_get_memory_node (unsigned workerid)
static unsigned | _starpu_worker_get_local_memory_node (void)

## Variables
char | _starpu_worker_drives_memory [STARPU_NMAXWORKERS][STARPU_MAXNODES]
struct _starpu_memory_node_descr | _starpu_descr

## Data Structure Documentation

## ◆ _starpu_cond_and_worker

struct _starpu_cond_and_worker

Data Fields
starpu_pthread_cond_t * | cond |
struct _starpu_worker * | worker |

## ◆ _starpu_memory_node_descr

struct _starpu_memory_node_descr

Data Fields
unsigned | nnodes |
enum starpu_node_kind | nodes[STARPU_MAXNODES] |
struct _starpu_node_ops * | node_ops[STARPU_MAXNODES] |
int | devid[STARPU_MAXNODES] | Get the device id associated to this node, or -1 if not applicable
unsigned | nworkers[STARPU_MAXNODES] |
starpu_sg_host_t | host[STARPU_MAXNODES] |
starpu_pthread_rwlock_t | conditions_rwlock | Every worker is associated to a condition variable on which the worker waits when there is task available. It is possible that multiple worker share the same condition variable, so we maintain a list of all these condition variables so that we can wake up all worker attached to a memory node that are waiting on a task.
struct _starpu_cond_and_worker | conditions_attached_to_node[STARPU_MAXNODES][STARPU_NMAXWORKERS] |
struct _starpu_cond_and_worker | conditions_all[STARPU_MAXNODES *STARPU_NMAXWORKERS] |
unsigned | total_condition_count | the number of queues attached to each node
unsigned | condition_count[STARPU_MAXNODES] |

## Function Documentation

## ◆ _starpu_worker_drives_memory_node()

void _starpu_worker_drives_memory_node | ( | struct _starpu_worker * | worker,
|  | unsigned | memnode
| ) |  |

same utility as _starpu_memory_node_add_nworkers

## ◆ _starpu_worker_get_memory_node()

static unsigned _starpu_worker_get_memory_node | ( | unsigned | workerid | ) |
| inline static

This workerid may either be a basic worker or a combined worker

We have a combined worker