SWDEV-280131 - Fix __half2 member access bug
Change-Id: Ic11750d18e4ba47446a7e494c3089a19cb4df783
Este commit está contenido en:
@@ -329,7 +329,7 @@ THE SOFTWARE.
|
||||
|
||||
// BEGIN STRUCT __HALF2
|
||||
struct __half2 {
|
||||
protected:
|
||||
public:
|
||||
union {
|
||||
static_assert(
|
||||
sizeof(_Float16_2) == sizeof(unsigned short[2]), "");
|
||||
@@ -340,7 +340,7 @@ THE SOFTWARE.
|
||||
unsigned short y;
|
||||
};
|
||||
};
|
||||
public:
|
||||
|
||||
// CREATORS
|
||||
__host__ __device__
|
||||
__half2() = default;
|
||||
|
||||
@@ -59,10 +59,10 @@ struct __half2_raw {
|
||||
|
||||
// BEGIN STRUCT __HALF2
|
||||
struct __half2 {
|
||||
protected:
|
||||
public:
|
||||
__half x;
|
||||
__half y;
|
||||
public:
|
||||
|
||||
// CREATORS
|
||||
__half2() = default;
|
||||
__half2(const __half2_raw& ix)
|
||||
|
||||
@@ -159,6 +159,9 @@ void __half2Test(bool* result, __half2 a) {
|
||||
// Dot Functions
|
||||
result[0] = amd_mixed_dot(a, a, 1, 1) && result[0];
|
||||
#endif
|
||||
|
||||
half X = a.x;
|
||||
half Y = a.y;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
Referencia en una nueva incidencia
Block a user