Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[BUG] ChannelAccessor has no valid channel pointer with VectorGrid

オープン
#2,000 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

tools::createNanoGrid、ChannelAccessor、deviceGrid、および再現コードに示されている GPU カーネルから始めます。FloatGrid と VectorGrid のパスを比較し、CUDA の例を実行して VectorGrid のチャネルポインターが空である理由を特定します。VectorGrid のアクセサーが有効で、カーネルがチャネルインデックスを取得できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug nanovdb
Environment

Operating System: Win 10
Version: VDB 12.0

Describe the bug

I'm building an nanovdb::IndexGrid from an openvdb::FloatGrid. It encodes voxel values as blind data that can be accessed with a
nanovdb::ChannelAccessor<float, nanovdb::ValueOnIndex>, there everythings works as it should.

But when using an openvdb::VectorGrid and the accessor nanovdb::ChannelAccessor<nanovdb::Vec3f, nanovdb::ValueOnIndex> the channel ptr is empty.

To Reproduce
using SrcGridT  = openvdb::FloatGrid; // replace by opevdb::VectorGrid 
using DstBuildT = nanovdb::ValueOnIndex;
using BufferT   = nanovdb::cuda::DeviceBuffer;

nanovdb::GridHandle<BufferT> idxHandle = nanovdb::tools::createNanoGrid<SrcGridT, DstBuildT, BufferT>(*floatGrid /* *vectorGrid */, 1u, false , false, 0);
idxHandle.deviceUpload(stream, false);

const auto* gpuGrid = idxHandle.deviceGrid<DstBuildT>();
launch_kernels(gpuGrid, toSample, stream);

Then a cuda kernel is launched to access the grid on the GPU.

__global__ void gpu_kernel(const nanovdb::NanoGrid<nanovdb::ValueOnIndex>* gpuGrid, const float* data) {
	const nanovdb::ChannelAccessor<float /* nanovdb::Vec3f */, nanovdb::ValueOnIndex> acc(*gpuGrid);

	if (!acc) {
		printf("Error: ChannelAccessor has no valid channel pointer! (null)\n");
		return;
	}

	const uint32_t idx000 = acc.idx(0, 0, 0);
	printf("Idx at Coord 0,0,0 : %u\n", idx000);
}
Additional context

I tried different configurations such as adding 3u channel with the VectorGrid and trying to access each component individually but it didn't work.

主要言語
C++
スター
3.4k
フォーク
777
平均マージ
3日 1時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AcademySoftwareFoundation/openvdb のほかの issue

AcademySoftwareFoundation/openvdb の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。