Add const qualifiers to HIP_vector_type unary arithmetic operators (#1965)
Resolves issue #1960
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8fefda2bb9
Коммит
3d38135ae2
@@ -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;
|
||||
|
||||
Ссылка в новой задаче
Block a user