// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include #include #include #include namespace rocRoller { /** * A collection of helper functions to deal with the sparsely populated, * statically allocated std::array of shared_ptr and optional values used * in rocRoller. */ /** * Returns an iterator to the first empty slot in `array`, or `end` if the * array is full. */ template auto emptySlot(std::array const& array); /** * Returns an iterator to the first empty slot in `array`, or `end` if the * array is full. */ template auto emptySlot(std::array& array); /** * Places `value` in the first empty slot in `array`, or throws if the * array is full. */ template void append(std::array& array, T value); /** * Places `values` in the first empty slots in `array`, or throws if the * array is full. */ template requires CInputRangeOf void append(std::array& array, C values); } #include "Array_impl.hpp"