Skip to content

Commit 99ef0d0

Browse files
Don't use __restrict__ for CUDA (#5097)
1 parent 44a276f commit 99ef0d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stl/inc/yvals_core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,8 +2016,8 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error.
20162016
#define _CONST_CALL_OPERATOR const
20172017
#endif // ^^^ !defined(__cpp_static_call_operator) ^^^
20182018

2019-
#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize __restrict
2020-
#define _RESTRICT __restrict__
2019+
#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize MSVC __restrict; CUDA __restrict__ is not usable in C++
2020+
#define _RESTRICT
20212021
#else // ^^^ defined(__CUDACC__) / !defined(__CUDACC__) vvv
20222022
#define _RESTRICT __restrict
20232023
#endif // ^^^ !defined(__CUDACC__) ^^^

0 commit comments

Comments
 (0)