Project
Loading...
Searching...
No Matches
GPUCommonArray.h
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
14
15
#ifndef GPUCOMMONARRAY_H
16
#define GPUCOMMONARRAY_H
17
18
#ifndef GPUCA_GPUCODE_DEVICE
19
#include <array>
20
#endif
21
22
#include "
GPUCommonDef.h
"
23
namespace
o2::gpu::gpustd
24
{
25
#ifdef GPUCA_GPUCODE_DEVICE
26
template
<
typename
T,
size_t
N>
27
struct
array
{
28
GPUd
() T& operator[](
size_t
i
) {
return
m_internal_V__[
i
]; };
29
GPUd
()
const
T& operator[](
size_t
i
)
const
{
return
m_internal_V__[
i
]; };
30
GPUd
() T*
data
() {
return
m_internal_V__; };
31
GPUd
()
const
T*
data
()
const
{
return
m_internal_V__; };
32
T m_internal_V__[N];
33
};
34
template
<
class
T,
class
... E>
35
GPUd
()
array
(T, E...)->array<T, 1 +
sizeof
...(E)>;
36
#else
37
template
<
typename
T,
size_t
N>
38
using
array
= std::array<T, N>;
39
#endif
40
}
// namespace o2::gpu::gpustd
41
#endif
i
int32_t i
Definition
GPUCommonAlgorithm.h:443
GPUCommonDef.h
data
GLboolean * data
Definition
glcorearb.h:298
o2::gpu::gpustd
Definition
GPUCommonArray.h:24
o2::gpu::gpustd::array
std::array< T, N > array
Definition
GPUCommonArray.h:38
o2::gpu::GPUd
GPUd() const expr uint32_t MultivariatePolynomialHelper< Dim
GPU
Common
GPUCommonArray.h
Generated on Tue Feb 25 2025 23:16:43 for Project by
1.9.8