|
proxygen
|
#include <ios>#include <iostream>#include <memory>#include <scoped_allocator>#include <string>#include <vector>#include <boost/interprocess/allocators/adaptive_pool.hpp>#include <boost/interprocess/managed_shared_memory.hpp>#include <folly/Format.h>#include <folly/Random.h>#include <folly/Traits.h>#include <folly/container/F14Map.h>#include <folly/container/F14Set.h>#include <folly/container/test/F14TestUtil.h>#include <folly/portability/GTest.h>Go to the source code of this file.
Functions | |
| template<typename M > | |
| void | runSimpleMapTest () |
| template<typename S > | |
| void | runSimpleSetTest () |
| TEST (ShmF14ValueMap, simple) | |
| TEST (ShmF14NodeMap, simple) | |
| TEST (ShmF14VectorMap, simple) | |
| TEST (ShmF14ValueSet, simple) | |
| TEST (ShmF14NodeSet, simple) | |
| TEST (ShmF14VectorSet, simple) | |
| template<typename M > | |
| void | runSimultaneousAccessMapTest () |
| TEST (ShmF14ValueMap, simultaneous) | |
| TEST (ShmF14NodeMap, simultaneous) | |
| TEST (ShmF14VectorMap, simultaneous) | |
| template<typename T > | |
| void | checkSingleLocation (std::string name, std::shared_ptr< managed_shared_memory > const &segment, T const &val) |
| void | checkLocation (std::string name, std::shared_ptr< managed_shared_memory > const &segment, int const &val) |
| template<typename A , typename B > | |
| void | checkLocation (std::string name, std::shared_ptr< managed_shared_memory > const &segment, std::pair< A, B > const &val) |
| template<typename T > | |
| auto | checkLocation (std::string name, std::shared_ptr< managed_shared_memory > const &segment, T const &val) -> folly::void_t< decltype(val.begin())> |
| template<typename M > | |
| void | runScopedAllocatorTest () |
| TEST (ShmF14ValueI2VVI, scopedAllocator) | |
| TEST (ShmF14NodeI2VVI, scopedAllocator) | |
| TEST (ShmF14VectorI2VVI, scopedAllocator) | |
| template<typename M > | |
| void | runMultiScopeTest () |
| TEST (ShmF14ValueI2VVI, multiScope) | |
| TEST (ShmF14NodeI2VVI, multiScope) | |
| TEST (ShmF14VectorI2VVI, multiScope) | |
| using ShmAllocator = adaptive_pool<T, managed_shared_memory::segment_manager> |
Definition at line 38 of file F14InterprocessTest.cpp.
| using ShmF14NodeI2VVI = folly::F14NodeMap< int, ShmVVI, folly::f14::DefaultHasher<int>, folly::f14::DefaultKeyEqual<int>, std::scoped_allocator_adaptor<ShmAllocator<std::pair<int const, ShmVVI>>>> |
Definition at line 101 of file F14InterprocessTest.cpp.
| using ShmF14NodeMap = folly::F14NodeMap< K, M, folly::f14::DefaultHasher<K>, folly::f14::DefaultKeyEqual<K>, ShmAllocator<std::pair<K const, M>>> |
Definition at line 54 of file F14InterprocessTest.cpp.
| using ShmF14NodeSet = folly::F14NodeSet< K, folly::f14::DefaultHasher<K>, folly::f14::DefaultKeyEqual<K>, ShmAllocator<K>> |
Definition at line 76 of file F14InterprocessTest.cpp.
| using ShmF14ValueI2VVI = folly::F14ValueMap< int, ShmVVI, folly::f14::DefaultHasher<int>, folly::f14::DefaultKeyEqual<int>, std::scoped_allocator_adaptor<ShmAllocator<std::pair<int const, ShmVVI>>>> |
Definition at line 94 of file F14InterprocessTest.cpp.
| using ShmF14ValueMap = folly::F14ValueMap< K, M, folly::f14::DefaultHasher<K>, folly::f14::DefaultKeyEqual<K>, ShmAllocator<std::pair<K const, M>>> |
Definition at line 46 of file F14InterprocessTest.cpp.
| using ShmF14ValueSet = folly::F14ValueSet< K, folly::f14::DefaultHasher<K>, folly::f14::DefaultKeyEqual<K>, ShmAllocator<K>> |
Definition at line 69 of file F14InterprocessTest.cpp.
| using ShmF14VectorI2VVI = folly::F14VectorMap< int, ShmVVI, folly::f14::DefaultHasher<int>, folly::f14::DefaultKeyEqual<int>, std::scoped_allocator_adaptor<ShmAllocator<std::pair<int const, ShmVVI>>>> |
Definition at line 108 of file F14InterprocessTest.cpp.
| using ShmF14VectorMap = folly::F14VectorMap< K, M, folly::f14::DefaultHasher<K>, folly::f14::DefaultKeyEqual<K>, ShmAllocator<std::pair<K const, M>>> |
Definition at line 62 of file F14InterprocessTest.cpp.
| using ShmF14VectorSet = folly::F14VectorSet< K, folly::f14::DefaultHasher<K>, folly::f14::DefaultKeyEqual<K>, ShmAllocator<K>> |
Definition at line 83 of file F14InterprocessTest.cpp.
| using ShmVI = std::vector<int, ShmAllocator<int>> |
Definition at line 85 of file F14InterprocessTest.cpp.
| using ShmVVI = std::vector<ShmVI, std::scoped_allocator_adaptor<ShmAllocator<ShmVI>>> |
Definition at line 87 of file F14InterprocessTest.cpp.
| void checkLocation | ( | std::string | name, |
| std::shared_ptr< managed_shared_memory > const & | segment, | ||
| int const & | val | ||
| ) |
Definition at line 249 of file F14InterprocessTest.cpp.
References checkSingleLocation().
Referenced by checkLocation(), checkSingleLocation(), runMultiScopeTest(), and runScopedAllocatorTest().
| void checkLocation | ( | std::string | name, |
| std::shared_ptr< managed_shared_memory > const & | segment, | ||
| std::pair< A, B > const & | val | ||
| ) |
Definition at line 257 of file F14InterprocessTest.cpp.
References checkLocation(), and checkSingleLocation().
| auto checkLocation | ( | std::string | name, |
| std::shared_ptr< managed_shared_memory > const & | segment, | ||
| T const & | val | ||
| ) | -> folly::void_t<decltype(val.begin())> |
Definition at line 267 of file F14InterprocessTest.cpp.
References checkLocation(), checkSingleLocation(), EXPECT_TRUE, name, and val.
| void checkSingleLocation | ( | std::string | name, |
| std::shared_ptr< managed_shared_memory > const & | segment, | ||
| T const & | val | ||
| ) |
Definition at line 219 of file F14InterprocessTest.cpp.
References addr, checkLocation(), EXPECT_TRUE, name, string, T, and val.
Referenced by checkLocation().
| void runMultiScopeTest | ( | ) |
Definition at line 315 of file F14InterprocessTest.cpp.
References checkLocation(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::gen::move, and folly::f14::swap().
| void runScopedAllocatorTest | ( | ) |
Definition at line 280 of file F14InterprocessTest.cpp.
References checkLocation(), and m.
| void runSimpleMapTest | ( | ) |
Definition at line 129 of file F14InterprocessTest.cpp.
References EXPECT_EQ, i, and m.
| void runSimpleSetTest | ( | ) |
Definition at line 144 of file F14InterprocessTest.cpp.
References EXPECT_EQ, i, and s.
| void runSimultaneousAccessMapTest | ( | ) |
Definition at line 177 of file F14InterprocessTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, folly::gen::first, folly::f14::detail::getF14IntrinsicsMode(), and name.
| TEST | ( | ShmF14ValueMap | , |
| simple | |||
| ) |
Definition at line 157 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14NodeMap | , |
| simple | |||
| ) |
Definition at line 160 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14VectorMap | , |
| simple | |||
| ) |
Definition at line 163 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14ValueSet | , |
| simple | |||
| ) |
Definition at line 166 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14NodeSet | , |
| simple | |||
| ) |
Definition at line 169 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14VectorSet | , |
| simple | |||
| ) |
Definition at line 172 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14ValueMap | , |
| simultaneous | |||
| ) |
Definition at line 208 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14NodeMap | , |
| simultaneous | |||
| ) |
Definition at line 211 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14VectorMap | , |
| simultaneous | |||
| ) |
Definition at line 214 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14ValueI2VVI | , |
| scopedAllocator | |||
| ) |
Definition at line 304 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14NodeI2VVI | , |
| scopedAllocator | |||
| ) |
Definition at line 307 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14VectorI2VVI | , |
| scopedAllocator | |||
| ) |
Definition at line 310 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14ValueI2VVI | , |
| multiScope | |||
| ) |
Definition at line 397 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14NodeI2VVI | , |
| multiScope | |||
| ) |
Definition at line 400 of file F14InterprocessTest.cpp.
| TEST | ( | ShmF14VectorI2VVI | , |
| multiScope | |||
| ) |
Definition at line 403 of file F14InterprocessTest.cpp.