From ccc2a7f3ca6049dc52fe3da04c64f07e0696c5ba Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 18 Nov 2024 12:13:45 -0800 Subject: [PATCH 1/2] Revert "Use `__restrict__` for CUDA (#5079)" This reverts commit 44a276fdff3463f7e0ab547458850c16925cab06. --- stl/inc/yvals_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index a904ea7d01e..d242f28ea92 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -2017,7 +2017,7 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error. #endif // ^^^ !defined(__cpp_static_call_operator) ^^^ #ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize __restrict -#define _RESTRICT __restrict__ +#define _RESTRICT #else // ^^^ defined(__CUDACC__) / !defined(__CUDACC__) vvv #define _RESTRICT __restrict #endif // ^^^ !defined(__CUDACC__) ^^^ From cb9ee936004c3e1cc9a3bc26b8581212db2bef45 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 18 Nov 2024 12:18:41 -0800 Subject: [PATCH 2/2] Add comment. --- stl/inc/yvals_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index d242f28ea92..07258c7ec98 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -2016,7 +2016,7 @@ 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 +#ifdef __CUDACC__ // TRANSITION, CUDA 12.4 doesn't recognize MSVC __restrict; CUDA __restrict__ is not usable in C++ #define _RESTRICT #else // ^^^ defined(__CUDACC__) / !defined(__CUDACC__) vvv #define _RESTRICT __restrict