rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
broadcast.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include <rexlib/core/span.hpp>
6#include <rexlib/core/platform/dynamic_shared_object.h>
7
8#include <vector>
9
10namespace rexlib
11{
12
13class strided_layout;
14
27REXLIB_API
29 std::vector<std::size_t> &extents1,
30 std::vector<std::size_t> &extents2
31);
32
41REXLIB_API
43 std::vector<std::size_t> &result,
45);
46
55REXLIB_API
59) noexcept;
60
69REXLIB_API
71 span<const std::size_t> from_extents,
73) noexcept;
74
75} // namespace rexlib
Represents a non-owning area of contiguous memory.
Definition span.hpp:99
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
bool is_broadcastable_to(span< const std::size_t > from_extents, span< const std::size_t > to_extents) noexcept
Check if a set of extents can be broadcasted into another.
void broadcast_extents_accumulate(std::vector< std::size_t > &result, span< const std::size_t > other)
Perform an cumulative extent broadcast step.
bool is_broadcast_compatible(span< const std::size_t > extents1, span< const std::size_t > extents2) noexcept
Check if two extents can be broadcasted together.
void broadcast_extents(std::vector< std::size_t > &extents1, std::vector< std::size_t > &extents2)
Perform a broadcast operation between two sets of extents.