Project
Loading...
Searching...
No Matches
GPUGeneralKernels.cxx
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
#include "
GPUGeneralKernels.h
"
16
#include "
GPUConstantMem.h
"
17
using namespace
o2::gpu
;
18
19
template
<>
20
GPUdii
()
void
GPUMemClean16
::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread,
GPUsharedref
() GPUSharedMemory& smem, processorType&
GPUrestrict
() processors,
GPUglobalref
()
void
*
ptr
, uint64_t
size
)
21
{
22
const
uint64_t
stride
=
get_global_size
(0);
23
int4
i0;
24
i0.
x
= i0.
y
= i0.
z
= i0.
w
= 0;
25
int4
* ptra = (
int4
*)
ptr
;
26
uint64_t
len
= (
size
+
sizeof
(
int4
) - 1) /
sizeof
(
int4
);
27
for
(uint64_t
i
=
get_global_id
(0);
i
<
len
;
i
+=
stride
) {
28
ptra[
i
] = i0;
29
}
30
}
31
32
template
<>
33
GPUdii
()
void
GPUitoa
::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread,
GPUsharedref
() GPUSharedMemory& smem, processorType&
GPUrestrict
() processors,
GPUglobalref
() int32_t*
ptr
, uint64_t
size
)
34
{
35
const
uint64_t
stride
=
get_global_size
(0);
36
for
(uint64_t
i
=
get_global_id
(0);
i
<
size
;
i
+=
stride
) {
37
ptr
[
i
] =
i
;
38
}
39
}
i
int32_t i
Definition
GPUCommonAlgorithm.h:443
GPUsharedref
#define GPUsharedref()
Definition
GPUCommonDefAPI.h:56
get_global_size
#define get_global_size(dim)
Definition
GPUCommonDefAPI.h:226
GPUrestrict
#define GPUrestrict()
Definition
GPUCommonDefAPI.h:212
get_global_id
#define get_global_id(dim)
Definition
GPUCommonDefAPI.h:225
GPUglobalref
#define GPUglobalref()
Definition
GPUCommonDefAPI.h:57
GPUConstantMem.h
GPUdii
GPUdii() void GPUMemClean16
Definition
GPUGeneralKernels.cxx:20
GPUGeneralKernels.h
ptr
TBranch * ptr
Definition
TTreePlugin.cxx:832
o2::gpu::GPUMemClean16
Definition
GPUGeneralKernels.h:95
o2::gpu::GPUitoa
Definition
GPUGeneralKernels.h:104
size
GLsizeiptr size
Definition
glcorearb.h:659
void
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
stride
GLint GLenum GLboolean GLsizei stride
Definition
glcorearb.h:867
len
GLenum GLenum GLsizei len
Definition
glcorearb.h:4232
o2::gpu
Definition
TrackTRD.h:35
int4
Definition
GPUCommonDefAPI.h:70
int4::y
int32_t y
Definition
GPUCommonDefAPI.h:70
int4::z
int32_t z
Definition
GPUCommonDefAPI.h:70
int4::x
int32_t x
Definition
GPUCommonDefAPI.h:70
int4::w
int32_t w
Definition
GPUCommonDefAPI.h:70
GPU
GPUTracking
Base
GPUGeneralKernels.cxx
Generated on Tue Feb 25 2025 17:03:25 for Project by
1.9.8