28 #ifndef SPLA_CL_COUNTER_HPP
29 #define SPLA_CL_COUNTER_HPP
46 uint get(cl::CommandQueue& queue, cl::Event* event =
nullptr);
47 void set(cl::CommandQueue& queue,
uint value, cl::Event* event =
nullptr);
63 uint get(cl::CommandQueue& queue, cl::Event* event =
nullptr);
64 void set(cl::CommandQueue& queue,
uint value, cl::Event* event =
nullptr);
68 std::shared_ptr<CLCounter> m_counter;
79 std::shared_ptr<CLCounter>
allocate();
80 void release(std::shared_ptr<CLCounter> counter);
83 std::vector<std::shared_ptr<CLCounter>> m_counters;
Global pool with pre-allocated counters.
Definition: cl_counter.hpp:75
CLCounterPool(uint pre_allocate=16)
Definition: cl_counter.cpp:63
void release(std::shared_ptr< CLCounter > counter)
Definition: cl_counter.cpp:77
std::shared_ptr< CLCounter > allocate()
Definition: cl_counter.cpp:68
Definition: cl_counter.hpp:58
uint get(cl::CommandQueue &queue, cl::Event *event=nullptr)
Definition: cl_counter.cpp:53
~CLCounterWrapper()
Definition: cl_counter.cpp:50
CLCounterWrapper()
Definition: cl_counter.cpp:47
cl::Buffer & buffer()
Definition: cl_counter.cpp:59
void set(cl::CommandQueue &queue, uint value, cl::Event *event=nullptr)
Definition: cl_counter.cpp:56
Unsigned integer reusable counter for operations.
Definition: cl_counter.hpp:42
cl::Buffer & buffer()
Definition: cl_counter.cpp:43
uint get(cl::CommandQueue &queue, cl::Event *event=nullptr)
Definition: cl_counter.cpp:35
CLCounter(uint init=0)
Definition: cl_counter.cpp:32
void set(cl::CommandQueue &queue, uint value, cl::Event *event=nullptr)
Definition: cl_counter.cpp:40
std::uint32_t uint
Library index and size type.
Definition: config.hpp:56
Definition: algorithm.hpp:37