diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_vector_types.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_vector_types.h index 453e92ebfc..9ef8e32516 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_vector_types.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_vector_types.h @@ -105,14 +105,6 @@ THE SOFTWARE. // Idea from https://t0rakka.silvrback.com/simd-scalar-accessor Vector data; - __host__ __device__ - Scalar_accessor() = default; - - __host__ __device__ - Scalar_accessor(T x) { - data[idx] = x; - } - __host__ __device__ operator T() const noexcept { return data[idx]; } __host__ __device__ @@ -302,7 +294,13 @@ THE SOFTWARE. union { Native_vec_ data; +#if __HIP_CLANG_ONLY__ + struct { + T x; + }; +#else hip_impl::Scalar_accessor x; +#endif }; using value_type = T; @@ -325,8 +323,15 @@ THE SOFTWARE. union { Native_vec_ data; +#if __HIP_CLANG_ONLY__ + struct { + T x; + T y; + }; +#else hip_impl::Scalar_accessor x; hip_impl::Scalar_accessor y; +#endif }; using value_type = T; @@ -506,10 +511,19 @@ THE SOFTWARE. union { Native_vec_ data; +#if __HIP_CLANG_ONLY__ + struct { + T x; + T y; + T z; + T w; + }; +#else hip_impl::Scalar_accessor x; hip_impl::Scalar_accessor y; hip_impl::Scalar_accessor z; hip_impl::Scalar_accessor w; +#endif }; using value_type = T;