Add const qualifiers to HIP_vector_type unary arithmetic operators (#1965)
Resolves issue #1960
[ROCm/hip commit: 3d38135ae2]
This commit is contained in:
@@ -694,7 +694,7 @@ THE SOFTWARE.
|
||||
typename U = T,
|
||||
typename std::enable_if<std::is_signed<U>{}>::type* = nullptr>
|
||||
inline __host__ __device__
|
||||
HIP_vector_type operator-() noexcept
|
||||
HIP_vector_type operator-() const noexcept
|
||||
{
|
||||
auto tmp(*this);
|
||||
tmp.data = -tmp.data;
|
||||
@@ -705,7 +705,7 @@ THE SOFTWARE.
|
||||
typename U = T,
|
||||
typename std::enable_if<std::is_integral<U>{}>::type* = nullptr>
|
||||
inline __host__ __device__
|
||||
HIP_vector_type operator~() noexcept
|
||||
HIP_vector_type operator~() const noexcept
|
||||
{
|
||||
HIP_vector_type r{*this};
|
||||
r.data = ~r.data;
|
||||
|
||||
Reference in New Issue
Block a user