ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAccel
TrigInDetCUDA
src
GbtsWorkCuda_ITk.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGINDETCUDA_GBTSWORKCUDA_ITK_H
6
#define TRIGINDETCUDA_GBTSWORKCUDA_ITK_H
7
8
9
10
#include "
TrigAccelEvent/Work.h
"
//base class
11
12
#include <cstdio>
// for printf
13
#include <memory>
// for shared_ptr and unique_ptr
14
15
class
GbtsDeviceContext
;
16
class
WorkTimeStampQueue
;
17
18
class
GbtsWorkCudaITk
:
public
TrigAccel::Work
{
19
20
public
:
21
GbtsWorkCudaITk
(
unsigned
int
,
GbtsDeviceContext
*, std::shared_ptr<TrigAccel::OffloadBuffer>,
22
WorkTimeStampQueue
*);
23
~GbtsWorkCudaITk
();
24
std::shared_ptr<TrigAccel::OffloadBuffer>
getOutput
();
25
bool
run
();
26
unsigned
int
getId
()
const
{
27
return
m_workId
;
28
}
29
30
private
:
31
32
inline
void
checkError
()
const
{
33
cudaError_t
error
= cudaGetLastError();
34
if
(
error
!= cudaSuccess) {
35
printf(
"CUDA error: %s\n"
, cudaGetErrorString(
error
));
36
exit(-1);
37
}
38
};
39
40
unsigned
int
m_workId
;
41
GbtsDeviceContext
*
m_context
;
42
std::shared_ptr<TrigAccel::OffloadBuffer>
m_input
,
m_output
;
43
WorkTimeStampQueue
*
m_timeLine
;
44
45
};
46
47
#endif
Work.h
GbtsWorkCudaITk::run
bool run()
GbtsWorkCudaITk::getOutput
std::shared_ptr< TrigAccel::OffloadBuffer > getOutput()
GbtsWorkCudaITk::GbtsWorkCudaITk
GbtsWorkCudaITk(unsigned int, GbtsDeviceContext *, std::shared_ptr< TrigAccel::OffloadBuffer >, WorkTimeStampQueue *)
GbtsWorkCudaITk::~GbtsWorkCudaITk
~GbtsWorkCudaITk()
GbtsWorkCudaITk::m_input
std::shared_ptr< TrigAccel::OffloadBuffer > m_input
Definition
GbtsWorkCuda_ITk.h:42
GbtsWorkCudaITk::m_workId
unsigned int m_workId
Definition
GbtsWorkCuda_ITk.h:40
GbtsWorkCudaITk::m_timeLine
WorkTimeStampQueue * m_timeLine
Definition
GbtsWorkCuda_ITk.h:43
GbtsWorkCudaITk::getId
unsigned int getId() const
Definition
GbtsWorkCuda_ITk.h:26
GbtsWorkCudaITk::m_output
std::shared_ptr< TrigAccel::OffloadBuffer > m_output
Definition
GbtsWorkCuda_ITk.h:42
GbtsWorkCudaITk::checkError
void checkError() const
Definition
GbtsWorkCuda_ITk.h:32
GbtsWorkCudaITk::m_context
GbtsDeviceContext * m_context
Definition
GbtsWorkCuda_ITk.h:41
TrigAccel::Work
Definition
Work.h:14
WorkTimeStampQueue
Definition
CommonStructures.h:30
error
Definition
IImpactPoint3dEstimator.h:72
GbtsDeviceContext
Definition
device_context.h:80
Generated on
for ATLAS Offline Software by
1.17.0