Project
Loading...
Searching...
No Matches
GPUErrors.h
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#ifndef GPUERRORS_H
16#define GPUERRORS_H
17
18#include "GPUCommonDef.h"
19#ifndef GPUCA_GPUCODE
20#include <unordered_map>
21#endif
22
23namespace o2::gpu
24{
25
27{
28 public:
30#define GPUCA_ERROR_CODE(num, name, ...) name = num,
31#include "GPUErrorCodes.h"
32#undef GPUCA_ERROR_CODE
33 };
34
35 GPUd() void raiseError(uint32_t code, uint32_t param1 = 0, uint32_t param2 = 0, uint32_t param3 = 0) const;
36 GPUd() bool hasError() { return *mErrors > 0; }
37 void setMemory(GPUglobalref() uint32_t* m) { mErrors = m; }
38 void clear();
39 bool printErrors(bool silent = false, uint64_t mask = 0);
40#ifndef GPUCA_GPUCODE
41 static const std::unordered_map<uint32_t, const char*>& getErrorNames();
42#endif
43 uint32_t getNErrors() const;
44 const uint32_t* getErrorPtr() const;
46
47 private:
48 GPUglobalref() uint32_t* mErrors;
49};
50
51} // namespace o2::gpu
52
53#endif
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
const uint32_t * getErrorPtr() const
Definition GPUErrors.cxx:96
void setMemory(GPUglobalref() uint32_t *m)
Definition GPUErrors.h:37
GPUd() void raiseError(uint32_t code
static uint32_t getMaxErrors()
uint32_t uint32_t uint32_t param3
Definition GPUErrors.h:35
static const std::unordered_map< uint32_t, const char * > & getErrorNames()
Definition GPUErrors.cxx:51
uint32_t uint32_t param2
Definition GPUErrors.h:35
bool printErrors(bool silent=false, uint64_t mask=0)
Definition GPUErrors.cxx:61
uint32_t getNErrors() const
Definition GPUErrors.cxx:91
const GLfloat * m
Definition glcorearb.h:4066
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLint GLuint mask
Definition glcorearb.h:291