NVCC unable to compile multi_arrays
まだ誰も着手していません。
評価
調査の方向性
示されている NVCC コマンドを使って main.cu の最小例を再現し、その後、NVCC が構文エラーを報告している 408 行目と 414 行目付近の boost/multi_array/base.hpp を調べます。.cu と .cpp のコンパイルパスを比較します。.cu ファイル内の最小の multi_array 宣言が NVCC でコンパイルできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I am trying to use multi_arrays in a CUDA GPU project and NVCC is unable to compile it.
NVCC version is 12.3 (error also occurs with other versions)
Boost version is 1.84.0 (error also occurs with other versions)
I used the following command to compile:
nvcc -o C:/_repro/output.exe C:/_repro/main.cu -IC:/boost_1_84_0
I am using the following code (main.cu):
#include <boost/multi_array.hpp>
int main()
{
boost::multi_array<int, 3> my_arr;
return 0;
}
I get the following errors:
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2988: unrecognizable template declaration/definition
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2143: syntax error: missing ')' before '<'
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2143: syntax error: missing ';' before '<'
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2238: unexpected token(s) preceding ';'
C:/boost_1_84_0\boost/multi_array/base.hpp(408): error C2059: syntax error: '<'
C:/boost_1_84_0\boost/multi_array/base.hpp(414): error C2059: syntax error: ')'
C:/boost_1_84_0\boost/multi_array/base.hpp(494): error C2143: syntax error: missing ';' before '}'
C:/boost_1_84_0\boost/multi_array/base.hpp(494): error C2238: unexpected token(s) preceding ';'
Several more errors occur when I attempt to use further multi_array functionality such as extents and indexing, this is just a minimal example. Additionally, the code compiles just fine when you change the file extention to .cpp, but I assume this is just NVCC falling back on the default cl.exe compiler. I specifically need multi_arrays to compile within a .cu file along with CUDA device code.
Any help is much appreciated, thank you.
- 主要言語
- C++
- スター
- 32
- フォーク
- 39
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/multi_array のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
boostorg/multi_array#38 · コメント 2 件 · リアクション 1 件 ·
-
boostorg/multi_array#35 · コメント 2 件 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
boostorg/multi_array#33 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
boostorg/multi_array#32 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
boostorg/multi_array#31 · コメント 2 件 ·
boostorg/multi_array の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google/libultrahdr#485 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
godotengine/godot#123776 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 60/100
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ros2/common_interfaces#344 ·