Home
last modified time | relevance | path

Searched refs:RandomToken (Results 1 – 13 of 13) sorted by relevance

/external/federated-compute/fcp/base/
Drandom_token_test.cc32 RandomToken a1 = RandomToken::Generate(); in TEST()
33 RandomToken a2 = a1; in TEST()
34 RandomToken b = RandomToken::Generate(); in TEST()
44 std::vector<RandomToken> distinct; in TEST()
46 distinct.push_back(RandomToken::Generate()); in TEST()
55 absl::flat_hash_set<RandomToken> tokens; in TEST()
57 RandomToken t = RandomToken::Generate(); in TEST()
64 RandomToken original = RandomToken::Generate(); in TEST()
66 RandomToken deserialized = RandomToken::FromBytes(bytes); in TEST()
71 RandomToken original = RandomToken::Generate(); in TEST()
[all …]
Drandom_token.cc29 RandomToken RandomToken::Generate() { in Generate()
36 return RandomToken(words[0], words[1]); in Generate()
39 RandomToken RandomToken::FromBytes(absl::Span<char const> bytes) { in FromBytes()
46 return RandomToken(words[0], words[1]); in FromBytes()
49 std::array<char, kRandomTokenSizeInBytes> RandomToken::ToBytes() const { in ToBytes()
56 std::string RandomToken::ToString() const { in ToString()
61 std::string RandomToken::ToPrintableString() const { in ToPrintableString()
Drandom_token.h42 class RandomToken {
49 static RandomToken Generate();
58 static RandomToken FromBytes(absl::Span<char const> bytes);
77 constexpr bool operator==(RandomToken other) const {
81 constexpr bool operator!=(RandomToken other) const {
86 friend H AbslHashValue(H h, RandomToken t) { in AbslHashValue()
91 explicit constexpr RandomToken(uint64_t a, uint64_t b) : words_{a, b} {} in RandomToken() function
100 static_assert(sizeof(RandomToken) == kRandomTokenSizeInBytes,
/external/federated-compute/fcp/tensorflow/
Dhost_object.h71 std::optional<std::shared_ptr<void>> TryLookup(RandomToken token);
72 void Register(RandomToken token, std::shared_ptr<void> p);
73 void Unregister(RandomToken token);
76 absl::flat_hash_map<RandomToken, std::shared_ptr<void>> objects_
104 RandomToken token() const { return *token_; } in token()
111 RandomToken token) in HostObjectRegistration()
115 UniqueValue<RandomToken> token_;
131 RandomToken token = RandomToken::Generate(); in Register()
140 static std::optional<std::shared_ptr<T>> TryLookup(RandomToken token) { in TryLookup()
Dhost_object.cc28 RandomToken token) { in TryLookup()
46 void HostObjectRegistryImpl::Register(RandomToken token, in Register()
54 void HostObjectRegistryImpl::Unregister(RandomToken token) { in Unregister()
Dserve_slices_op_test.cc42 RandomToken, std::vector<tensorflow::Tensor>, int32_t, absl::string_view,
133 std::string RunSessionExpectingSuccess(RandomToken callback_token) { in RunSessionExpectingSuccess()
149 RandomToken callback_token = callback_registration.token(); in TEST_F()
157 std::optional<RandomToken> callback_token; in TEST_F()
Dserve_slices_registry_test.cc32 RandomToken, std::vector<tensorflow::Tensor>, int32_t, absl::string_view,
38 std::optional<RandomToken> id = std::nullopt; in TEST()
68 RandomToken id = callback_tokens[i].token(); in TEST()
Dserve_slices_registry.h74 /*callback_token=*/RandomToken,
101 get_serve_slices_callback(RandomToken token) { in get_serve_slices_callback()
Dhost_object_test.cc47 HostObjectRegistry<WidgetInterface>::TryLookup(RandomToken::Generate()); in TEST()
68 std::optional<RandomToken> token; in TEST()
Dexternal_dataset_op_test.cc116 RandomToken dataset_token, in RunSession()
137 RandomToken dataset_token, in RunSession()
148 RandomToken dataset_token, in RunSessionAndGetOutput()
281 RunSession(session.get(), RandomToken::Generate(), selector, nullptr); in TEST()
Dserve_slices_op.cc133 RandomToken callback_token = RandomToken::FromBytes(callback_token_bytes); in Compute()
Dexternal_dataset_op.cc61 RandomToken token = RandomToken::FromBytes(token_bytes); in MakeDataset()
/external/federated-compute/fcp/tensorflow/python/
Dserve_slices_registry.cc85 [this](fcp::RandomToken callback_token, in enter()