From 2975768e1e0344011b9048ebcc3040d84b748547 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Mon, 26 Jan 2026 14:42:27 -0800 Subject: [PATCH] remove trailing whitespace --- layers/00_example/main.cpp | 2 +- layers/10_cmdbufemu/emulate.cpp | 4 ++-- layers/10_cmdbufemu/main.cpp | 2 +- layers/11_semaemu/main.cpp | 2 +- layers/12_spirvqueriesemu/main.cpp | 2 +- samples/python/03_mandelbrot/mandelbrot.py | 6 +++--- samples/python/04_julia/julia.py | 4 ++-- tutorials/interceptlayer/part0.md | 4 ++-- tutorials/interceptlayer/part1.md | 2 +- tutorials/interceptlayer/part2.md | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/layers/00_example/main.cpp b/layers/00_example/main.cpp index 65aae47..a5d73d9 100644 --- a/layers/00_example/main.cpp +++ b/layers/00_example/main.cpp @@ -106,7 +106,7 @@ CL_API_ENTRY cl_int CL_API_CALL clInitLayer( const size_t dispatchTableSize = sizeof(dispatch) / sizeof(dispatch.clGetPlatformIDs); - if (target_dispatch == nullptr || + if (target_dispatch == nullptr || num_entries_out == nullptr || layer_dispatch_ret == nullptr) { return CL_INVALID_VALUE; diff --git a/layers/10_cmdbufemu/emulate.cpp b/layers/10_cmdbufemu/emulate.cpp index 79be9c7..4929fdb 100644 --- a/layers/10_cmdbufemu/emulate.cpp +++ b/layers/10_cmdbufemu/emulate.cpp @@ -1120,7 +1120,7 @@ struct NDRangeKernel : Command const size_t* global_work_size, const size_t* local_work_size ) { - if( work_dim == 0 || + if( work_dim == 0 || global_work_size == nullptr || local_work_size == nullptr ) { @@ -1604,7 +1604,7 @@ typedef struct _cl_command_buffer_khr for( const auto& command : Commands ) { errorCode = command->playback(queue, deps); - if( (errorCode == CL_SUCCESS) && + if( (errorCode == CL_SUCCESS) && isRecordQueueInOrder && !isReplayQueueInOrder ) { errorCode = g_pNextDispatch->clEnqueueBarrierWithWaitList( diff --git a/layers/10_cmdbufemu/main.cpp b/layers/10_cmdbufemu/main.cpp index bae1af2..41e5e3e 100644 --- a/layers/10_cmdbufemu/main.cpp +++ b/layers/10_cmdbufemu/main.cpp @@ -275,7 +275,7 @@ CL_API_ENTRY cl_int CL_API_CALL clInitLayer( const size_t dispatchTableSize = sizeof(dispatch) / sizeof(dispatch.clGetPlatformIDs); - if (target_dispatch == nullptr || + if (target_dispatch == nullptr || num_entries_out == nullptr || layer_dispatch_ret == nullptr) { return CL_INVALID_VALUE; diff --git a/layers/11_semaemu/main.cpp b/layers/11_semaemu/main.cpp index 45f595d..d6eb3f0 100644 --- a/layers/11_semaemu/main.cpp +++ b/layers/11_semaemu/main.cpp @@ -234,7 +234,7 @@ CL_API_ENTRY cl_int CL_API_CALL clInitLayer( const size_t dispatchTableSize = sizeof(dispatch) / sizeof(dispatch.clGetPlatformIDs); - if (target_dispatch == nullptr || + if (target_dispatch == nullptr || num_entries_out == nullptr || layer_dispatch_ret == nullptr) { return CL_INVALID_VALUE; diff --git a/layers/12_spirvqueriesemu/main.cpp b/layers/12_spirvqueriesemu/main.cpp index db3c8dd..8bc72c1 100644 --- a/layers/12_spirvqueriesemu/main.cpp +++ b/layers/12_spirvqueriesemu/main.cpp @@ -137,7 +137,7 @@ CL_API_ENTRY cl_int CL_API_CALL clInitLayer( const size_t dispatchTableSize = sizeof(dispatch) / sizeof(dispatch.clGetPlatformIDs); - if (target_dispatch == nullptr || + if (target_dispatch == nullptr || num_entries_out == nullptr || layer_dispatch_ret == nullptr) { return CL_INVALID_VALUE; diff --git a/samples/python/03_mandelbrot/mandelbrot.py b/samples/python/03_mandelbrot/mandelbrot.py index 3c9cf43..a758708 100644 --- a/samples/python/03_mandelbrot/mandelbrot.py +++ b/samples/python/03_mandelbrot/mandelbrot.py @@ -78,17 +78,17 @@ program.build() kernel = program.Mandelbrot - deviceMemDst = cl.Buffer(context, cl.mem_flags.ALLOC_HOST_PTR, + deviceMemDst = cl.Buffer(context, cl.mem_flags.ALLOC_HOST_PTR, width * height * np.uint32().itemsize) # execution - kernel(commandQueue, [width, height], None, + kernel(commandQueue, [width, height], None, np.float32(-2.0), np.float32(-1.0), np.float32(1.0), np.float32(1.0), np.int32(width), np.int32(height), np.int32(maxIterations), deviceMemDst) # save bitmap mapped_dst, event = cl.enqueue_map_buffer(commandQueue, deviceMemDst, - cl.map_flags.READ, + cl.map_flags.READ, 0, width * height, np.uint32) with mapped_dst.base: colors = np.fromiter((240 if x & 1 else 20 for x in mapped_dst), np.uint8) diff --git a/samples/python/04_julia/julia.py b/samples/python/04_julia/julia.py index 494dec5..8fa0321 100644 --- a/samples/python/04_julia/julia.py +++ b/samples/python/04_julia/julia.py @@ -102,7 +102,7 @@ program.build() kernel = program.Julia - deviceMemDst = cl.Buffer(context, cl.mem_flags.ALLOC_HOST_PTR, + deviceMemDst = cl.Buffer(context, cl.mem_flags.ALLOC_HOST_PTR, gwx * gwy * 4 * np.uint8().itemsize) lws = None @@ -131,7 +131,7 @@ print('Finished in {} seconds'.format(end - start)) mapped_dst, event = cl.enqueue_map_buffer(commandQueue, deviceMemDst, - cl.map_flags.READ, + cl.map_flags.READ, 0, gwx * gwy, np.uint32) with mapped_dst.base: # note: this generates a 24-bit .bmp file instead of a 32-bit .bmp file! diff --git a/tutorials/interceptlayer/part0.md b/tutorials/interceptlayer/part0.md index 2a2f720..106ed75 100644 --- a/tutorials/interceptlayer/part0.md +++ b/tutorials/interceptlayer/part0.md @@ -12,7 +12,7 @@ It will crash initially - that's fine! As part of the tutorial we will fix bugs that are preventing the tutorial application from running and running well. ``` -$ ./sinjulia +$ ./sinjulia *** Important Note! *** This is the Intercept Layer Tutorial application. It will crash initially! Please see the tutorial README for details. @@ -31,7 +31,7 @@ This tutorial is written to use the [cliloader](https://github.com/intel/opencl- After building and installing the Intercept Layer and `cliloader`, you should be able to use it to execute the tutorial application. ``` -$ cliloader ./sinjulia +$ cliloader ./sinjulia -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= CLIntercept (64-bit) is loading... CLIntercept file location: /home/bashbaug/bin/../lib/libOpenCL.so diff --git a/tutorials/interceptlayer/part1.md b/tutorials/interceptlayer/part1.md index 7f54522..a04b985 100644 --- a/tutorials/interceptlayer/part1.md +++ b/tutorials/interceptlayer/part1.md @@ -12,7 +12,7 @@ Note that `CallLogging` can be enabled by passing the `-c` option to `cliloader` After enabling these controls, re-run the tutorial application. ``` -$ cliloader ./sinjulia +$ cliloader ./sinjulia -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= CLIntercept (64-bit) is loading... CLIntercept file location: /home/bashbaug/bin/../lib/libOpenCL.so diff --git a/tutorials/interceptlayer/part2.md b/tutorials/interceptlayer/part2.md index 56eb0ac..882691d 100644 --- a/tutorials/interceptlayer/part2.md +++ b/tutorials/interceptlayer/part2.md @@ -9,7 +9,7 @@ The Intercept Layer for OpenCL Applications can pinpoint errors in OpenCL kernel After fixing the bug in part 1, and with `ErrorLogging` and `CallLogging` still set, the next OpenCL error is this one: ``` -$ cliloader ./sinjulia +$ cliloader ./sinjulia -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= CLIntercept (64-bit) is loading...