-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Unify handling of dialects We currently have 3 hacky ways of detecting standard versions. To unify this we define a single `_CCCL_STD_VER` macro that works everywhere. For backward compatability we move libcu++ to a four digit counter and also keep the publicly available `CUB_CPP_DIALECT` and `THRUST_CPP_DIALECT` for user consumption. That said, we should never ever rely on the user to define those and always use our internal detection logic. Anything else is just plain broken.
- Loading branch information
Showing
2,654 changed files
with
5,690 additions
and
5,734 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
libcudacxx/include/cuda/std/detail/libcxx/include/__cccl/dialect.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// 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 __CCCL_DIALECT_H | ||
#define __CCCL_DIALECT_H | ||
|
||
#if defined(_CCCL_COMPILER_MSVC) | ||
# if _MSVC_LANG <= 201103L | ||
# define _CCCL_STD_VER 2011 | ||
# elif _MSVC_LANG <= 201402L | ||
# define _CCCL_STD_VER 2014 | ||
# elif _MSVC_LANG <= 201703L | ||
# define _CCCL_STD_VER 2017 | ||
# elif _MSVC_LANG <= 202002L | ||
# define _CCCL_STD_VER 2020 | ||
# else | ||
# define _CCCL_STD_VER 2023 // current year, or date of c++2b ratification | ||
# endif | ||
#else // ^^^ _CCCL_COMPILER_MSVC ^^^ / vvv !_CCCL_COMPILER_MSVC vvv | ||
# if __cplusplus <= 199711L | ||
# define _CCCL_STD_VER 2003 | ||
# elif __cplusplus <= 201103L | ||
# define _CCCL_STD_VER 2011 | ||
# elif __cplusplus <= 201402L | ||
# define _CCCL_STD_VER 2014 | ||
# elif __cplusplus <= 201703L | ||
# define _CCCL_STD_VER 2017 | ||
# elif __cplusplus <= 202002L | ||
# define _CCCL_STD_VER 2020 | ||
# elif __cplusplus <= 202302L | ||
# define _CCCL_STD_VER 2023 | ||
# else | ||
# define _CCCL_STD_VER 2024 // current year, or date of c++2c ratification | ||
# endif | ||
#endif // !_CCCL_COMPILER_MSVC | ||
|
||
#endif // __CCCL_DIALECT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.