//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef ATOMIC_HELPERS_H #define ATOMIC_HELPERS_H #include #include #include "test_macros.h" struct UserAtomicType { int i; __host__ __device__ explicit UserAtomicType(int d = 0) noexcept : i(d) {} __host__ __device__ friend bool operator==(const UserAtomicType& x, const UserAtomicType& y) { return x.i == y.i; } }; template