ATLAS Offline Software
Loading...
Searching...
No Matches
SeedMakingWorkCuda.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_H
6#define TRIGINDETCUDA_SEEDMAKINGWORKCUDA_H
7
8
9#include "TrigAccelEvent/Work.h" //base class
10#include "CommonStructures.h" //for WorkTimeStamp
11
12#include <cstdio> // for printf
13#include <memory> // for shared_ptr
14
17
19
20public:
21 SeedMakingWorkCuda(unsigned int, SeedMakingDeviceContext*, 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
46};
47
49
50public:
51 SeedMakingWorkCudaManaged(unsigned int, SeedMakingManagedDeviceContext*, std::shared_ptr<TrigAccel::OffloadBuffer>,
54 std::shared_ptr<TrigAccel::OffloadBuffer> getOutput();
55 bool run();
56 unsigned int getId() const {
57 return m_workId;
58 }
59
60private:
61
62 inline void checkError() const {
63 cudaError_t error = cudaGetLastError();
64 if(error != cudaSuccess) {
65 printf("CUDA error: %s\n", cudaGetErrorString(error));
66 exit(-1);
67 }
68 };
69
70 unsigned int m_workId;
72 std::shared_ptr<TrigAccel::OffloadBuffer> m_input, m_output;
74
76};
77
78#endif
WorkTimeStampQueue * m_timeLine
std::shared_ptr< TrigAccel::OffloadBuffer > m_output
unsigned int getId() const
std::shared_ptr< TrigAccel::OffloadBuffer > m_input
SeedMakingManagedDeviceContext * m_context
SeedMakingWorkCudaManaged(unsigned int, SeedMakingManagedDeviceContext *, std::shared_ptr< TrigAccel::OffloadBuffer >, WorkTimeStampQueue *)
std::shared_ptr< TrigAccel::OffloadBuffer > getOutput()
std::shared_ptr< TrigAccel::OffloadBuffer > m_input
std::shared_ptr< TrigAccel::OffloadBuffer > m_output
SeedMakingDeviceContext * m_context
SeedMakingWorkCuda(unsigned int, SeedMakingDeviceContext *, std::shared_ptr< TrigAccel::OffloadBuffer >, WorkTimeStampQueue *)
WorkTimeStampQueue * m_timeLine
std::shared_ptr< TrigAccel::OffloadBuffer > getOutput()
unsigned int getId() const