Add const qualifiers to HIP_vector_type unary arithmetic operators (#1965)

Resolves issue #1960

[ROCm/hip commit: 3d38135ae2]
This commit is contained in:
Benjamin Sherman
2020-03-26 07:39:00 -04:00
committed by GitHub
parent 9e5f7e3a3c
commit d9d1017168
@@ -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;