ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
logging.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s)
12#include "detray/utils/logging_streams.hpp"
13
14// Define the detray logging macros
15#ifndef __DETRAY_LOGGING__
16#define __DETRAY_LOGGING__
17#endif
18
19// HOST
20#define DETRAY_FATAL_HOST(x) DETRAY_FATAL_STREAM("DETRAY", x)
21#define DETRAY_ERROR_HOST(x) DETRAY_ERROR_STREAM("DETRAY", x)
22#define DETRAY_WARN_HOST(x) DETRAY_WARN_STREAM("DETRAY", x)
23#define DETRAY_INFO_HOST(x) DETRAY_INFO_STREAM("DETRAY", x)
24#define DETRAY_VERBOSE_HOST(x) DETRAY_VERBOSE_STREAM("DETRAY", x)
25#define DETRAY_DEBUG_HOST(x) DETRAY_DEBUG_STREAM("DETRAY", x)
26
27// HOST-DEVICE
28#define DETRAY_FATAL_HOST_DEVICE(x, ...) \
29 DETRAY_FATAL_PRINTF("DETRAY", x, __VA_ARGS__)
30#define DETRAY_ERROR_HOST_DEVICE(x, ...) \
31 DETRAY_ERROR_PRINTF("DETRAY", x, __VA_ARGS__)
32#define DETRAY_WARN_HOST_DEVICE(x, ...) \
33 DETRAY_WARN_PRINTF("DETRAY", x, __VA_ARGS__)
34#define DETRAY_INFO_HOST_DEVICE(x, ...) \
35 DETRAY_INFO_PRINTF("DETRAY", x, __VA_ARGS__)
36#define DETRAY_VERBOSE_HOST_DEVICE(x, ...) \
37 DETRAY_VERBOSE_PRINTF("DETRAY", x, __VA_ARGS__)
38#define DETRAY_DEBUG_HOST_DEVICE(x, ...) \
39 DETRAY_DEBUG_PRINTF("DETRAY", x, __VA_ARGS__)
40
41// DEVICE
42#ifdef __DEVICE_LOGGING__
43
44#define DETRAY_FATAL_DEVICE(x, ...) \
45 DETRAY_FATAL_PRINTF("DETRAY", x, __VA_ARGS__)
46#define DETRAY_ERROR_DEVICE(x, ...) \
47 DETRAY_ERROR_PRINTF("DETRAY", x, __VA_ARGS__)
48#define DETRAY_WARN_DEVICE(x, ...) DETRAY_WARN_PRINTF("DETRAY", x, __VA_ARGS__)
49#define DETRAY_INFO_DEVICE(x, ...) DETRAY_INFO_PRINTF("DETRAY", x, __VA_ARGS__)
50#define DETRAY_VERBOSE_DEVICE(x, ...) \
51 DETRAY_VERBOSE_PRINTF("DETRAY", x, __VA_ARGS__)
52#define DETRAY_DEBUG_DEVICE(x, ...) \
53 DETRAY_DEBUG_PRINTF("DETRAY", x, __VA_ARGS__)
54
55#else
56
57#define DETRAY_FATAL_DEVICE(x, ...)
58#define DETRAY_ERROR_DEVICE(x, ...)
59#define DETRAY_WARN_DEVICE(x, ...)
60#define DETRAY_INFO_DEVICE(x, ...)
61#define DETRAY_VERBOSE_DEVICE(x, ...)
62#define DETRAY_DEBUG_DEVICE(x, ...)
63
64#endif