[INFRA] Import NVIDIA/CCCL upstream as optimization reference library
CCCL (CUDA C++ Core Libraries) provides: - CUB: device/block/warp-level GPU primitives (reduce, scan, sort, topk) - Thrust: high-level parallel algorithms (transform_reduce, sort, scan) - libcudacxx: CUDA C++ standard library (atomics, barriers, memory) - cudax: experimental features (memory resources, allocators) - Tuning policies: per-SM hardware-specific algorithm parameters Competition optimization vectors mapped to CCCL: - Output TPS (83% weight): warp_reduce, block_reduce, device_topk - Input TPS (14% weight): device_scan, block_load, prefetch - Cache TPS (3% weight): prefix caching strategy patterns - Memory (0.9 util): pooled/cached/buddy allocators Source: https://github.com/NVIDIA/cccl (shallow clone, HEAD only) License: Apache-2.0
This commit is contained in:
61
cccl_upstream/libcudacxx/include/cuda/std/climits
Normal file
61
cccl_upstream/libcudacxx/include/cuda/std/climits
Normal file
@@ -0,0 +1,61 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of libcu++, the C++ Standard Library for your entire system,
|
||||
// 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
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _CUDA_STD_CLIMITS
|
||||
#define _CUDA_STD_CLIMITS
|
||||
|
||||
#include <cuda/std/detail/__config>
|
||||
|
||||
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
||||
# pragma GCC system_header
|
||||
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
||||
# pragma clang system_header
|
||||
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
||||
# pragma system_header
|
||||
#endif // no system header
|
||||
|
||||
#if _CCCL_HOSTED()
|
||||
# include <climits>
|
||||
#else // ^^^ _CCCL_HOSTED() ^^^ / vvv _CCCL_FREESTANDING() vvv
|
||||
# define _CCCL_CHAR_IS_UNSIGNED() ('\xff' > 0) // CURSED
|
||||
|
||||
# define CHAR_BIT 8
|
||||
|
||||
# define SCHAR_MIN (-128)
|
||||
# define SCHAR_MAX 127
|
||||
# define UCHAR_MAX 255
|
||||
|
||||
# if _CCCL_CHAR_IS_UNSIGNED()
|
||||
# define CHAR_MIN 0
|
||||
# define CHAR_MAX UCHAR_MAX
|
||||
# else
|
||||
# define CHAR_MIN SCHAR_MIN
|
||||
# define CHAR_MAX SCHAR_MAX
|
||||
# endif
|
||||
# define SHRT_MIN (-SHRT_MAX - 1)
|
||||
# define SHRT_MAX 0x7fff
|
||||
# define USHRT_MAX 0xffff
|
||||
# define INT_MIN (-INT_MAX - 1)
|
||||
# define INT_MAX 0x7fffffff
|
||||
# define UINT_MAX 0xffffffff
|
||||
# define LONG_MIN (-LONG_MAX - 1)
|
||||
# ifdef __LP64__
|
||||
# define LONG_MAX LLONG_MAX
|
||||
# define ULONG_MAX ULLONG_MAX
|
||||
# else
|
||||
# define LONG_MAX INT_MAX
|
||||
# define ULONG_MAX UINT_MAX
|
||||
# endif
|
||||
# define LLONG_MIN (-LLONG_MAX - 1)
|
||||
# define LLONG_MAX 0x7fffffffffffffffLL
|
||||
# define ULLONG_MAX 0xffffffffffffffffUL
|
||||
#endif // _CCCL_FREESTANDING()
|
||||
|
||||
#endif // _CUDA_STD_CLIMITS
|
||||
Reference in New Issue
Block a user