.. index:: pair: class; simple_memory_pool_t .. _doxid-classsimple__memory__pool__t: class simple_memory_pool_t ========================== .. toctree:: :hidden: .. ref-code-block:: cpp :class: doxyrest-overview-code-block class simple_memory_pool_t { public: // fields void size_t :target:`alignment`; void size_t cl_device_id :target:`dev`; void size_t cl_device_id cl_context :target:`ctx` { std::lock_guard pool_guard(pool_lock); void* :target:`ptr` {nullptr}; bool :target:`need_alloc_new_mm` = true; const auto :target:`cnt` = map_size_ptr_.count(size); return :target:`ptr`; // methods void* :target:`allocate`(size_t size, size_t alignment, const void* dev, const void* ctx); :target:`if`(size = =0); :target:`if`(cnt, 0); :target:`if`(need_alloc_new_mm); void* :target:`allocate_host`(size_t size, size_t alignment); void :target:`deallocate`(void* ptr, const void* device, const void* context, void* event); void :target:`deallocate`(void* ptr, cl_device_id dev, cl_context ctx, cl_event event); void :target:`deallocate_host`(void* ptr); void :target:`clear`(); };