NVIDIA / NVIDIA/cccl

`cudax::*_memory_resource` should be an object not a type

Open
#4,095 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

`cudax::*_memory_resource` should be a `constexpr`/`constinst` global object, not a type. I want to write `foo(cudax::device_memory_resource)` not `foo(cudax::device_memory_resource{})`. This is the common case, so we should optimize for it; if you need flags, you use the type name (which could be `cudax::*_memory_resource_type`, `cudax::*_memory_resource_t`, or something like that).

In Thrust, I believe we made these objects not types.

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.