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
20namespace o2::gpu
21{
22
24{
25 public:
27#define GPUCA_ERROR_CODE(num, name, ...) name = num,
28#include "GPUErrorCodes.h"
29#undef GPUCA_ERROR_CODE
30 };
31
32 GPUd() void raiseError(uint32_t code, uint32_t param1 = 0, uint32_t param2 = 0, uint32_t param3 = 0) const;
33 GPUd() bool hasError() { return *mErrors > 0; }
34 void setMemory(GPUglobalref() uint32_t* m) { mErrors = m; }
35 void clear();
36 void printErrors(bool silent = false);
37 uint32_t getNErrors() const;
38 const uint32_t* getErrorPtr() const;
39 static uint32_t getMaxErrors();
40
41 private:
42 GPUglobalref() uint32_t* mErrors;
43};
44
45} // namespace o2::gpu
46
47#endif
const uint32_t * getErrorPtr() const
Definition GPUErrors.cxx:85
void setMemory(GPUglobalref() uint32_t *m)
Definition GPUErrors.h:34
GPUd() void raiseError(uint32_t code
static uint32_t getMaxErrors()
uint32_t uint32_t uint32_t param3
Definition GPUErrors.h:32
uint32_t uint32_t param2
Definition GPUErrors.h:32
void printErrors(bool silent=false)
Definition GPUErrors.cxx:57
uint32_t getNErrors() const
Definition GPUErrors.cxx:80
const GLfloat * m
Definition glcorearb.h:4066
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)