зеркало из https://github.com/microsoft/STL.git
Guard `__restrict` usage for CUDA (#5061)
This commit is contained in:
Родитель
cb8e5ba010
Коммит
4b697a8643
|
@ -463,7 +463,7 @@ _FwdIt2 transform_inclusive_scan(_ExPo&& _Exec, _FwdIt1 _First, _FwdIt1 _Last, _
|
|||
|
||||
template <class _TyDest, class _TySrc, class _BinOp>
|
||||
void _Adjacent_difference_no_overlap(
|
||||
_TyDest* const __restrict _Dest, _TySrc* const __restrict _Src, const ptrdiff_t _Count, _BinOp _Func) {
|
||||
_TyDest* const _RESTRICT _Dest, _TySrc* const _RESTRICT _Src, const ptrdiff_t _Count, _BinOp _Func) {
|
||||
_Dest[0] = _Src[0];
|
||||
for (ptrdiff_t _Ix = 1; _Ix != _Count; ++_Ix) {
|
||||
#if _HAS_CXX20
|
||||
|
|
|
@ -2016,5 +2016,11 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error.
|
|||
#define _CONST_CALL_OPERATOR const
|
||||
#endif // ^^^ !defined(__cpp_static_call_operator) ^^^
|
||||
|
||||
#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize __restrict
|
||||
#define _RESTRICT
|
||||
#else // ^^^ defined(__CUDACC__) / !defined(__CUDACC__) vvv
|
||||
#define _RESTRICT __restrict
|
||||
#endif // ^^^ !defined(__CUDACC__) ^^^
|
||||
|
||||
#endif // _STL_COMPILER_PREPROCESSOR
|
||||
#endif // _YVALS_CORE_H_
|
||||
|
|
Загрузка…
Ссылка в новой задаче