15#ifndef O2_GPU_KERNELDEBUGOUTPUT_H
16#define O2_GPU_KERNELDEBUGOUTPUT_H
20#ifdef GPUCA_KERNEL_DEBUGGER_OUTPUT
25class GPUKernelDebugOutput :
public GPUProcessor
29 void InitializeProcessor();
30 void RegisterMemoryAllocation();
31 void SetMaxData(
const GPUTrackingInOutPointers& io);
33 void* SetPointersMemory(
void* mem);
37 printf(
"------ Kernel Debug Output\n");
38 for (int32_t
i = 0;
i < 100 * 1024;
i++) {
39 int32_t*
pos = mDebugOutMemory +
i * 1024;
42 printf(
"Thread %d: ",
i);
43 for (int32_t
j = 0;
j <
count;
j++) {
44 printf(
"%d, ",
pos[
j]);
49 printf(
"------ End of Kernel Debug Output\n");
54 return mDebugOutMemory;
56 GPUdi() static
size_t memorySize() {
return 100 * 1024 * 1024; }
60 printf(
"Filling debug: id %d, val %d, current count %d\n",
id,
val, *(mDebugOutMemory +
id * 1024));
61 if (
id > 100 * 1024) {
64 int32_t*
pos = mDebugOutMemory +
id * 1024;
73 mutable int32_t* mDebugOutMemory;
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)