ATLAS Offline Software
Loading...
Searching...
No Matches
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
17
19
20public:
21 GbtsWorkCudaITk(unsigned int, GbtsDeviceContext*, std::shared_ptr<TrigAccel::OffloadBuffer>,
24 std::shared_ptr<TrigAccel::OffloadBuffer> getOutput();
25 bool run();
26 unsigned int getId() const {
27 return m_workId;
28 }
29
30private:
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;
42 std::shared_ptr<TrigAccel::OffloadBuffer> m_input, m_output;
44
45};
46
47#endif
std::shared_ptr< TrigAccel::OffloadBuffer > getOutput()
GbtsWorkCudaITk(unsigned int, GbtsDeviceContext *, std::shared_ptr< TrigAccel::OffloadBuffer >, WorkTimeStampQueue *)
std::shared_ptr< TrigAccel::OffloadBuffer > m_input
unsigned int m_workId
WorkTimeStampQueue * m_timeLine
unsigned int getId() const
std::shared_ptr< TrigAccel::OffloadBuffer > m_output
void checkError() const
GbtsDeviceContext * m_context