HeterogeneousCore
CUDAUtilities
interface
FlexiStorage.h
Go to the documentation of this file.
1
#ifndef HeterogeneousCore_CUDAUtilities_interface_FlexiStorage_h
2
#define HeterogeneousCore_CUDAUtilities_interface_FlexiStorage_h
3
4
#include <cstdint>
5
6
namespace
cms
{
7
namespace
cuda
{
8
9
template
<
typename
I,
int
S>
10
class
FlexiStorage
{
11
public
:
12
constexpr
int
capacity
()
const
{
return
S
; }
13
14
constexpr
I
&
operator[]
(
int
i
) {
return
m_v
[
i
]; }
15
constexpr
const
I
&
operator[]
(
int
i
)
const
{
return
m_v
[
i
]; }
16
17
constexpr
I
*
data
() {
return
m_v
; }
18
constexpr
I
const
*
data
()
const
{
return
m_v
; }
19
20
private
:
21
I
m_v
[
S
];
22
};
23
24
template
<
typename
I>
25
class
FlexiStorage
<
I
, -1> {
26
public
:
27
constexpr
void
init
(
I
*
v
,
int
s
) {
28
m_v
=
v
;
29
m_capacity =
s
;
30
}
31
32
constexpr
int
capacity
()
const
{
return
m_capacity; }
33
34
constexpr
I
&
operator[]
(
int
i
) {
return
m_v
[
i
]; }
35
constexpr
const
I
&
operator[]
(
int
i
)
const
{
return
m_v
[
i
]; }
36
37
constexpr
I
*
data
() {
return
m_v
; }
38
constexpr
I
const
*
data
()
const
{
return
m_v
; }
39
40
private
:
41
I
*
m_v
;
42
int
m_capacity
;
43
};
44
45
}
// namespace cuda
46
47
}
// namespace cms
48
49
#endif
mps_fire.i
i
Definition:
mps_fire.py:428
cms::cuda::FlexiStorage< I, -1 >::operator[]
constexpr I & operator[](int i)
Definition:
FlexiStorage.h:34
cms::cuda::FlexiStorage< I, -1 >::data
constexpr I * data()
Definition:
FlexiStorage.h:37
cms::cuda::FlexiStorage::capacity
constexpr int capacity() const
Definition:
FlexiStorage.h:12
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
Exhume::I
const std::complex< double > I
Definition:
I.h:8
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:97
cms::cuda::FlexiStorage
Definition:
FlexiStorage.h:10
cms::cuda::FlexiStorage::data
constexpr I * data()
Definition:
FlexiStorage.h:17
cms::cuda::FlexiStorage::data
constexpr I const * data() const
Definition:
FlexiStorage.h:18
cms::cuda::v
uint32_t const T *__restrict__ v
Definition:
HistoContainer.h:11
cms::cuda::FlexiStorage::operator[]
constexpr const I & operator[](int i) const
Definition:
FlexiStorage.h:15
cms::cuda::FlexiStorage::operator[]
constexpr I & operator[](int i)
Definition:
FlexiStorage.h:14
cms::cuda::FlexiStorage< I, -1 >::data
constexpr I const * data() const
Definition:
FlexiStorage.h:38
cms::cuda::FlexiStorage< I, -1 >::init
constexpr void init(I *v, int s)
Definition:
FlexiStorage.h:27
ecalDigis_cff.cuda
cuda
Definition:
ecalDigis_cff.py:35
cms::cuda::FlexiStorage< I, -1 >::m_capacity
int m_capacity
Definition:
FlexiStorage.h:42
cms::cuda::FlexiStorage< I, -1 >::capacity
constexpr int capacity() const
Definition:
FlexiStorage.h:32
cms::cuda::FlexiStorage::m_v
I m_v[S]
Definition:
FlexiStorage.h:21
cms::cuda::FlexiStorage< I, -1 >::operator[]
constexpr const I & operator[](int i) const
Definition:
FlexiStorage.h:35
cms::cuda::FlexiStorage< I, -1 >::m_v
I * m_v
Definition:
FlexiStorage.h:41
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
Generated for CMSSW Reference Manual by
1.8.16