Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
std_array.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4
5namespace bb {
26template <typename T, std::size_t... Ns> std::array<T, (Ns + ...)> concatenate(const std::array<T, Ns>&... arrays)
27{
28 std::array<T, (Ns + ...)> result;
29
31 auto copy_into = [&](const auto& array) {
32 std::copy(array.begin(), array.end(), result.begin() + offset);
33 offset += array.size();
34 };
35
36 (copy_into(arrays), ...);
37
38 return result;
39}
40
41} // namespace bb
ssize_t offset
Definition engine.cpp:36
Entry point for Barretenberg command-line interface.
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13