[ENHANCEMENT]: Add option to separate container initialization from memory allocation
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まずコンテナのコンストラクタと clear() の実装を見つけ、次に insert()、find()、size()、ref() などのアクセス経路をたどります。遅延初期化をどのように表現すべきか、またどのアクセサがそれを発生させる必要があるかを判断します。割り当てと初期化を分離でき、すべての初回使用で初期化済みのコンテナを安全に参照できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Our current process involves memory allocation for a container within its constructor and instant initialization through the clear() function. This sequence happens immediately and is also enclosed within the constructor.
However, there are instances where it's beneficial to postpone the initialization step to a more appropriate time in the program flow.
Describe the solution you'd like
To facilitate this, we must implement a strategy allowing deferred initialization while ensuring the container is fully initialized before its first use. This is vital for maintaining data integrity and avoiding runtime errors.
One potential strategy could be an initialize-on-first-touch approach: Any function call that could potentially access the container's memory (like insert(), find(), size(), ref(), etc.) would first check a boolean member indicating whether the container has been initialized or not.
If the container is not yet initialized (i.e., the boolean is false), the clear() function would be invoked to initialize the container, thus ensuring it's ready for use.
Describe alternatives you've considered
No response
Additional context
No response
- 主要言語
- Cuda
- スター
- 671
- フォーク
- 122
- 平均マージ
- 4日 19時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuCollections のほかの issue
-
Add cuco::detail::stream_sync(cuda::stream_ref) to centralize CCCL version-specific API naming再び着手できるかも @0z5a が 23 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/cuCollections#840 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
nvidia-runners
難易度 1/5 1〜3時間 初心者へのやさしさ 25/100
NVIDIA/cuCollections#853 ·
メンテナーはふだん 2 日以内に返信
-
topic: performance type: feature request
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NVIDIA/cuCollections#817 · コメント 7 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
good first issue P2: Nice to have type: improvement
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
NVIDIA/cuCollections#805 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
[FEA] Add MPSC/MPMC concurrent queue再び着手できるかも @sleeepyjack が 262 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンtype: feature request
NVIDIA/cuCollections#791 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
NVIDIA/cuCollections の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
supabase-community/supabase-kt#1413 ·
メンテナーはふだん 5 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
PedestrianDynamics/pyFDS-Evac#766 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
prime-radiant-inc/evener#4329 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
CartLineConstraint Jacobian always writes 6 rows, overruns when indices has fewer than 6 entriesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tesseract-robotics/trajopt#618 ·
メンテナーはふだん 1 日以内に返信