ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_FastCaloSim
ISF_FastCaloGpu
ISF_FastCaloGpu
GeoLoadGpu.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ISF_FASTCALOGPU_GeoLoadGpu_H
6
#define ISF_FASTCALOGPU_GeoLoadGpu_H
7
8
// This header can be use both gcc and nvcc host part
9
10
#include <map>
11
12
#include "
GeoGpu_structs.h
"
13
14
typedef
std::map<Identifier_Gpu, const CaloDetDescrElement_Gpu*>
t_cellmap_Gpu
;
15
16
class
GeoLoadGpu
{
17
public
:
18
GeoLoadGpu
() =
default
;
19
20
~GeoLoadGpu
() {
21
delete
m_cellid_array
;
22
}
23
24
void
set_ncells
(
unsigned
long
nc ) {
m_ncells
= nc; };
25
void
set_nregions
(
unsigned
int
nr ) {
m_nregions
= nr; };
26
void
set_cellmap
(
t_cellmap_Gpu
*
cm
) {
m_cells
=
cm
; };
27
t_cellmap_Gpu
*
set_cellmap
( ) {
return
m_cells
; };
28
void
set_regions
(
GeoRegion
*
r
) {
m_regions
=
r
; };
29
void
set_g_regions
(
GeoRegion
*
gr
) {
m_regions_d
=
gr
; };
30
void
set_cells_g
(
CaloDetDescrElement_Gpu
* gc ) {
m_cells_d
= gc; };
31
void
set_max_sample
(
int
s ) {
m_max_sample
= s; };
32
void
set_sample_index_h
(
Rg_Sample_Index
* s ) {
m_sample_index_h
= s; };
33
const
CaloDetDescrElement_Gpu
*
index2cell
(
unsigned
long
index
) {
return
( *
m_cells
)[
m_cellid_array
[
index
]]; };
34
35
t_cellmap_Gpu
*
get_cellmap
( ) {
return
m_cells
; };
36
bool
LoadGpu
() {
37
return
LoadGpu_cu
();
38
}
39
bool
LoadGpu_kk
();
40
bool
LoadGpu_cu
();
41
42
void
set_geoPtr
(
GeoGpu
* ptr ) {
m_geo_d
= ptr; }
43
GeoGpu
*
get_geoPtr
()
const
{
return
m_geo_d
; }
44
45
unsigned
long
get_ncells
()
const
{
return
m_ncells
; }
46
47
// bool LoadGpu_Region(GeoRegion * ) ;
48
49
private
:
50
bool
TestGeo
();
51
bool
SanityCheck
();
52
53
protected
:
54
unsigned
long
m_ncells
{0};
// number of cells
55
unsigned
int
m_nregions
{0};
// number of regions
56
t_cellmap_Gpu
*
m_cells
{0};
// from Geometry class
57
GeoRegion
*
m_regions
{0};
// array of regions on host
58
GeoRegion
*
m_regions_d
{0};
// array of region on GPU
59
CaloDetDescrElement_Gpu
*
m_cells_d
{0};
// Cells in GPU
60
Identifier_Gpu
*
m_cellid_array
{0};
// cell id to Indentifier lookup table
61
int
m_max_sample
{0};
// Max number of samples
62
Rg_Sample_Index
*
m_sample_index_h
{0};
// index for flatout of GeoLookup over sample
63
64
GeoGpu
*
m_geo_d
{0};
65
66
};
67
#endif
gr
#define gr
GeoGpu_structs.h
t_cellmap_Gpu
std::map< Identifier_Gpu, const CaloDetDescrElement_Gpu * > t_cellmap_Gpu
Definition
GeoLoadGpu.h:14
cm
const double cm
Definition
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
CaloDetDescrElement_Gpu
Definition
CaloDetDescrElement_g.h:10
GeoLoadGpu::LoadGpu_kk
bool LoadGpu_kk()
GeoLoadGpu::m_geo_d
GeoGpu * m_geo_d
Definition
GeoLoadGpu.h:64
GeoLoadGpu::set_nregions
void set_nregions(unsigned int nr)
Definition
GeoLoadGpu.h:25
GeoLoadGpu::~GeoLoadGpu
~GeoLoadGpu()
Definition
GeoLoadGpu.h:20
GeoLoadGpu::set_regions
void set_regions(GeoRegion *r)
Definition
GeoLoadGpu.h:28
GeoLoadGpu::m_regions_d
GeoRegion * m_regions_d
Definition
GeoLoadGpu.h:58
GeoLoadGpu::m_ncells
unsigned long m_ncells
Definition
GeoLoadGpu.h:54
GeoLoadGpu::set_geoPtr
void set_geoPtr(GeoGpu *ptr)
Definition
GeoLoadGpu.h:42
GeoLoadGpu::set_sample_index_h
void set_sample_index_h(Rg_Sample_Index *s)
Definition
GeoLoadGpu.h:32
GeoLoadGpu::m_cells
t_cellmap_Gpu * m_cells
Definition
GeoLoadGpu.h:56
GeoLoadGpu::set_cellmap
void set_cellmap(t_cellmap_Gpu *cm)
Definition
GeoLoadGpu.h:26
GeoLoadGpu::set_g_regions
void set_g_regions(GeoRegion *gr)
Definition
GeoLoadGpu.h:29
GeoLoadGpu::m_regions
GeoRegion * m_regions
Definition
GeoLoadGpu.h:57
GeoLoadGpu::get_cellmap
t_cellmap_Gpu * get_cellmap()
Definition
GeoLoadGpu.h:35
GeoLoadGpu::m_max_sample
int m_max_sample
Definition
GeoLoadGpu.h:61
GeoLoadGpu::set_cellmap
t_cellmap_Gpu * set_cellmap()
Definition
GeoLoadGpu.h:27
GeoLoadGpu::set_max_sample
void set_max_sample(int s)
Definition
GeoLoadGpu.h:31
GeoLoadGpu::set_ncells
void set_ncells(unsigned long nc)
Definition
GeoLoadGpu.h:24
GeoLoadGpu::set_cells_g
void set_cells_g(CaloDetDescrElement_Gpu *gc)
Definition
GeoLoadGpu.h:30
GeoLoadGpu::m_nregions
unsigned int m_nregions
Definition
GeoLoadGpu.h:55
GeoLoadGpu::LoadGpu_cu
bool LoadGpu_cu()
GeoLoadGpu::m_cells_d
CaloDetDescrElement_Gpu * m_cells_d
Definition
GeoLoadGpu.h:59
GeoLoadGpu::m_cellid_array
Identifier_Gpu * m_cellid_array
Definition
GeoLoadGpu.h:60
GeoLoadGpu::TestGeo
bool TestGeo()
GeoLoadGpu::m_sample_index_h
Rg_Sample_Index * m_sample_index_h
Definition
GeoLoadGpu.h:62
GeoLoadGpu::get_ncells
unsigned long get_ncells() const
Definition
GeoLoadGpu.h:45
GeoLoadGpu::get_geoPtr
GeoGpu * get_geoPtr() const
Definition
GeoLoadGpu.h:43
GeoLoadGpu::LoadGpu
bool LoadGpu()
Definition
GeoLoadGpu.h:36
GeoLoadGpu::GeoLoadGpu
GeoLoadGpu()=default
GeoLoadGpu::index2cell
const CaloDetDescrElement_Gpu * index2cell(unsigned long index)
Definition
GeoLoadGpu.h:33
GeoLoadGpu::SanityCheck
bool SanityCheck()
GeoRegion
Definition
GeoRegion.h:18
Identifier_Gpu
Definition
Identifier_g.h:15
r
int r
Definition
globals.cxx:22
index
Definition
index.py:1
GeoGpu
Definition
GeoGpu_structs.h:15
Rg_Sample_Index
Definition
GeoGpu_structs.h:10
Generated on
for ATLAS Offline Software by
1.17.0