NVIDIA / NVIDIA/cccl

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

Open
#2,129 0 comments 0 reactions 1 assignee Claimed by @miscco View on GitHub
cudax
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.