/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef PANDA_RUNTIME_INCLUDE_MEM_PANDA_CONTAINERS_H_ #define PANDA_RUNTIME_INCLUDE_MEM_PANDA_CONTAINERS_H_ #include #include #include #include #include #include #include #include #include #include #include "runtime/mem/allocator_adapter.h" namespace panda { template using PandaForwardList = std::forward_list>; // Thread local version of PandaForwardList template using PandaForwardListTL = std::forward_list>; template using PandaList = std::list>; // Thread local version of PandaList template using PandaListTL = std::list>; template using PandaDeque = std::deque>; // Thread local version of PandaDeque template using PandaDequeTL = std::deque>; template > using PandaQueue = std::queue; // Thread local version of PandaQueue template > using PandaQueueTL = std::queue; template > using PandaStack = std::stack; // Thread local version of PandaStack template > using PandaStackTL = std::stack; template > using PandaSet = std::set>; // Thread local version of PandaSet template > using PandaSetTL = std::set>; template , class KeyEqual = std::equal_to> using PandaUnorderedSet = std::unordered_set>; // Thread local version of PandaUnorderedSet template , class KeyEqual = std::equal_to> using PandaUnorderedSetTL = std::unordered_set>; template using PandaVector = std::vector>; // Thread local version of PandaVector template using PandaVectorTL = std::vector>; template , class Compare = std::less> using PandaPriorityQueue = std::priority_queue; // Thread local version of PandaPriorityQueue template , class Compare = std::less> using PandaPriorityQueueTL = std::priority_queue; template > using PandaMap = std::map>>; // Thread local version of PandaMap template > using PandaMapTL = std::map, mem::AllocScope::LOCAL>>; template > using PandaMultiMap = std::multimap>>; // Thread local version of PandaMultiMap template > using PandaMultiMapTL = std::multimap, mem::AllocScope::LOCAL>>; template , class KeyEqual = std::equal_to> using PandaUnorderedMap = std::unordered_map>>; // Thread local version of PandaUnorderedMap template , class KeyEqual = std::equal_to> using PandaUnorderedMapTL = std::unordered_map, mem::AllocScope::LOCAL>>; template , class KeyEqual = std::equal_to> using PandaUnorderedMultiMap = std::unordered_multimap>>; // Thread local version of PandaUnorderedMultiMap template , class KeyEqual = std::equal_to> using PandaUnorderedMultiMapTL = std::unordered_multimap, mem::AllocScope::LOCAL>>; } // namespace panda #endif // PANDA_RUNTIME_INCLUDE_MEM_PANDA_CONTAINERS_H_