It is not clear how to define ref or ptr type of struct field?
struct uint128_t {
uint64_t lo;
uint64_t hi;
device uint64_t& operator[](int i) {
return (i == 0) ? lo : hi;
}
...
}
Reference to type 'device uint64_t' (aka 'device unsigned long') could not bind to an lvalue of type 'uint64_t' (aka 'unsigned long')