ATLAS Offline Software
Loading...
Searching...
No Matches
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
StreamPool.h
AthCUDA::StreamPoolImpl
Definition
StreamPool.cxx:16
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::StreamPool::~StreamPool
~StreamPool()
Definition
StreamPool.cxx:29
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::StreamPool::ptr
void * ptr
Definition
StreamPool.h:22
AthCUDA::StreamPool::pop
ptr pop()
Definition
StreamPool.cxx:40
AthCUDA::StreamPool::StreamPool
StreamPool()
Definition
StreamPool.cxx:23
AthCUDA
Definition
Info.h:14
Generated on
for ATLAS Offline Software by
1.14.0