-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fea/build-rapids
- Loading branch information
Showing
29 changed files
with
883 additions
and
137 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// 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) 2024 NVIDIA CORPORATION & AFFILIATES. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef __CCCL_SEQUENCE_ACCESS_H | ||
#define __CCCL_SEQUENCE_ACCESS_H | ||
|
||
#include <cuda/std/__cccl/compiler.h> | ||
#include <cuda/std/__cccl/system_header.h> | ||
|
||
#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 | ||
|
||
// We need to define hidden friends for {cr,r,}{begin,end} of our containers as we will otherwise encounter ambigouities | ||
#define _CCCL_SYNTHESIZE_SEQUENCE_ACCESS(_ClassName, _ConstIter) \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE iterator begin(_ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.begin())) \ | ||
{ \ | ||
return __sequence.begin(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstIter begin(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.begin())) \ | ||
{ \ | ||
return __sequence.begin(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE iterator end(_ClassName& __sequence) noexcept(noexcept(__sequence.end())) \ | ||
{ \ | ||
return __sequence.end(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstIter end(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.end())) \ | ||
{ \ | ||
return __sequence.end(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstIter cbegin(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.begin())) \ | ||
{ \ | ||
return __sequence.begin(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstIter cend(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.end())) \ | ||
{ \ | ||
return __sequence.end(); \ | ||
} | ||
#define _CCCL_SYNTHESIZE_SEQUENCE_REVERSE_ACCESS(_ClassName, _ConstRevIter) \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE reverse_iterator rbegin(_ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.rbegin())) \ | ||
{ \ | ||
return __sequence.rbegin(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstRevIter rbegin(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.rbegin())) \ | ||
{ \ | ||
return __sequence.rbegin(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE reverse_iterator rend(_ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.rend())) \ | ||
{ \ | ||
return __sequence.rend(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstRevIter rend(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.rend())) \ | ||
{ \ | ||
return __sequence.rend(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstRevIter crbegin(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.rbegin())) \ | ||
{ \ | ||
return __sequence.rbegin(); \ | ||
} \ | ||
_CCCL_NODISCARD_FRIEND _CCCL_HOST_DEVICE _ConstRevIter crend(const _ClassName& __sequence) noexcept( \ | ||
noexcept(__sequence.rend())) \ | ||
{ \ | ||
return __sequence.rend(); \ | ||
} | ||
|
||
#endif // __CCCL_SEQUENCE_ACCESS_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.