Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#include "core/framework/stream_handles.h"
 
#include <algorithm>
 
namespace onnxruntime {
 
void Stream::UpdateWithAwaitedNotification(const synchronize::Notification& notification) {
  const std::unordered_map<const Stream*, uint64_t>& stream_sync_info = notification.GetStreamSyncInfo();
  for (const auto& kv : stream_sync_info) {
    auto ret = producer_stream_sync_info_.insert(kv);
    if (!ret.second) {
      // we already have an entry. use the highest value for the producer stream.
      ret.first->second = std::max(ret.first->second, kv.second);
    }
  }
}
}  // namespace onnxruntime