cccl icon indicating copy to clipboard operation
cccl copied to clipboard

[FEA]: Synchronous data structures that use a cuda::mr::resource to allocate their memory

Open miscco opened this issue 1 year ago • 0 comments

We need to implement higher level data structures that take a cuda::mr::resource_ref as an type erased way of allocating memory.

The goal is that the user is not required to manually handle allocations at all.

A first type will be a basic wrapper around an allocation that allocated in the constructor and deallocates in the destructor similar to std::unique_ptr. An important distinction is that we do not want to initialize memory there because we want to avoid forcing a kernel launch. This will require the user to handle uninitialized memory with all the dangers that involves.

A second type will be a full fledged container cuda::vector that comes with all the bells and whistles a user might expect. We will use std::inplace_vector as a template for its API but also provide a way of avoiding the initialization cost

### Initially we will focus on two  types:
- [ ] https://github.com/NVIDIA/cccl/issues/1768
- [ ] https://github.com/NVIDIA/cccl/issues/2057

miscco avatar Jul 31 '24 08:07 miscco