Skip to content

Commit fdd1500

Browse files
author
Diptorup Deb
committed
Move the declaration of drt_debug_print into a header.
- Fixes build error after the nrt_dbg_print was renamed to drt_debug_print.
1 parent 8e4f5b8 commit fdd1500

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

numba_dpex/core/runtime/_dbg_printer.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@
2626
X; \
2727
}
2828
#endif
29+
30+
/*
31+
* Debugging printf function used internally
32+
*/
33+
static inline void drt_debug_print(const char *fmt, ...)
34+
{
35+
va_list args;
36+
37+
va_start(args, fmt);
38+
vfprintf(stderr, fmt, args);
39+
va_end(args);
40+
}

numba_dpex/core/runtime/_dpexrt_python.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@ static int DPEXRT_sycl_queue_from_python(PyObject *obj,
6262
queuestruct_t *queue_struct);
6363
static PyObject *DPEXRT_sycl_queue_to_python(queuestruct_t *queuestruct);
6464

65-
/*
66-
* Debugging printf function used internally
67-
*/
68-
void drt_debug_print(const char *fmt, ...)
69-
{
70-
va_list args;
71-
72-
va_start(args, fmt);
73-
vfprintf(stderr, fmt, args);
74-
va_end(args);
75-
}
76-
7765
/** An NRT_external_malloc_func implementation using DPCTLmalloc_device.
7866
*
7967
*/

numba_dpex/core/runtime/_nrt_helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ typedef intptr_t atomic_size_t;
2020
#include <stdatomic.h>
2121
#endif
2222

23+
#include "_dbg_printer.h"
24+
2325
/*
2426
* Global resources.
2527
*/

numba_dpex/core/runtime/_nrt_python_helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include "_nrt_python_helper.h"
11+
#include "_dbg_printer.h"
1112

1213
static PyBufferProcs MemInfo_bufferProcs = {MemInfo_getbuffer, NULL};
1314

0 commit comments

Comments
 (0)