Skip to content

Commit

Permalink
No references were harmed
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Mar 26, 2024
1 parent e79fb33 commit e4d0a07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ struct __complex_bfloat_vector_op_complex
, __rhs(__rhs)
{}

complex<__nv_bfloat16>& __lhs;
const complex<__nv_bfloat16>& __rhs;
complex<__nv_bfloat16> __lhs;
const complex<__nv_bfloat16> __rhs;
};

struct __complex_bfloat_vector_op_bfloat
{
__nv_bfloat162& __lhs;
const __nv_bfloat162& __rhs;
__nv_bfloat162 __lhs;
const __nv_bfloat162 __rhs;
};

union __complex_bfloat_vector_op
Expand Down Expand Up @@ -108,13 +108,13 @@ union __complex_bfloat_vector_op
inline _LIBCUDACXX_INLINE_VISIBILITY complex<__nv_bfloat16>&
operator+=(complex<__nv_bfloat16>& __lhs, const complex<__nv_bfloat16>& __rhs) noexcept
{
return __complex_bfloat_vector_op{__lhs, __rhs}.__plus_op();
return (__lhs = __complex_bfloat_vector_op{__lhs, __rhs}.__plus_op());
}

inline _LIBCUDACXX_INLINE_VISIBILITY complex<__nv_bfloat16>&
operator-=(complex<__nv_bfloat16>& __lhs, const complex<__nv_bfloat16>& __rhs) noexcept
{
return __complex_bfloat_vector_op{__lhs, __rhs}.__minus_op();
return (__lhs = __complex_bfloat_vector_op{__lhs, __rhs}.__minus_op());
}

inline _LIBCUDACXX_INLINE_VISIBILITY __nv_bfloat16 arg(__nv_bfloat16 __re)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ struct __complex_half_vector_op_complex
, __rhs(__rhs)
{}

complex<__half>& __lhs;
const complex<__half>& __rhs;
complex<__half> __lhs;
const complex<__half> __rhs;
};

struct __complex_half_vector_op_half
{
__half2& __lhs;
const __half2& __rhs;
__half2 __lhs;
const __half2 __rhs;
};

union __complex_half_vector_op
Expand Down Expand Up @@ -105,13 +105,13 @@ union __complex_half_vector_op
inline _LIBCUDACXX_INLINE_VISIBILITY complex<__half>&
operator+=(complex<__half>& __lhs, const complex<__half>& __rhs) noexcept
{
return __complex_half_vector_op{__lhs, __rhs}.__plus_op();
return (__lhs = __complex_half_vector_op{__lhs, __rhs}.__plus_op());
}

inline _LIBCUDACXX_INLINE_VISIBILITY complex<__half>&
operator-=(complex<__half>& __lhs, const complex<__half>& __rhs) noexcept
{
return __complex_half_vector_op{__lhs, __rhs}.__minus_op();
return (__lhs = __complex_half_vector_op{__lhs, __rhs}.__minus_op());
}

inline _LIBCUDACXX_INLINE_VISIBILITY __half arg(__half __re)
Expand Down

0 comments on commit e4d0a07

Please sign in to comment.