ATLAS Offline Software
Control
AthCUDA
AthCUDAServices
src
StreamPool.cxx
Go to the documentation of this file.
1
//
2
// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
//
4
5
6
#include "
StreamPool.h
"
7
8
// TBB include(s).
9
#include <tbb/concurrent_queue.h>
10
11
12
namespace
AthCUDA
{
13
14
15
class
StreamPoolImpl
16
{
17
public
:
18
tbb::concurrent_bounded_queue< StreamPool::ptr >
m_streams
;
19
};
20
21
22
23
StreamPool::StreamPool
()
24
{
25
}
26
27
28
29
StreamPool::~StreamPool
()
30
{
31
}
32
33
34
bool
StreamPool::empty
()
const
35
{
36
return
m_impl
->m_streams.empty();
37
}
38
39
40
StreamPool::ptr
StreamPool::pop
()
41
{
42
ptr
s
=
nullptr
;
43
m_impl
->m_streams.pop(
s
);
44
return
s
;
45
}
46
47
48
void
StreamPool::push
(
const
ptr
&
s
)
49
{
50
m_impl
->m_streams.push(
s
);
51
}
52
53
54
}
// namespace AthCUDA
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
AthCUDA::StreamPool::pop
ptr pop()
Definition:
StreamPool.cxx:40
StreamPool.h
AthCUDA
Definition:
Info.h:14
AthCUDA::StreamPool::~StreamPool
~StreamPool()
Definition:
StreamPool.cxx:29
AthCUDA::StreamPool::ptr
void * ptr
Definition:
StreamPool.h:22
AthCUDA::StreamPool::StreamPool
StreamPool()
Definition:
StreamPool.cxx:23
AthCUDA::StreamPool::empty
bool empty() const
Definition:
StreamPool.cxx:34
AthCUDA::StreamPool::m_impl
std::unique_ptr< StreamPoolImpl > m_impl
Definition:
StreamPool.h:31
AthCUDA::StreamPoolImpl::m_streams
tbb::concurrent_bounded_queue< StreamPool::ptr > m_streams
Definition:
StreamPool.cxx:18
AthCUDA::StreamPool::push
void push(const ptr &s)
Definition:
StreamPool.cxx:48
AthCUDA::StreamPoolImpl
Definition:
StreamPool.cxx:16
Generated on Sun Dec 22 2024 21:18:36 for ATLAS Offline Software by
1.8.18