/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
HeterogeneousCore/MPICore/src/MPIToken.cc
8 строк
458 B
Andrea Bocci
Redesign the MPI event and stream synchronisation
27 апр 2026, 15:05
Не верифицирован
27 апр 2026, 15:05
7eadb80
Код
Авторство
О чём код?
#include "HeterogeneousCore/MPICore/interface/MPIChannel.h" #include "HeterogeneousCore/MPICore/interface/MPIToken.h" // Store the MPIChannel in a shared_ptr so that copies of the MPIToken can refer to the same MPIChannel. // When the last MPIToken is destroyed, the shared_ptr will call MPIChannel::sync() insyead of deleting it. MPIToken::MPIToken(MPIChannel& channel) : channel_(&channel, [](MPIChannel* ptr) { ptr->sync(); }) { channel_->acquire(); }