DPCT1052

メッセージ

SYCL* は、volatile 修飾されたベクトルタイプのメンバーアクセスをサポートしていません。volatile 修飾子は削除されました。コードを書き換える必要があります。

説明

SYCL* 仕様では、ベクトルタイプのメンバーアクセスの volatile 修飾子は提供されません。

修正方法の提案

コードを確認して、調整してください。

例えば、以下のオリジナル CUDA* コードについて考えてみます。


1struct Complex : cuFloatComplex { 
2 float real() const volatile { 
3 return x; 
4 } 
5};

このコードは、以下の SYCL* コードに移行されます。


1struct Complex : sycl::float2 { 
2 float real() const volatile { 
3 /* 
4 DPCT1052:0: SYCL does not support the member access for a volatile qualified 
5 vector type. The volatile qualifier was removed. You may need to rewrite the 
6 code.
7 */ 
8 return const_cast<struct Complex *>(this)->x(); 
9 } 
10};

このコードは次のように書き換えられます。


1struct Complex : sycl::float2 { 
2 float real() const volatile { 
3 return const_cast<struct Complex *>(this)->x(); 
4 } 
5};

ヘルプが必要な場合は、SYCL* への移行フォーラム (英語) にアクセスしてください。