Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
util_deprecated.cuh86 linesDownload Raw Back to cub
1/******************************************************************************2 * Copyright (c) 2022, NVIDIA CORPORATION.  All rights reserved.3 *4 * Redistribution and use in source and binary forms, with or without5 * modification, are permitted provided that the following conditions are met:6 *     * Redistributions of source code must retain the above copyright7 *       notice, this list of conditions and the following disclaimer.8 *     * Redistributions in binary form must reproduce the above copyright9 *       notice, this list of conditions and the following disclaimer in the10 *       documentation and/or other materials provided with the distribution.11 *     * Neither the name of the NVIDIA CORPORATION nor the12 *       names of its contributors may be used to endorse or promote products13 *       derived from this software without specific prior written permission.14 *15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"16 *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17 *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE18 * DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.25 *26 ******************************************************************************/27 28/**29 * \file30 * Define CUB_DEPRECATED macro.31 */32 33#pragma once34 35#include <cub/config.cuh>36 37#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)38#  pragma GCC system_header39#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)40#  pragma clang system_header41#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)42#  pragma system_header43#endif // no system header44 45#include <cub/detail/type_traits.cuh>46#include <cub/util_debug.cuh>47 48#if defined(THRUST_IGNORE_DEPRECATED_API) && !defined(CUB_IGNORE_DEPRECATED_API)49#  define CUB_IGNORE_DEPRECATED_API50#endif51 52#ifdef CUB_IGNORE_DEPRECATED_API53#  define CUB_DEPRECATED54#  define CUB_DEPRECATED_BECAUSE(MSG)55#elif CUB_CPP_DIALECT >= 201456#  define CUB_DEPRECATED [[deprecated]]57#  define CUB_DEPRECATED_BECAUSE(MSG) [[deprecated(MSG)]]58#elif CUB_HOST_COMPILER == CUB_HOST_COMPILER_MSVC59#  define CUB_DEPRECATED __declspec(deprecated)60#  define CUB_DEPRECATED_BECAUSE(MSG) __declspec(deprecated(MSG))61#elif CUB_HOST_COMPILER == CUB_HOST_COMPILER_CLANG62#  define CUB_DEPRECATED __attribute__((deprecated))63#  define CUB_DEPRECATED_BECAUSE(MSG) __attribute__((deprecated(MSG)))64#elif CUB_HOST_COMPILER == CUB_HOST_COMPILER_GCC65#  define CUB_DEPRECATED __attribute__((deprecated))66#  define CUB_DEPRECATED_BECAUSE(MSG) __attribute__((deprecated(MSG)))67#else68#  define CUB_DEPRECATED69#  define CUB_DEPRECATED_BECAUSE(MSG)70#endif71 72#define CUB_DETAIL_RUNTIME_DEBUG_SYNC_IS_NOT_SUPPORTED                         \73  CUB_DEPRECATED_BECAUSE(                                                      \74    "CUB no longer accepts `debug_synchronous` parameter. "                    \75    "Define CUB_DEBUG_SYNC instead, or silence this message with "             \76    "CUB_IGNORE_DEPRECATED_API.")77 78#define CUB_DETAIL_RUNTIME_DEBUG_SYNC_USAGE_LOG                                \79  if (debug_synchronous)                                                       \80  {                                                                            \81    _CubLog("%s\n",                                                            \82            "CUB no longer accepts `debug_synchronous` parameter. "            \83            "Define CUB_DEBUG_SYNC instead.");                                 \84  }85 86 
codekingpro/portable-devtools · Team Ai