codekingpro/portable-devtools
114k
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCUDACXX___UTILITY_REL_OPS_H11#define _LIBCUDACXX___UTILITY_REL_OPS_H12 13#ifndef __cuda_std__14#include <__config>15#endif // __cuda_std__16 17#include "../__utility/forward.h"18#include "../__utility/move.h"19 20#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)21# pragma GCC system_header22#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)23# pragma clang system_header24#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)25# pragma system_header26#endif // no system header27 28_LIBCUDACXX_BEGIN_NAMESPACE_STD29 30namespace rel_ops31{32 33template<class _Tp>34inline _LIBCUDACXX_INLINE_VISIBILITY35bool36operator!=(const _Tp& __x, const _Tp& __y)37{38 return !(__x == __y);39}40 41template<class _Tp>42inline _LIBCUDACXX_INLINE_VISIBILITY43bool44operator> (const _Tp& __x, const _Tp& __y)45{46 return __y < __x;47}48 49template<class _Tp>50inline _LIBCUDACXX_INLINE_VISIBILITY51bool52operator<=(const _Tp& __x, const _Tp& __y)53{54 return !(__y < __x);55}56 57template<class _Tp>58inline _LIBCUDACXX_INLINE_VISIBILITY59bool60operator>=(const _Tp& __x, const _Tp& __y)61{62 return !(__x < __y);63}64 65} // namespace rel_ops66 67_LIBCUDACXX_END_NAMESPACE_STD68 69#endif // _LIBCUDACXX___UTILITY_REL_OPS_H70 