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 authored and GitHub committed 2020-03-26 17:09:00 +05:30
1 parent 9e5f7e3a3c
commit d9d1017168
1 file changed
+2 -2
@@ -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;