ATLAS Offline Software
Loading...
Searching...
No Matches
GeoLoadGpu.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 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#include <vector>
12
13#include "GeoGpu_structs.h"
14
15typedef std::map<Identifier_Gpu, const CaloDetDescrElement_Gpu*> t_cellmap_Gpu;
16
18public:
19 GeoLoadGpu() = default;
20
22 delete m_cellid_array;
23 }
24
25 void set_ncells( unsigned long nc ) { m_ncells = nc; };
26 void set_nregions( unsigned int nr ) { m_nregions = nr; };
32 void set_max_sample( int s ) { m_max_sample = s; };
34 const CaloDetDescrElement_Gpu* index2cell( unsigned long index ) { return ( *m_cells )[m_cellid_array[index]]; };
35
37 bool LoadGpu() {
38 return LoadGpu_cu();
39 }
40 bool LoadGpu_kk();
41 bool LoadGpu_cu();
42
43 void set_geoPtr( GeoGpu* ptr ) { m_geo_d = ptr; }
44 GeoGpu* get_geoPtr() const { return m_geo_d; }
45
46 unsigned long get_ncells() const { return m_ncells; }
47
48 // bool LoadGpu_Region(GeoRegion * ) ;
49
50private:
51 bool TestGeo();
53
54protected:
55 unsigned long m_ncells{0}; // number of cells
56 unsigned int m_nregions{0}; // number of regions
57 t_cellmap_Gpu* m_cells{0}; // from Geometry class
58 GeoRegion* m_regions{0}; // array of regions on host
59 GeoRegion* m_regions_d{0}; // array of region on GPU
61 Identifier_Gpu* m_cellid_array{0}; // cell id to Indentifier lookup table
62 int m_max_sample{0}; // Max number of samples
63 Rg_Sample_Index* m_sample_index_h{0}; // index for flatout of GeoLookup over sample
64
66
67};
68#endif
#define gr
std::map< Identifier_Gpu, const CaloDetDescrElement_Gpu * > t_cellmap_Gpu
Definition GeoLoadGpu.h:15
bool LoadGpu_kk()
GeoGpu * m_geo_d
Definition GeoLoadGpu.h:65
void set_nregions(unsigned int nr)
Definition GeoLoadGpu.h:26
void set_regions(GeoRegion *r)
Definition GeoLoadGpu.h:29
GeoRegion * m_regions_d
Definition GeoLoadGpu.h:59
unsigned long m_ncells
Definition GeoLoadGpu.h:55
void set_geoPtr(GeoGpu *ptr)
Definition GeoLoadGpu.h:43
void set_sample_index_h(Rg_Sample_Index *s)
Definition GeoLoadGpu.h:33
t_cellmap_Gpu * m_cells
Definition GeoLoadGpu.h:57
void set_cellmap(t_cellmap_Gpu *cm)
Definition GeoLoadGpu.h:27
void set_g_regions(GeoRegion *gr)
Definition GeoLoadGpu.h:30
GeoRegion * m_regions
Definition GeoLoadGpu.h:58
t_cellmap_Gpu * get_cellmap()
Definition GeoLoadGpu.h:36
int m_max_sample
Definition GeoLoadGpu.h:62
t_cellmap_Gpu * set_cellmap()
Definition GeoLoadGpu.h:28
void set_max_sample(int s)
Definition GeoLoadGpu.h:32
void set_ncells(unsigned long nc)
Definition GeoLoadGpu.h:25
void set_cells_g(CaloDetDescrElement_Gpu *gc)
Definition GeoLoadGpu.h:31
unsigned int m_nregions
Definition GeoLoadGpu.h:56
bool LoadGpu_cu()
CaloDetDescrElement_Gpu * m_cells_d
Definition GeoLoadGpu.h:60
Identifier_Gpu * m_cellid_array
Definition GeoLoadGpu.h:61
bool TestGeo()
Rg_Sample_Index * m_sample_index_h
Definition GeoLoadGpu.h:63
unsigned long get_ncells() const
Definition GeoLoadGpu.h:46
GeoGpu * get_geoPtr() const
Definition GeoLoadGpu.h:44
bool LoadGpu()
Definition GeoLoadGpu.h:37
GeoLoadGpu()=default
const CaloDetDescrElement_Gpu * index2cell(unsigned long index)
Definition GeoLoadGpu.h:34
bool SanityCheck()
int r
Definition globals.cxx:22
Definition index.py:1