From e328ad3276699ebd53df49376d2ed5a59406cb82 Mon Sep 17 00:00:00 2001
From: JordanHanotiaux <103147288+JordanHanotiaux@users.noreply.github.com>
Date: Mon, 19 May 2025 11:06:10 +0200
Subject: [PATCH] Update main.cpp

---
 main.cpp | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/main.cpp b/main.cpp
index a36d5e6..1cdd7d8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -106,13 +106,9 @@ int main(int argc, char** argv) {
     std::cout << "Using Device: " << device.getInfo<CL_DEVICE_NAME>() << std::endl;
 
     cl::Context context(device);
-    cl_int err;
-    cl_command_queue cq = clCreateCommandQueue(context(), device(), CL_QUEUE_PROFILING_ENABLE, &err);
-    if (err != CL_SUCCESS) {
-        std::cerr << "Failed to create command queue: " << err << std::endl;
-        exit(1);
-    }
-    cl::CommandQueue queue(cq, true);
+    cl::CommandQueue queue(context, device, CL_QUEUE_PROFILING_ENABLE); // Keep profiling enabled
+
+    std::vector<cl::Device> devices_to_init = {device};
 
 
     std::vector<cl::Device> devices_to_init = {device};
-- 
GitLab