diff --git a/projects/rocthrust/thrust/detail/functional/actor.h b/projects/rocthrust/thrust/detail/functional/actor.h index 342cc9f103b..ca9962fc5a7 100644 --- a/projects/rocthrust/thrust/detail/functional/actor.h +++ b/projects/rocthrust/thrust/detail/functional/actor.h @@ -1,5 +1,6 @@ /* * Copyright 2024 NVIDIA Corporation + * Modifications Copyright© 2025 Advanced Micro Devices, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +41,15 @@ namespace detail namespace functional { +// If we have libstdc++ >= 10, we can use the __decay_t +// builtin to reduce compilation time. +template +#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 10 +using decay_t = std::decay_t; +#else +using decay_t = std::__decay_t; +#endif + // An actor is a node in an expression template template struct actor : Eval @@ -197,7 +207,7 @@ struct value }; template -THRUST_HOST_DEVICE auto make_actor(T&& x) -> actor>> +THRUST_HOST_DEVICE auto make_actor(T&& x) -> actor>> { return {{THRUST_FWD(x)}}; }