StarPU Handbook

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
starpu_data.h File Reference
`#include <starpu.h>`

Go to the source code of this file.

## Data Structures
struct | starpu_data_descr

## Macros
#define | starpu_data_malloc_pinned_if_possible
#define | starpu_data_free_pinned_if_possible

## Typedefs
typedef struct _starpu_data_state * | starpu_data_handle_t

## Enumerations
enum | starpu_data_access_mode { STARPU_NONE, STARPU_R, STARPU_W, STARPU_RW, STARPU_SCRATCH, STARPU_REDUX }
enum | starpu_node_kind { STARPU_UNUSED, STARPU_CPU_RAM, STARPU_CUDA_RAM, STARPU_OPENCL_RAM }

## Functions
int | starpu_data_acquire_on_node (starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode)
int | starpu_data_acquire_on_node_cb (starpu_data_handle_t handle, int node, enum starpu_data_access_mode mode, void(*callback)(void *), void *arg)
void | starpu_data_release_on_node (starpu_data_handle_t handle, int node)
void | starpu_data_display_memory_stats ()
unsigned | starpu_worker_get_memory_node (unsigned workerid)
unsigned | starpu_memory_nodes_get_count (void)
enum starpu_node_kind | starpu_node_get_kind (unsigned node)
void | starpu_data_set_sequential_consistency_flag (starpu_data_handle_t handle, unsigned flag)
unsigned | starpu_data_get_default_sequential_consistency_flag (void)
void | starpu_data_set_default_sequential_consistency_flag (unsigned flag)
unsigned | starpu_data_test_if_allocated_on_node (starpu_data_handle_t handle, unsigned memory_node)
Basic Data Management API
Data management is done at a high-level in StarPU: rather than accessing a mere list of contiguous buffers, the tasks may manipulate data that are described by a high-level construct which we call data interface. An example of data interface is the "vector" interface which describes a contiguous data array on a spefic memory node. This interface is a simple structure containing the number of elements in the array, the size of the elements, and the address of the array in the appropriate address space (this address may be invalid if there is no valid copy of the array in the memory node). More informations on the data interfaces provided by StarPU are given in Data Interfaces. When a piece of data managed by StarPU is used by a task, the task implementation is given a pointer to an interface describing a valid copy of the data that is accessible from the current processing unit. Every worker is associated to a memory node which is a logical abstraction of the address space from which the processing unit gets its data. For instance, the memory node associated to the different CPU workers represents main memory (RAM), the memory node associated to a GPU is DRAM embedded on the device. Every memory node is identified by a logical index which is accessible from the function starpu_worker_get_memory_node(). When registering a piece of data to StarPU, the specified memory node indicates where the piece of data initially resides (we also call this memory node the home node of a piece of data).
void | starpu_data_unregister (starpu_data_handle_t handle)
void | starpu_data_unregister_no_coherency (starpu_data_handle_t handle)
void | starpu_data_unregister_submit (starpu_data_handle_t handle)
void | starpu_data_invalidate (starpu_data_handle_t handle)
void | starpu_data_invalidate_submit (starpu_data_handle_t handle)
void | starpu_data_advise_as_important (starpu_data_handle_t handle, unsigned is_important)
int | starpu_data_request_allocation (starpu_data_handle_t handle, unsigned node)
int | starpu_data_prefetch_on_node (starpu_data_handle_t handle, unsigned node, unsigned async)
void | starpu_data_set_wt_mask (starpu_data_handle_t handle, uint32_t wt_mask)
void | starpu_data_query_status (starpu_data_handle_t handle, int memory_node, int *is_allocated, int *is_valid, int *is_requested)
void | starpu_data_set_reduction_methods (starpu_data_handle_t handle, struct starpu_codelet *redux_cl, struct starpu_codelet *init_cl)
MPI Insert Task
int | starpu_data_set_rank (starpu_data_handle_t handle, int rank)
int | starpu_data_get_rank (starpu_data_handle_t handle)
int | starpu_data_set_tag (starpu_data_handle_t handle, int tag)
int | starpu_data_get_tag (starpu_data_handle_t handle)

## Access registered data from the application
#define | STARPU_DATA_ACQUIRE_CB(handle, mode, code)
int | starpu_data_acquire (starpu_data_handle_t handle, enum starpu_data_access_mode mode)
int | starpu_data_acquire_cb (starpu_data_handle_t handle, enum starpu_data_access_mode mode, void(*callback)(void *), void *arg)
void | starpu_data_release (starpu_data_handle_t handle)