NVIDIA / NVIDIA/cccl

[FEA]: Investigate supporting allocators within libcu++

Open
#180 0 comments 0 reactions 1 assignee Claimed by @miscco View on GitHub
libcu++
Dominant language
C++
Stars
2.5k
Forks
487
Avg merge
2d 7h
Merged PRs (30d)
296

Description

### Is this a duplicate?

- [X] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Area

libcu++

### Is your feature request related to a problem? Please describe.

Allocators are a foundational building block for many features of the STL.

Besides that, memory allocation is a constant thorn when working with CUDA C++.

We should implement allocator support within libcu++ and provide extensions, so that users can utilize e.g. stream based allocations and access to the different memory categories that are supported on device

### Describe the solution you'd like

We first need to modularize our exception handling code so that we can at least include the relevant headers when compiling for device.

We then need to adopt `allocator_traits` and `allocator` to be usable on device. This should be feasible because for the default case we can fall back to host side `operator new`

This depends on #179

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

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.