#include <SharedResource.h>
|
using | queue_ptr_t = std::shared_ptr< hep::concurrency::SerialTaskQueue > |
|
Definition at line 30 of file SharedResource.h.
art::detail::SharedResources::SharedResources |
( |
| ) |
|
Definition at line 35 of file SharedResource.cc.
SharedResource_t const LegacyResource
void registerSharedResource(detail::SharedResource_t const &)
Definition at line 104 of file SharedResource.cc.
107 std::vector<queue_ptr_t>
result;
113 result.push_back(pr.second);
118 for (
auto const&
name : resourceNames) {
120 std::find_if(
begin(sortedResources_),
121 end(sortedResources_),
122 [&
name](
auto const& pr) {
return pr.first ==
name; });
123 assert(it != sortedResources_.end());
124 result.push_back(it->second);
128 assert(not
empty(result));
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
std::vector< std::pair< std::string, queue_ptr_t > > sortedResources_
SharedResource_t const LegacyResource
bool search_all(FwdCont const &, Datum const &)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
void art::detail::SharedResources::ensure_not_frozen |
( |
std::string const & |
name | ) |
|
|
private |
Definition at line 45 of file SharedResource.cc.
49 <<
"The shared-resources registry has been frozen. All 'serialize' " 51 <<
"must be made in the constructor of a shared module and no later.\n";
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
void art::detail::SharedResources::freeze |
( |
tbb::task_group & |
group | ) |
|
Definition at line 78 of file SharedResource.cc.
82 std::vector<std::pair<unsigned, std::string>> resources_sorted_by_count;
87 resources_sorted_by_count.emplace_back(
count + offset,
name);
89 cet::sort_all(resources_sorted_by_count, [](
auto const&
a,
auto const&
b) {
90 return a.first <
b.first;
94 for (
auto const& pr : resources_sorted_by_count) {
96 std::make_shared<SerialTaskQueue>(group));
100 resourceCounts_.clear();
std::map< std::string, unsigned > resourceCounts_
std::vector< std::pair< std::string, queue_ptr_t > > sortedResources_
void sort_all(RandCont &)
SharedResource_t const LegacyResource
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
void art::detail::SharedResources::register_resource |
( |
std::string const & |
name | ) |
|
|
private |
Definition at line 68 of file SharedResource.cc.
std::map< std::string, unsigned > resourceCounts_
void ensure_not_frozen(std::string const &name)
SharedResource_t const LegacyResource
Definition at line 62 of file SharedResource.cc.
void register_resource(std::string const &name)
void art::detail::SharedResources::registerSharedResources |
( |
std::set< std::string > const & |
names | ) |
|
Definition at line 56 of file SharedResource.cc.
void register_resource(std::string const &name)
auto for_all(FwdCont &, Func)
bool art::detail::SharedResources::frozen_ {false} |
|
private |
unsigned art::detail::SharedResources::nLegacy_ {} |
|
private |
std::map<std::string, unsigned> art::detail::SharedResources::resourceCounts_ |
|
private |
The documentation for this class was generated from the following files: