Loading...
Searching...
No Matches
node_ops.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2008-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __NODE_OPS_H__
#define __NODE_OPS_H__
#include <starpu.h>
#include <common/config.h>
#include <datawizard/copy_driver.h>
#pragma GCC visibility push(hidden)
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);
struct _starpu_node_ops
{
copy_interface_func_t copy_interface_to[STARPU_MAX_RAM+1];
copy_interface_func_t copy_interface_from[STARPU_MAX_RAM+1];
copy_data_t copy_data_to[STARPU_MAX_RAM+1];
copy_data_t copy_data_from[STARPU_MAX_RAM+1];
copy2d_data_t copy2d_data_to[STARPU_MAX_RAM+1];
copy2d_data_t copy2d_data_from[STARPU_MAX_RAM+1];
copy3d_data_t copy3d_data_to[STARPU_MAX_RAM+1];
copy3d_data_t copy3d_data_from[STARPU_MAX_RAM+1];
void (*wait_request_completion)(struct _starpu_async_channel *async_channel);
unsigned (*test_request_completion)(struct _starpu_async_channel *async_channel);
int (*is_direct_access_supported)(unsigned node, unsigned handling_node);
uintptr_t (*malloc_on_node)(unsigned dst_node, size_t size, int flags);
void (*free_on_node)(unsigned dst_node, uintptr_t addr, size_t size, int flags);
map_t map[STARPU_MAX_RAM+1];
unmap_t unmap[STARPU_MAX_RAM+1];
update_map_t update_map[STARPU_MAX_RAM+1];
char *name;
};
const char* _starpu_node_get_prefix(enum starpu_node_kind kind);
#pragma GCC visibility pop
#endif // __NODE_OPS_H__
copy_driver.h
_starpu_async_channel
Definition copy_driver.h:71
starpu_node_kind
starpu_node_kind
Definition starpu_worker.h:44
STARPU_MAX_RAM
@ STARPU_MAX_RAM
Definition starpu_worker.h:54
copy2d_data_t
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)
Definition node_ops.h:57
copy3d_data_t
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)
Definition node_ops.h:72
map_t
uintptr_t(* map_t)(uintptr_t src, size_t src_offset, unsigned src_node, unsigned dst_node, size_t size, int *ret)
Definition node_ops.h:81
copy_data_t
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)
Definition node_ops.h:49
update_map_t
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)
Definition node_ops.h:87
copy_interface_func_t
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)
Definition node_ops.h:39
unmap_t
int(* unmap_t)(uintptr_t src, size_t src_offset, unsigned src_node, uintptr_t dst, unsigned dst_node, size_t size)
Definition node_ops.h:84
_starpu_node_ops
Definition node_ops.h:92
_starpu_node_ops::free_on_node
void(* free_on_node)(unsigned dst_node, uintptr_t addr, size_t size, int flags)
Definition node_ops.h:150
_starpu_node_ops::copy2d_data_to
copy2d_data_t copy2d_data_to[STARPU_MAX_RAM+1]
Definition node_ops.h:112
_starpu_node_ops::copy_data_from
copy_data_t copy_data_from[STARPU_MAX_RAM+1]
Definition node_ops.h:107
_starpu_node_ops::copy_interface_from
copy_interface_func_t copy_interface_from[STARPU_MAX_RAM+1]
Definition node_ops.h:99
_starpu_node_ops::copy3d_data_from
copy3d_data_t copy3d_data_from[STARPU_MAX_RAM+1]
Definition node_ops.h:127
_starpu_node_ops::is_direct_access_supported
int(* is_direct_access_supported)(unsigned node, unsigned handling_node)
Definition node_ops.h:143
_starpu_node_ops::test_request_completion
unsigned(* test_request_completion)(struct _starpu_async_channel *async_channel)
Definition node_ops.h:132
_starpu_node_ops::map
map_t map[STARPU_MAX_RAM+1]
Definition node_ops.h:154
_starpu_node_ops::unmap
unmap_t unmap[STARPU_MAX_RAM+1]
Definition node_ops.h:158
_starpu_node_ops::update_map
update_map_t update_map[STARPU_MAX_RAM+1]
Definition node_ops.h:163
_starpu_node_ops::copy2d_data_from
copy2d_data_t copy2d_data_from[STARPU_MAX_RAM+1]
Definition node_ops.h:117
_starpu_node_ops::copy_data_to
copy_data_t copy_data_to[STARPU_MAX_RAM+1]
Definition node_ops.h:103
_starpu_node_ops::wait_request_completion
void(* wait_request_completion)(struct _starpu_async_channel *async_channel)
Definition node_ops.h:130
_starpu_node_ops::name
char * name
Definition node_ops.h:166
_starpu_node_ops::copy3d_data_to
copy3d_data_t copy3d_data_to[STARPU_MAX_RAM+1]
Definition node_ops.h:122
_starpu_node_ops::copy_interface_to
copy_interface_func_t copy_interface_to[STARPU_MAX_RAM+1]
Definition node_ops.h:95
_starpu_node_ops::malloc_on_node
uintptr_t(* malloc_on_node)(unsigned dst_node, size_t size, int flags)
Definition node_ops.h:147