最近、CUDA と Ethereum の使用を開始しましたが、cuda ファイルに移植しようとするとエラーが発生する関数のコード スニペットを少し見つけました。
コード スニペットは次のとおりです。
void keccak_f1600_round(uint2* a, uint r, uint out_size)
{
#if !__ENDIAN_LITTLE__
for (uint i = 0; i != 25; ++i)
a[i] = make_uint2(a[i].y, a[i].x);
#endif
uint2 b[25];
uint2 t;
// Theta
b[0] = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20];
#if !__ENDIAN_LITTLE__
for (uint i = 0; i != 25; ++i)
a[i] = make_uint2(a[i].y, a[i].x);
#endif
}
行に関するエラーb[0]は次のとおりです。
error: no operator "^=" matches these operands operand types are: uint2 ^= uint2
uint2正直なところ、私はcuda との経験があまりないので、この問題を修正するにはどうすればよいかを尋ねています。