/* * Copyright (C) 2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/debug_helpers.h" #include #include template struct LookupArray { using LookupMapArrayT = std::array, NumElements>; constexpr LookupArray(const LookupMapArrayT &lookupArray) : lookupArray(lookupArray){}; constexpr ValueT lookUp(const KeyT &keyToFind) const { for (auto &[key, value] : lookupArray) { if (keyToFind == key) { return value; } } UNRECOVERABLE_IF(true); } protected: LookupMapArrayT lookupArray; };