From 00cea265f341a9f62f7183dc3d45dadfac1bcd97 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 8 Mar 2026 10:51:08 +0100 Subject: [CHORE] Update example for allocator_op. Signed-off-by: Amlal El Mahrouss --- include/ocl/allocator_op.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ocl/allocator_op.hpp b/include/ocl/allocator_op.hpp index 43bc80b..84a949a 100644 --- a/include/ocl/allocator_op.hpp +++ b/include/ocl/allocator_op.hpp @@ -75,7 +75,7 @@ namespace ocl template auto construct_var(var_type&&... args) { - allocator_new alloc; + static allocator_new alloc; typename allocator_new::lock_type lt{alloc.m_}; return std::shared_ptr(alloc.template var_alloc(std::forward(args)...), allocator_delete{}); } @@ -83,7 +83,7 @@ namespace ocl template auto construct_array() { - allocator_new alloc; + static allocator_new alloc; typename allocator_new::lock_type lt{alloc.m_}; return std::shared_ptr(alloc.template array_alloc(), allocator_delete{}); } -- cgit v1.2.3