Skip to content

Commit cb2aa06

Browse files
griwesbrycelelbach
authored andcommitted
Thrust CMake conversion:
* Fix namespace references for CUDA errors after slight re-namespacing. * Drop the use of GCC's broken nodiscard-like attribute.
1 parent f35f27e commit cb2aa06

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

thrust/detail/config/cpp_compatibility.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
# if __has_cpp_attribute(nodiscard)
2929
# define THRUST_NODISCARD [[nodiscard]]
30-
# elif __has_cpp_attribute(gnu::warn_unused_result)
31-
# define THRUST_NODISCARD [[gnu::warn_unused_result]]
3230
# endif
3331

3432
# define THRUST_CONSTEXPR constexpr
@@ -37,7 +35,7 @@
3735
# define THRUST_NOEXCEPT noexcept
3836
# define THRUST_FINAL final
3937
#else
40-
# define THRUST_CONSTEXPR
38+
# define THRUST_CONSTEXPR
4139
# define THRUST_OVERRIDE
4240
# define THRUST_DEFAULT {}
4341
# define THRUST_NOEXCEPT throw()

thrust/system/cuda/detail/error.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ namespace system
2727
{
2828

2929

30-
error_code make_error_code(cuda_cub::errc::errc_t e)
30+
error_code make_error_code(cuda::errc::errc_t e)
3131
{
3232
return error_code(static_cast<int>(e), cuda_category());
3333
} // end make_error_code()
3434

3535

36-
error_condition make_error_condition(cuda_cub::errc::errc_t e)
36+
error_condition make_error_condition(cuda::errc::errc_t e)
3737
{
3838
return error_condition(static_cast<int>(e), cuda_category());
3939
} // end make_error_condition()
@@ -69,7 +69,7 @@ class cuda_error_category
6969

7070
inline virtual error_condition default_error_condition(int ev) const
7171
{
72-
using namespace cuda_cub::errc;
72+
using namespace cuda::errc;
7373

7474
if(ev < ::cudaErrorApiFailureBase)
7575
{

thrust/system/cuda/error.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,19 @@ inline const error_category &cuda_category(void);
148148

149149
/*! Specialization of \p is_error_code_enum for \p cuda::errc::errc_t
150150
*/
151-
template<> struct is_error_code_enum<cuda_cub::errc::errc_t> : thrust::detail::true_type {};
151+
template<> struct is_error_code_enum<cuda::errc::errc_t> : thrust::detail::true_type {};
152152

153153

154154
// XXX replace cuda::errc::errc_t with cuda::errc upon c++0x
155155
/*! \return <tt>error_code(static_cast<int>(e), cuda::error_category())</tt>
156156
*/
157-
inline error_code make_error_code(cuda_cub::errc::errc_t e);
157+
inline error_code make_error_code(cuda::errc::errc_t e);
158158

159159

160160
// XXX replace cuda::errc::errc_t with cuda::errc upon c++0x
161161
/*! \return <tt>error_condition(static_cast<int>(e), cuda::error_category())</tt>.
162162
*/
163-
inline error_condition make_error_condition(cuda_cub::errc::errc_t e);
163+
inline error_condition make_error_condition(cuda::errc::errc_t e);
164164

165165
} // end system
166166

0 commit comments

Comments
 (0)