ATLAS Offline Software
Loading...
Searching...
No Matches
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
14typedef std::map<Identifier_Gpu, const CaloDetDescrElement_Gpu*> t_cellmap_Gpu;
15
17public:
18 GeoLoadGpu() = default;
19
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; };
31 void set_max_sample( int s ) { m_max_sample = s; };
33 const CaloDetDescrElement_Gpu* index2cell( unsigned long index ) { return ( *m_cells )[m_cellid_array[index]]; };
34
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
49private:
50 bool TestGeo();
52
53protected:
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
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
65
66};
67#endif
#define gr
std::map< Identifier_Gpu, const CaloDetDescrElement_Gpu * > t_cellmap_Gpu
Definition GeoLoadGpu.h:14
bool LoadGpu_kk()
GeoGpu * m_geo_d
Definition GeoLoadGpu.h:64
void set_nregions(unsigned int nr)
Definition GeoLoadGpu.h:25
void set_regions(GeoRegion *r)
Definition GeoLoadGpu.h:28
GeoRegion * m_regions_d
Definition GeoLoadGpu.h:58
unsigned long m_ncells
Definition GeoLoadGpu.h:54
void set_geoPtr(GeoGpu *ptr)
Definition GeoLoadGpu.h:42
void set_sample_index_h(Rg_Sample_Index *s)
Definition GeoLoadGpu.h:32
t_cellmap_Gpu * m_cells
Definition GeoLoadGpu.h:56
void set_cellmap(t_cellmap_Gpu *cm)
Definition GeoLoadGpu.h:26
void set_g_regions(GeoRegion *gr)
Definition GeoLoadGpu.h:29
GeoRegion * m_regions
Definition GeoLoadGpu.h:57
t_cellmap_Gpu * get_cellmap()
Definition GeoLoadGpu.h:35
int m_max_sample
Definition GeoLoadGpu.h:61
t_cellmap_Gpu * set_cellmap()
Definition GeoLoadGpu.h:27
void set_max_sample(int s)
Definition GeoLoadGpu.h:31
void set_ncells(unsigned long nc)
Definition GeoLoadGpu.h:24
void set_cells_g(CaloDetDescrElement_Gpu *gc)
Definition GeoLoadGpu.h:30
unsigned int m_nregions
Definition GeoLoadGpu.h:55
bool LoadGpu_cu()
CaloDetDescrElement_Gpu * m_cells_d
Definition GeoLoadGpu.h:59
Identifier_Gpu * m_cellid_array
Definition GeoLoadGpu.h:60
bool TestGeo()
Rg_Sample_Index * m_sample_index_h
Definition GeoLoadGpu.h:62
unsigned long get_ncells() const
Definition GeoLoadGpu.h:45
GeoGpu * get_geoPtr() const
Definition GeoLoadGpu.h:43
bool LoadGpu()
Definition GeoLoadGpu.h:36
GeoLoadGpu()=default
const CaloDetDescrElement_Gpu * index2cell(unsigned long index)
Definition GeoLoadGpu.h:33
bool SanityCheck()
int r
Definition globals.cxx:22
Definition index.py:1