ATLAS Offline Software
SeedMakingWorkCuda_ITk.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGINDETCUDA_SEEDMAKINGWORKCUDA_ITK_H
6 #define TRIGINDETCUDA_SEEDMAKINGWORKCUDA_ITK_H
7 
8 
9 
10 #include "TrigAccelEvent/Work.h" //base class
11 
12 #include <cstdio> // for printf
13 #include <memory> // for shared_ptr
14 
17 
18 
20 
21 public:
22  SeedMakingWorkCudaITk(unsigned int, SeedMakingDeviceContext*, std::shared_ptr<TrigAccel::OffloadBuffer>,
25  std::shared_ptr<TrigAccel::OffloadBuffer> getOutput();
26  bool run();
27  unsigned int getId() const {
28  return m_workId;
29  }
30 
31 private:
32 
33  inline void checkError() const {
34  cudaError_t error = cudaGetLastError();
35  if(error != cudaSuccess) {
36  printf("CUDA error: %s\n", cudaGetErrorString(error));
37  exit(-1);
38  }
39  };
40 
41  unsigned int m_workId;
43  std::shared_ptr<TrigAccel::OffloadBuffer> m_input, m_output;
45 
47 };
48 
50 
51 public:
52  SeedMakingWorkCudaManagedITk(unsigned int, SeedMakingManagedDeviceContext*, std::shared_ptr<TrigAccel::OffloadBuffer>,
55  std::shared_ptr<TrigAccel::OffloadBuffer> getOutput();
56  bool run();
57  unsigned int getId() const {
58  return m_workId;
59  }
60 
61 private:
62 
63  inline void checkError() const {
64  cudaError_t error = cudaGetLastError();
65  if(error != cudaSuccess) {
66  printf("CUDA error: %s\n", cudaGetErrorString(error));
67  exit(-1);
68  }
69  };
70 
71  unsigned int m_workId;
73  std::shared_ptr<TrigAccel::OffloadBuffer> m_input, m_output;
75 
77 };
78 
79 #endif
SeedMakingWorkCudaManagedITk::m_ptCoeff2
float m_ptCoeff2
Definition: SeedMakingWorkCuda_ITk.h:76
SeedMakingWorkCudaManagedITk::m_ptCoeff
float m_ptCoeff
Definition: SeedMakingWorkCuda_ITk.h:76
SeedMakingWorkCudaITk
Definition: SeedMakingWorkCuda_ITk.h:19
SeedMakingWorkCudaITk::m_input
std::shared_ptr< TrigAccel::OffloadBuffer > m_input
Definition: SeedMakingWorkCuda_ITk.h:43
SeedMakingWorkCudaITk::m_workId
unsigned int m_workId
Definition: SeedMakingWorkCuda_ITk.h:39
SeedMakingWorkCudaManagedITk::m_maxD0
float m_maxD0
Definition: SeedMakingWorkCuda_ITk.h:76
SeedMakingWorkCudaManagedITk::m_context
SeedMakingManagedDeviceContext * m_context
Definition: SeedMakingWorkCuda_ITk.h:72
SeedMakingWorkCudaITk::m_ptCoeff
float m_ptCoeff
Definition: SeedMakingWorkCuda_ITk.h:46
SeedMakingWorkCudaITk::getId
unsigned int getId() const
Definition: SeedMakingWorkCuda_ITk.h:27
SeedMakingWorkCudaITk::checkError
void checkError() const
Definition: SeedMakingWorkCuda_ITk.h:33
SeedMakingWorkCudaITk::m_minPt2
float m_minPt2
Definition: SeedMakingWorkCuda_ITk.h:46
SeedMakingWorkCudaITk::m_output
std::shared_ptr< TrigAccel::OffloadBuffer > m_output
Definition: SeedMakingWorkCuda_ITk.h:43
SeedMakingWorkCudaITk::~SeedMakingWorkCudaITk
~SeedMakingWorkCudaITk()
SeedMakingWorkCudaManagedITk::m_CovMS
float m_CovMS
Definition: SeedMakingWorkCuda_ITk.h:76
SeedMakingWorkCudaManagedITk::getOutput
std::shared_ptr< TrigAccel::OffloadBuffer > getOutput()
SeedMakingWorkCudaManagedITk::m_minPt2
float m_minPt2
Definition: SeedMakingWorkCuda_ITk.h:76
SeedMakingWorkCudaITk::SeedMakingWorkCudaITk
SeedMakingWorkCudaITk(unsigned int, SeedMakingDeviceContext *, std::shared_ptr< TrigAccel::OffloadBuffer >, WorkTimeStampQueue *)
SeedMakingWorkCudaManagedITk::checkError
void checkError() const
Definition: SeedMakingWorkCuda_ITk.h:63
SeedMakingWorkCudaITk::m_maxD0
float m_maxD0
Definition: SeedMakingWorkCuda_ITk.h:46
SeedMakingWorkCudaITk::m_timeLine
WorkTimeStampQueue * m_timeLine
Definition: SeedMakingWorkCuda_ITk.h:44
calibdata.exit
exit
Definition: calibdata.py:236
SeedMakingWorkCudaManagedITk::m_workId
unsigned int m_workId
Definition: SeedMakingWorkCuda_ITk.h:69
SeedMakingWorkCudaManagedITk::run
bool run()
SeedMakingWorkCudaManagedITk::~SeedMakingWorkCudaManagedITk
~SeedMakingWorkCudaManagedITk()
SeedMakingWorkCudaManagedITk::m_output
std::shared_ptr< TrigAccel::OffloadBuffer > m_output
Definition: SeedMakingWorkCuda_ITk.h:73
SeedMakingWorkCudaManagedITk::SeedMakingWorkCudaManagedITk
SeedMakingWorkCudaManagedITk(unsigned int, SeedMakingManagedDeviceContext *, std::shared_ptr< TrigAccel::OffloadBuffer >, WorkTimeStampQueue *)
TrigAccel::Work
Definition: Work.h:14
WorkTimeStampQueue
Definition: CommonStructures.h:26
SeedMakingWorkCudaITk::m_CovMS
float m_CovMS
Definition: SeedMakingWorkCuda_ITk.h:46
SeedMakingWorkCudaManagedITk::m_input
std::shared_ptr< TrigAccel::OffloadBuffer > m_input
Definition: SeedMakingWorkCuda_ITk.h:73
SeedMakingManagedDeviceContext
Definition: device_context.h:45
SeedMakingDeviceContext
Definition: device_context.h:17
SeedMakingWorkCudaManagedITk
Definition: SeedMakingWorkCuda_ITk.h:49
SeedMakingWorkCudaManagedITk::m_timeLine
WorkTimeStampQueue * m_timeLine
Definition: SeedMakingWorkCuda_ITk.h:74
SeedMakingWorkCudaITk::m_context
SeedMakingDeviceContext * m_context
Definition: SeedMakingWorkCuda_ITk.h:42
SeedMakingWorkCudaITk::m_ptCoeff2
float m_ptCoeff2
Definition: SeedMakingWorkCuda_ITk.h:46
error
Definition: IImpactPoint3dEstimator.h:70
SeedMakingWorkCudaManagedITk::getId
unsigned int getId() const
Definition: SeedMakingWorkCuda_ITk.h:57
SeedMakingWorkCudaITk::getOutput
std::shared_ptr< TrigAccel::OffloadBuffer > getOutput()
Work.h
SeedMakingWorkCudaITk::run
bool run()