Elffuss BraidHub

kikocis/kleidiai public

main · 929 BRawPermalink
1//
2// SPDX-FileCopyrightText: Copyright 2025-2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
3//
4// SPDX-License-Identifier: Apache-2.0
5//
6
7#pragma once
8
9#include <cstddef>
10
11#include "test/common/buffer.hpp"
12#include "test/common/data_type.hpp"
13#include "test/nextgen/common/shape.hpp"
14
15namespace kai::test {
16
17/// Performs reduction operator.
18///
19/// @param[in] axis The reduction axis.
20/// @param[in] shape The size of multidimensional array.
21/// @param[in] data The data buffer.
22///
23/// @return The result data.
24using ReduceFn = Buffer (*)(size_t axis, Shape shape, Span<const std::byte> data);
25
26/// Creates an adding reduction operator for the specified data type.
27///
28/// @param[in] src_dtype The input data type.
29/// @param[in] dst_dtype The output data type.
30///
31/// @return The function pointer.
32[[nodiscard]] ReduceFn make_reduce_add(DataType src_dtype, DataType dst_dtype);
33
34} // namespace kai::test