From 0a0c31cc813b0ae30ccaabc82c9c9820a99b9159 Mon Sep 17 00:00:00 2001 From: Anzhe Xue Date: Wed, 17 Dec 2025 10:09:14 +0000 Subject: [PATCH 1/2] Added DequeueWithToken Instrumentation --- omnilink/concurrentqueue/workload/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/omnilink/concurrentqueue/workload/main.cpp b/omnilink/concurrentqueue/workload/main.cpp index 1a38f9fc..d9c696e4 100644 --- a/omnilink/concurrentqueue/workload/main.cpp +++ b/omnilink/concurrentqueue/workload/main.cpp @@ -80,8 +80,16 @@ struct QueueWorkloadContext } } - void perform_operation(Ctx &ctx) { - ctx.unsupported(); + void perform_operation(Ctx& ctx) { + // ctx.unsupported(); + for (int32_t& elem : elems) { + elem = -1; + } + size_t size = rand_bulk_size(); + size_t actual_size = workload_context.queue.try_dequeue_bulk_from_producer(producer_token, elems, size); + ctx.op.producer = thread_idx; + ctx.op.elements = std::span(elems).subspan(0, actual_size); + workload_context.total_elems -= actual_size; } void perform_operation(Ctx &ctx) { From fb62d61c3d89b7cd8d09b23ab4a2f4e329d1a58a Mon Sep 17 00:00:00 2001 From: Anzhe Xue Date: Wed, 17 Dec 2025 22:28:00 +0000 Subject: [PATCH 2/2] format revised --- omnilink/concurrentqueue/workload/main.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/omnilink/concurrentqueue/workload/main.cpp b/omnilink/concurrentqueue/workload/main.cpp index d9c696e4..650a65cd 100644 --- a/omnilink/concurrentqueue/workload/main.cpp +++ b/omnilink/concurrentqueue/workload/main.cpp @@ -80,16 +80,18 @@ struct QueueWorkloadContext } } - void perform_operation(Ctx& ctx) { - // ctx.unsupported(); - for (int32_t& elem : elems) { - elem = -1; - } - size_t size = rand_bulk_size(); - size_t actual_size = workload_context.queue.try_dequeue_bulk_from_producer(producer_token, elems, size); - ctx.op.producer = thread_idx; - ctx.op.elements = std::span(elems).subspan(0, actual_size); - workload_context.total_elems -= actual_size; + void perform_operation(Ctx &ctx) { + // ctx.unsupported(); + for (int32_t &elem : elems) { + elem = -1; + } + size_t size = rand_bulk_size(); + size_t actual_size = + workload_context.queue.try_dequeue_bulk_from_producer(producer_token, + elems, size); + ctx.op.producer = thread_idx; + ctx.op.elements = std::span(elems).subspan(0, actual_size); + workload_context.total_elems -= actual_size; } void perform_operation(Ctx &ctx) {