Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
identity.h55 linesDownload Raw Back to __functional
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.8//9//===----------------------------------------------------------------------===//10 11#ifndef _LIBCUDACXX___FUNCTIONAL_IDENTITY_H12#define _LIBCUDACXX___FUNCTIONAL_IDENTITY_H13 14#ifndef __cuda_std__15#include <__config>16#endif // __cuda_std__17 18#include "../__utility/forward.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 30struct __identity {31  template <class _Tp>32  _LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_INLINE_VISIBILITY constexpr _Tp&& operator()(_Tp&& __t) const noexcept {33    return _CUDA_VSTD::forward<_Tp>(__t);34  }35 36  using is_transparent = void;37};38 39#if _LIBCUDACXX_STD_VER > 1140 41struct identity {42    template<class _Tp>43    _LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_INLINE_VISIBILITY constexpr _Tp&& operator()(_Tp&& __t) const noexcept44    {45        return _CUDA_VSTD::forward<_Tp>(__t);46    }47 48    using is_transparent = void;49};50#endif // _LIBCUDACXX_STD_VER > 1151 52_LIBCUDACXX_END_NAMESPACE_STD53 54#endif // _LIBCUDACXX___FUNCTIONAL_IDENTITY_H55 
codekingpro/portable-devtools · Team Ai