rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
transfer.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/ndarray/array.hpp>
6#include <rexlib/core/ndarray/const_array_ref.hpp>
7
8#include <rexlib/core/hardware/memory_resource_affinity.hpp>
9
10namespace rexlib
11{
12
13class execution_context;
14
15
32REXLIB_API
34 array &input,
37);
38
58 array *out = nullptr
59);
60
77 array &input,
79);
80
94 array *out = nullptr
95);
96
113 array &input,
115);
116
130 array *out = nullptr
131);
132
133} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
Non-owning read-only reference to an array.
Definition const_array_ref.hpp:36
Pairs the hardware resources and the dispatch strategy used to run operations.
Definition execution_context.hpp:43
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
array to_device_copy(const_array_ref input, const execution_context &context, array *out=nullptr)
Transfer an array to device memory enforcing a copy.
memory_resource_affinity
Enumeration to query memory_resource according to its intended usage.
Definition memory_resource_affinity.hpp:12
array to_host(array &input, const execution_context &context)
Transfer an array to host accessible memory.
array transfer(array &input, memory_resource_affinity affinity, const execution_context &context)
Transfer an array to memory with the requested affinity.
@ input
Fixed by the data type of an input operand.
array to_host_copy(const_array_ref input, const execution_context &context, array *out=nullptr)
Transfer an array to host accessible memory enforcing a copy.
array to_device(array &input, const execution_context &context)
Transfer an array from host to device memory.
array transfer_copy(const_array_ref input, memory_resource_affinity affinity, const execution_context &context, array *out=nullptr)
Transfer an array to memory with the requested affinity enforcing a copy.