問題タブ [cub]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
155 参照

c++ - CUB の TexRefInputIterator はどのように機能しますか?

CUBはテクスチャ参照用のイテレータを提供し、その実装には簡単にアクセスできます

Since I couldn't figure out how to implement template-able texture references myself - they "can only be declared as a static global variable" - I am now trying to understand how it's done in CUB. But some of it is beyond my C++ knowledge, and I haven't been able to find the answers elsewhere (then again, I don't really know what to search for).

Specifically:

Is the unnamed namespace surrounding IteratorTexRef significant? I can only think that it is to limit IteratorTexRef::TexId::ref to file/translation unit scope.

What is the purpose of IteratorTexRef? It only wraps TexId, but removing it results in unintelligible (to me) compile-time errors.

This code, a stripped-down version of the linked-to implementation, compiles and runs:

The closest I got was something similar to the below, based on how one would normally access a static template member. For clarity, the below simply eliminates IteratorTexRef from the above:

It gives these somewhat esoteric compile-time errors. (Compiled with nvcc iter.cu and CUDA 7.0):

0 投票する
1 に答える
406 参照

cuda - cub ライブラリでサポートされる最大サイズ

cub::scan でサポートされている最大サイズを知っている人はいますか? 5 億を超える入力サイズのコア ダンプを取得しました。自分が悪いことをしていないことを確認したかったのです...

これが私のコードです:

0 投票する
1 に答える
528 参照

cuda - 並列合計スキャンに CUB と Thrust の両方を使用する

テストベクターで並列合計スキャンを実行しようとしています。この目的のために、Thrust と CUB ライブラリの両方を使用しています

私が得ているエラーは

エラーを正しく解釈できませんでした。生のポインターの処理方法に問題があると確信しています。どんな助けでも大歓迎です。

関連リンク: 1 つの CUDA コードで CUB と Thrust を使用する方法

0 投票する
1 に答える
1004 参照

cuda - nvidia nsight に CUB をインストールする

NVIDIA Nsight で CUB を使用したい。それを行うためのチュートリアルをインターネットで探しましたが、CUB の公式ページでも何も見つかりませんでした。

NVIDIA Nsight を使用して記述したコードで CUB を使用するには、何をする必要がありますか?

0 投票する
1 に答える
727 参照

cuda - CUB セグメント化された削減が結果を生まない

私はCUBセグメント削減合計プリミティブを使用しようとしていますが、それに固執しています。

これが私のコードです:

しかし、結果として私はこれを得ました:

何が問題なのか正確にはわかりません。実際の例では、セグメントが 400 に等しい非常に大きな配列があります。s の宣言とメモリの割り当てが不要になるようにコードを最適化できますかd_offsets