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

Resolves issue #1960
Этот коммит содержится в:
Benjamin Sherman
2020-03-26 07:39:00 -04:00
коммит произвёл GitHub
родитель 8fefda2bb9
Коммит 3d38135ae2
+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;