cuda::experimental::stf::block_allocator

Defined in include/cuda/experimental/__stf/allocators/block_allocator.cuh

template<typename T>
class block_allocator : public cuda::experimental::stf::block_allocator_untyped

Handle to an allocator that is attached to a context.

When a block_allocator is constructed, it is attached to the context passed as the first argument. The allocator will be detached when the context is finalized (ie. deinit will be called).

Public Functions

template<typename ctx_t, typename ...Args>
inline block_allocator(ctx_t &ctx, Args... args)
inline block_allocator(::std::shared_ptr<block_allocator_interface> ptr)
inline void *allocate(backend_ctx_untyped &bctx, const data_place &memory_node, ::std::ptrdiff_t &s, event_list &prereqs)
inline void deallocate(backend_ctx_untyped &bctx, const data_place &memory_node, event_list &prereqs, void *ptr, size_t sz)
inline event_list deinit(backend_ctx_untyped &bctx)
inline ::std::string to_string() const
inline explicit operator bool() const