StarPU Internal Handbook
Loading...
Searching...
No Matches
node_ops.h File Reference
#include <starpu.h>
#include <common/config.h>
#include <datawizard/copy_driver.h>

Go to the source code of this file.

Data Structures

struct  _starpu_node_ops
 

Typedefs

typedef int(* copy_interface_func_t) (starpu_data_handle_t handle, void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, struct _starpu_data_request *req)
 
typedef int(* copy_data_t) (uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t ssize, struct _starpu_async_channel *async_channel)
 
typedef int(* copy2d_data_t) (uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks, size_t ld_src, size_t ld_dst, struct _starpu_async_channel *async_channel)
 
typedef int(* copy3d_data_t) (uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks_1, size_t ld1_src, size_t ld1_dst, size_t numblocks_2, size_t ld2_src, size_t ld2_dst, struct _starpu_async_channel *async_channel)
 
typedef uintptr_t(* map_t) (uintptr_t src, size_t src_offset, unsigned src_node, unsigned dst_node, size_t size, int *ret)
 
typedef int(* unmap_t) (uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, unsigned dst_node, size_t size)
 
typedef int(* update_map_t) (uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size)
 

Functions

const char * _starpu_node_get_prefix (enum starpu_node_kind kind)
 

Typedef Documentation

◆ copy_interface_func_t

typedef int(* copy_interface_func_t) (starpu_data_handle_t handle, void *src_interface, unsigned src_node, void *dst_interface, unsigned dst_node, struct _starpu_data_request *req)

Request copying some data interface for handle handle: from interface src_interface that exists on node src_node to interface dst_interface that exists on node dst_node.

If req is non-NULL, this can be used to start an asynchronous copy, in which case -EAGAIN should be returned. Otherwise, 0 should be returned.

_starpu_copy_interface_any_to_any can be used as a generic version, that assumes that the data_interface implements the any_to_any method, and copy_data_t will be used to queue the actual transfers.

◆ copy_data_t

typedef int(* copy_data_t) (uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t ssize, struct _starpu_async_channel *async_channel)

Request copying ssize bytes of data from src_ptr (plus offset src_offset) in node src_node to dst_ptr (plus offset dst_offset) in node dst_node.

If async_channel is non-NULL, this can be used to start an asynchronous copy, in which case -EAGAIN should be returned. Otherwise, 0 should be returned.

◆ copy2d_data_t

typedef int(* copy2d_data_t) (uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks, size_t ld_src, size_t ld_dst, struct _starpu_async_channel *async_channel)

This is like copy_data_t, except that there are numblocks blocks of size blocksize bytes to be transferred. On the source, their respective starts are ld_src bytes apart, and on the destination their respective starts have to be ld_dst bytes apart. (leading dimension)

◆ copy3d_data_t

typedef int(* copy3d_data_t) (uintptr_t src_ptr, size_t src_offset, unsigned src_node, uintptr_t dst_ptr, size_t dst_offset, unsigned dst_node, size_t blocksize, size_t numblocks_1, size_t ld1_src, size_t ld1_dst, size_t numblocks_2, size_t ld2_src, size_t ld2_dst, struct _starpu_async_channel *async_channel)

This is like copy_data_t, except that there are numblocks_2 metablocks to be transferred. On the source, their respective starts are ld2_src bytes apart, and on the destination their respective starts have to be ld2_dst bytes apart.

The metablocks are composed of numblocks_1 blocks of size blocksize bytes. On the source, their respective starts are ld1_src bytes apart, and on the destination their respective starts have to be ld1_dst bytes apart.

◆ map_t

typedef uintptr_t(* map_t) (uintptr_t src, size_t src_offset, unsigned src_node, unsigned dst_node, size_t size, int *ret)

Map size bytes of data from src (plus offset src_offset) in node src_node on node dst_node. If successful, return the resulting pointer, otherwise fill *ret

◆ unmap_t

typedef int(* unmap_t) (uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, unsigned dst_node, size_t size)

Unmap size bytes of data from src (plus offset src_offset) in node src_node on node dst_node.

◆ update_map_t

typedef int(* update_map_t) (uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, size_t dst_offset, unsigned dst_node, size_t size)

Update cache coherency for the mapping of size bytes of data from src (plus offset src_offset) in node src_node on node dst_node.