From 6fc4a7e21b30b2042ea911571059751cd4d9e8bc Mon Sep 17 00:00:00 2001 From: aharon-abramson Date: Tue, 8 Oct 2024 10:21:52 +0300 Subject: [PATCH] Some events are not released in test_mem_host_flags n test_mem_host_flags some events are not released. In fact, they are not used, so they can be removed altogether. --- .../mem_host_flags/checker_mem_host_no_access.hpp | 15 ++++++--------- .../mem_host_flags/checker_mem_host_read_only.hpp | 6 +++--- .../checker_mem_host_write_only.hpp | 6 +++--- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp b/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp index eb3341a8fa..b5f9acc310 100644 --- a/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp +++ b/test_conformance/mem_host_flags/checker_mem_host_no_access.hpp @@ -81,10 +81,9 @@ cl_int cBuffer_check_mem_host_no_access::Setup_Test_Environment() template cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer() { - cl_event event; cl_int err = clEnqueueReadBuffer( this->m_queue, this->m_buffer, this->m_blocking, 0, - this->get_block_size_bytes(), this->host_m_1.pData, 0, NULL, &event); + this->get_block_size_bytes(), this->host_m_1.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -102,7 +101,7 @@ cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer() err = clEnqueueWriteBuffer(this->m_queue, this->m_buffer, this->m_blocking, 0, this->get_block_size_bytes(), - this->host_m_1.pData, 0, NULL, &event); + this->host_m_1.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -125,14 +124,13 @@ template cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_rect() { this->Init_rect(); - cl_event event; cl_int err = CL_SUCCESS; err = clEnqueueReadBufferRect( this->m_queue, this->m_buffer, this->m_blocking, this->buffer_origin_bytes, this->host_origin_bytes, this->region_bytes, this->buffer_row_pitch_bytes, this->buffer_slice_pitch_bytes, this->host_row_pitch_bytes, this->host_slice_pitch_bytes, - this->host_m_2.pData, 0, NULL, &event); + this->host_m_2.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -153,7 +151,7 @@ cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_rect() this->buffer_origin_bytes, this->host_origin_bytes, this->region_bytes, this->buffer_row_pitch_bytes, this->buffer_slice_pitch_bytes, this->host_row_pitch_bytes, this->host_slice_pitch_bytes, - this->host_m_2.pData, 0, NULL, &event); + this->host_m_2.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -175,13 +173,12 @@ cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_rect() template cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_mapping() { - cl_event event; cl_int err; void *dataPtr; dataPtr = clEnqueueMapBuffer( this->m_queue, this->m_buffer, this->m_blocking, CL_MAP_READ, 0, - this->get_block_size_bytes(), 0, NULL, &event, &err); + this->get_block_size_bytes(), 0, NULL, NULL, &err); if (err == CL_SUCCESS) { log_error("Calling clEnqueueMapBuffer (CL_MAP_READ) on a memory object " @@ -206,7 +203,7 @@ cl_int cBuffer_check_mem_host_no_access::verify_RW_Buffer_mapping() dataPtr = clEnqueueMapBuffer( this->m_queue, this->m_buffer, this->m_blocking, CL_MAP_WRITE, 0, - this->get_block_size_bytes(), 0, NULL, &event, &err); + this->get_block_size_bytes(), 0, NULL, NULL, &err); if (err == CL_SUCCESS) { log_error("Calling clEnqueueMapBuffer (CL_MAP_WRITE) on a memory " diff --git a/test_conformance/mem_host_flags/checker_mem_host_read_only.hpp b/test_conformance/mem_host_flags/checker_mem_host_read_only.hpp index ea23ae5ae6..f14f86cfbb 100644 --- a/test_conformance/mem_host_flags/checker_mem_host_read_only.hpp +++ b/test_conformance/mem_host_flags/checker_mem_host_read_only.hpp @@ -152,7 +152,7 @@ cl_int cBuffer_check_mem_host_read_only::verify_RW_Buffer() // test write err = clEnqueueWriteBuffer(this->m_queue, this->m_buffer, this->m_blocking, 0, this->get_block_size_bytes(), - this->host_m_2.pData, 0, NULL, &event); + this->host_m_2.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -211,7 +211,7 @@ cl_int cBuffer_check_mem_host_read_only::verify_RW_Buffer_rect() this->buffer_origin_bytes, this->host_origin_bytes, this->region_bytes, this->buffer_row_pitch_bytes, this->buffer_slice_pitch_bytes, this->host_row_pitch_bytes, this->host_slice_pitch_bytes, - this->host_m_2.pData, 0, NULL, &event); + this->host_m_2.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -270,7 +270,7 @@ cl_int cBuffer_check_mem_host_read_only::verify_RW_Buffer_mapping() // test blocking map read clEnqueueMapBuffer(this->m_queue, this->m_buffer, this->m_blocking, CL_MAP_WRITE, 0, this->get_block_size_bytes(), 0, NULL, - &event, &err); + NULL, &err); if (err == CL_SUCCESS) { diff --git a/test_conformance/mem_host_flags/checker_mem_host_write_only.hpp b/test_conformance/mem_host_flags/checker_mem_host_write_only.hpp index 6c7b12da54..c9e4dcbe61 100644 --- a/test_conformance/mem_host_flags/checker_mem_host_write_only.hpp +++ b/test_conformance/mem_host_flags/checker_mem_host_write_only.hpp @@ -167,7 +167,7 @@ cl_int cBuffer_check_mem_host_write_only::verify_RW_Buffer() err = clEnqueueReadBuffer(this->m_queue, this->m_buffer, CL_TRUE, 0, this->get_block_size_bytes(), - this->host_m_2.pData, 0, NULL, &event); + this->host_m_2.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -257,7 +257,7 @@ cl_int cBuffer_check_mem_host_write_only::verify_RW_Buffer_rect() this->buffer_origin_bytes, this->host_origin_bytes, this->region_bytes, this->buffer_row_pitch_bytes, this->buffer_slice_pitch_bytes, this->host_row_pitch_bytes, this->host_slice_pitch_bytes, - this->host_m_2.pData, 0, NULL, &event); + this->host_m_2.pData, 0, NULL, NULL); if (err == CL_SUCCESS) { @@ -349,7 +349,7 @@ cl_int cBuffer_check_mem_host_write_only::verify_RW_Buffer_mapping() // test map read clEnqueueMapBuffer(this->m_queue, this->m_buffer, this->m_blocking, CL_MAP_READ, 0, this->get_block_size_bytes(), 0, NULL, - &event, &err); + NULL, &err); if (err == CL_SUCCESS) {