Project
Loading...
Searching...
No Matches
GPUReconstructionMetal.h
Go to the documentation of this file.
1// Copyright 2019-2025 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef GPURECONSTRUCTIONMETAL_H
13#define GPURECONSTRUCTIONMETAL_H
14
16
18
19namespace o2::gpu
20{
21struct GPUReconstructionMetalInternals;
22
23class GPUReconstructionMetal : public GPUReconstructionProcessing::KernelInterface<GPUReconstructionMetal, GPUReconstructionDeviceBase>
24{
25 public:
28
29 template <class T, int32_t I = 0, typename... Args>
30 void runKernelBackend(const krnlSetupTime& _xyz, const Args&... args);
31
32 protected:
33 int32_t InitDevice_Runtime() override;
34 int32_t ExitDevice_Runtime() override;
35
36 virtual int32_t GPUChkErrInternal(const int64_t error, const char* file, int32_t line) const override;
37
38 void SynchronizeGPU() override;
39 int32_t GPUDebug(const char* state = "UNKNOWN", int32_t stream = -1, bool force = false) override;
40 void SynchronizeStream(int32_t stream) override;
41 void SynchronizeEvents(deviceEvent* evList, int32_t nEvents = 1) override;
42 void StreamWaitForEvents(int32_t stream, deviceEvent* evList, int32_t nEvents = 1) override;
43 bool IsEventDone(deviceEvent* evList, int32_t nEvents = 1) override;
44
45 size_t WriteToConstantMemory(size_t offset, const void* src, size_t size, int32_t stream = -1, deviceEvent* ev = nullptr) override;
46 size_t GPUMemCpy(void* dst, const void* src, size_t size, int32_t stream, int32_t toGPU, deviceEvent* ev = nullptr, deviceEvent* evList = nullptr, int32_t nEvents = 1) override;
47 void ReleaseEvent(deviceEvent ev) override;
48 void RecordMarker(deviceEvent* ev, int32_t stream) override;
49
50 template <class T, int32_t I = 0>
51 int32_t AddKernel();
52
54
55 template <class S, class T, int32_t I>
57
59
60 private:
61 int32_t AddKernels();
62};
63
64} // namespace o2::gpu
65
66#endif // GPURECONSTRUCTIONMETAL_H
o2::gpu::GPUReconstruction * GPUReconstruction_Create_METAL(const o2::gpu::GPUSettingsDeviceBackend &cfg)
SurfaceTrackState state
GPUReconstructionMetal(const GPUSettingsDeviceBackend &cfg)
void SynchronizeStream(int32_t stream) override
virtual int32_t GPUChkErrInternal(const int64_t error, const char *file, int32_t line) const override
size_t GPUMemCpy(void *dst, const void *src, size_t size, int32_t stream, int32_t toGPU, deviceEvent *ev=nullptr, deviceEvent *evList=nullptr, int32_t nEvents=1) override
void ReleaseEvent(deviceEvent ev) override
GPUReconstructionMetalInternals * mInternals
void SynchronizeEvents(deviceEvent *evList, int32_t nEvents=1) override
bool IsEventDone(deviceEvent *evList, int32_t nEvents=1) override
int32_t ExitDevice_Runtime() override
int32_t InitDevice_Runtime() override
void RecordMarker(deviceEvent *ev, int32_t stream) override
int32_t GPUDebug(const char *state="UNKNOWN", int32_t stream=-1, bool force=false) override
void runKernelBackend(const krnlSetupTime &_xyz, const Args &... args)
size_t WriteToConstantMemory(size_t offset, const void *src, size_t size, int32_t stream=-1, deviceEvent *ev=nullptr) override
void StreamWaitForEvents(int32_t stream, deviceEvent *evList, int32_t nEvents=1) override
GLenum src
Definition glcorearb.h:1767
GLsizeiptr size
Definition glcorearb.h:659
GLenum GLenum dst
Definition glcorearb.h:1767
GLintptr offset
Definition glcorearb.h:660
GLuint GLuint stream
Definition glcorearb.h:1806
const int nEvents
Definition test_Fifo.cxx:27