Skip to content

Commit c5d541d

Browse files
fix: initialize pointers to events
Signed-off-by: Szymon Morek <[email protected]>
1 parent ac42206 commit c5d541d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opencl/source/command_queue/command_queue_staging.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cl_int CommandQueue::enqueueStagingBufferMemcpy(cl_bool blockingCopy, void *dstP
2525
CsrSelectionArgs csrSelectionArgs{CL_COMMAND_SVM_MEMCPY, &size};
2626
csrSelectionArgs.direction = TransferDirection::hostToLocal;
2727
auto csr = &selectCsrForBuiltinOperation(csrSelectionArgs);
28-
cl_event profilingEvent;
28+
cl_event profilingEvent = nullptr;
2929

3030
bool isSingleTransfer = false;
3131
ChunkCopyFunction chunkCopy = [&](void *chunkSrc, void *chunkDst, size_t chunkSize) -> int32_t {
@@ -46,7 +46,7 @@ cl_int CommandQueue::enqueueStagingWriteImage(Image *dstImage, cl_bool blockingC
4646
size_t inputRowPitch, size_t inputSlicePitch, const void *ptr, cl_event *event) {
4747
CsrSelectionArgs csrSelectionArgs{CL_COMMAND_WRITE_IMAGE, nullptr, dstImage, this->getDevice().getRootDeviceIndex(), globalRegion, nullptr, globalOrigin};
4848
auto &csr = selectCsrForBuiltinOperation(csrSelectionArgs);
49-
cl_event profilingEvent;
49+
cl_event profilingEvent = nullptr;
5050

5151
bool isSingleTransfer = false;
5252
ChunkTransferImageFunc chunkWrite = [&](void *stagingBuffer, const size_t *origin, const size_t *region) -> int32_t {
@@ -69,7 +69,7 @@ cl_int CommandQueue::enqueueStagingReadImage(Image *srcImage, cl_bool blockingCo
6969
size_t inputRowPitch, size_t inputSlicePitch, const void *ptr, cl_event *event) {
7070
CsrSelectionArgs csrSelectionArgs{CL_COMMAND_READ_IMAGE, srcImage, nullptr, this->getDevice().getRootDeviceIndex(), globalRegion, nullptr, globalOrigin};
7171
auto &csr = selectCsrForBuiltinOperation(csrSelectionArgs);
72-
cl_event profilingEvent;
72+
cl_event profilingEvent = nullptr;
7373

7474
bool isSingleTransfer = false;
7575
ChunkTransferImageFunc chunkRead = [&](void *stagingBuffer, const size_t *origin, const size_t *region) -> int32_t {

0 commit comments

Comments
 (0)