Project
Loading...
Searching...
No Matches
GPUDisplayLoader.cxx
Go to the documentation of this file.
1
// Copyright 2019-2020 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
14
15
#include "
GPUDisplay.h
"
16
#include "
frontend/GPUDisplayFrontend.h
"
17
#include "
GPUDisplayInterface.h
"
18
19
#include <cstring>
20
#include <tuple>
21
#include <stdexcept>
22
23
using namespace
o2::gpu
;
24
25
extern
"C"
void
*
GPUTrackingDisplayLoader
(
const
char
*,
void
*);
26
27
template
<
class
T
,
typename
... Args>
28
static
inline
T
* createHelper(Args... args)
29
{
30
return
new
T
(args...);
31
}
32
33
void
*
GPUTrackingDisplayLoader
(
const
char
*
type
,
void
* args)
34
{
35
if
(strcmp(
type
,
"display"
) == 0) {
36
auto
x
= (std::tuple<GPUDisplayFrontend*, GPUChainTracking*, GPUQA*, const GPUParam*, const GPUCalibObjectsConst*, const GPUSettingsDisplay*>*)args;
37
return
std::apply([](
auto
&&...
y
) {
return
createHelper<GPUDisplay>(
y
...); }, *
x
);
38
}
else
if
(strcmp(
type
,
"frontend"
) == 0) {
39
auto
x
= (std::tuple<const char*>*)args;
40
return
std::apply([](
auto
&&...
y
) {
return
GPUDisplayFrontend::getFrontend
(
y
...); }, *
x
);
41
}
else
{
42
throw
std::runtime_error(
"Invalid display obejct type specified"
);
43
}
44
return
nullptr
;
45
}
GPUDisplayFrontend.h
GPUDisplayInterface.h
GPUTrackingDisplayLoader
void * GPUTrackingDisplayLoader(const char *, void *)
Definition
GPUDisplayLoader.cxx:33
GPUDisplay.h
int
o2::gpu::GPUDisplayFrontend::getFrontend
static GPUDisplayFrontend * getFrontend(const char *type)
Definition
GPUDisplayFrontend.cxx:120
x
GLint GLenum GLint x
Definition
glcorearb.h:403
type
GLint GLint GLsizei GLint GLenum GLenum type
Definition
glcorearb.h:275
o2::gpu
Definition
TrackTRD.h:35
o2::math_utils::detail::T
T
Definition
SMatrixGPU.h:747
GPU
GPUTracking
display
helpers
GPUDisplayLoader.cxx
Generated on Fri Apr 25 2025 17:28:20 for Project by
1.9.8