1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
|
From: Cordell Bloor <cgmb@debian.org>
Date: Fri, 31 Oct 2025 13:53:46 -0600
Subject: add option to disable deprecation warnings
There's an extremely long set of warnings when buildng the rocprim
tests. I'd like to be able to see deprecation warnings for non-rocprim
functions when building the rocprim tests, but I don't see to see
warnings about rocprim itself when building its own tests.
Forwarded: no
---
.../rocprim/block/block_adjacent_difference.hpp | 64 +++++++++++-----------
rocprim/include/rocprim/config.hpp | 16 ++++++
.../include/rocprim/detail/match_result_type.hpp | 6 +-
rocprim/include/rocprim/detail/various.hpp | 4 +-
.../rocprim/device/detail/lookback_scan_state.hpp | 24 ++++----
rocprim/include/rocprim/intrinsics/thread.hpp | 8 +--
.../rocprim/iterator/arg_index_iterator.hpp | 2 +-
.../include/rocprim/iterator/constant_iterator.hpp | 2 +-
.../include/rocprim/iterator/counting_iterator.hpp | 2 +-
.../include/rocprim/iterator/discard_iterator.hpp | 2 +-
.../rocprim/iterator/texture_cache_iterator.hpp | 2 +-
.../rocprim/iterator/transform_iterator.hpp | 2 +-
rocprim/include/rocprim/iterator/zip_iterator.hpp | 2 +-
rocprim/include/rocprim/thread/radix_key_codec.hpp | 2 +-
rocprim/include/rocprim/thread/thread_load.hpp | 4 +-
rocprim/include/rocprim/type_traits.hpp | 24 ++++----
rocprim/include/rocprim/type_traits_interface.hpp | 2 +-
.../include/rocprim/warp/detail/warp_scan_dpp.hpp | 2 +-
.../rocprim/warp/detail/warp_scan_shared_mem.hpp | 2 +-
.../rocprim/warp/detail/warp_scan_shuffle.hpp | 2 +-
rocprim/include/rocprim/warp/warp_scan.hpp | 4 +-
21 files changed, 97 insertions(+), 81 deletions(-)
diff --git a/rocprim/include/rocprim/block/block_adjacent_difference.hpp b/rocprim/include/rocprim/block/block_adjacent_difference.hpp
index 9591fcf..1f9a2ef 100644
--- a/rocprim/include/rocprim/block/block_adjacent_difference.hpp
+++ b/rocprim/include/rocprim/block/block_adjacent_difference.hpp
@@ -164,8 +164,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_left or block_discontinuity.flag_heads instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_left or block_discontinuity.flag_heads instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_heads(Flag (&head_flags)[ItemsPerThread],
const T (&input)[ItemsPerThread],
@@ -186,8 +186,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_left or block_discontinuity.flag_heads instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_left or block_discontinuity.flag_heads instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_heads(Flag (&head_flags)[ItemsPerThread],
const T (&input)[ItemsPerThread],
@@ -249,8 +249,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_left or block_discontinuity.flag_heads instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_left or block_discontinuity.flag_heads instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_heads(Flag (&head_flags)[ItemsPerThread],
T tile_predecessor_item,
@@ -273,8 +273,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_left or block_discontinuity.flag_heads instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_left or block_discontinuity.flag_heads instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_heads(Flag (&head_flags)[ItemsPerThread],
T tile_predecessor_item,
@@ -329,8 +329,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_right or block_discontinuity.flag_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_right or block_discontinuity.flag_tails instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_tails(Flag (&tail_flags)[ItemsPerThread],
const T (&input)[ItemsPerThread],
@@ -352,8 +352,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_right or block_discontinuity.flag_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_right or block_discontinuity.flag_tails instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_tails(Flag (&tail_flags)[ItemsPerThread],
const T (&input)[ItemsPerThread],
@@ -415,8 +415,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_right or block_discontinuity.flag_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_right or block_discontinuity.flag_tails instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_tails(Flag (&tail_flags)[ItemsPerThread],
T tile_successor_item,
@@ -439,8 +439,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use subtract_right or block_discontinuity.flag_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use subtract_right or block_discontinuity.flag_tails instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_tails(Flag (&tail_flags)[ItemsPerThread],
T tile_successor_item,
@@ -495,8 +495,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
Flag (&tail_flags)[ItemsPerThread],
@@ -532,8 +532,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
Flag (&tail_flags)[ItemsPerThread],
@@ -599,8 +599,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
Flag (&tail_flags)[ItemsPerThread],
@@ -637,8 +637,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
Flag (&tail_flags)[ItemsPerThread],
@@ -705,8 +705,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
T tile_predecessor_item,
@@ -743,8 +743,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
T tile_predecessor_item,
@@ -817,8 +817,8 @@ public:
/// }
/// \endcode
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
T tile_predecessor_item,
@@ -856,8 +856,8 @@ public:
/// part of the function itself. Note that this does NOT decrease the shared memory requirements
/// of a kernel using this function.
template<unsigned int ItemsPerThread, class Flag, class FlagOp>
- [[deprecated("The flags API of block_adjacent_difference is deprecated."
- "Use block_discontinuity.flag_heads_and_tails instead.")]]
+ ROCPRIM_DEPRECATED_WARNING("The flags API of block_adjacent_difference is deprecated."
+ "Use block_discontinuity.flag_heads_and_tails instead.")
ROCPRIM_DEVICE ROCPRIM_FORCE_INLINE
void flag_heads_and_tails(Flag (&head_flags)[ItemsPerThread],
T tile_predecessor_item,
diff --git a/rocprim/include/rocprim/config.hpp b/rocprim/include/rocprim/config.hpp
index 3b6d292..ee5f759 100644
--- a/rocprim/include/rocprim/config.hpp
+++ b/rocprim/include/rocprim/config.hpp
@@ -271,4 +271,20 @@
#define ROCPRIM_DETAIL_SUPPRESS_DEPRECATION_POP ROCPRIM_CLANG_SUPPRESS_WARNING_POP
#endif
+#ifndef ROCPRIM_NO_DEPRECATION_WARNINGS
+ #ifndef ROCPRIM_DEPRECATED_WARNING
+ #define ROCPRIM_DEPRECATED_WARNING(x) [[deprecated(x)]]
+ #endif
+ #ifndef ROCPRIM_DEPRECATED
+ #define ROCPRIM_DEPRECATED [[deprecated]]
+ #endif
+#else /* ROCPRIM_NO_DEPRECATION_WARNINGS */
+ #ifndef ROCPRIM_DEPRECATED_WARNING
+ #define ROCPRIM_DEPRECATED_WARNING(x)
+ #endif
+ #ifndef ROCPRIM_DEPRECATED
+ #define ROCPRIM_DEPRECATED
+ #endif
+#endif /* ROCPRIM_NO_DEPRECATION_WARNINGS */
+
#endif // ROCPRIM_CONFIG_HPP_
diff --git a/rocprim/include/rocprim/detail/match_result_type.hpp b/rocprim/include/rocprim/detail/match_result_type.hpp
index 40b9289..50c2795 100644
--- a/rocprim/include/rocprim/detail/match_result_type.hpp
+++ b/rocprim/include/rocprim/detail/match_result_type.hpp
@@ -33,15 +33,15 @@ namespace detail
{
template<class F, class... ArgTypes>
-using invoke_result [[deprecated("Use 'rocprim::invoke_result' instead!")]]
+using invoke_result ROCPRIM_DEPRECATED_WARNING("Use 'rocprim::invoke_result' instead!")
= rocprim::invoke_result<F, ArgTypes...>;
template<class InputType, class BinaryFunction>
-using match_result [[deprecated("Use 'rocprim::invoke_result_binary_op' instead!")]]
+using match_result ROCPRIM_DEPRECATED_WARNING("Use 'rocprim::invoke_result_binary_op' instead!")
= rocprim::invoke_result_binary_op<InputType, BinaryFunction>;
template<class InputType, class BinaryFunction>
-using match_result_type [[deprecated("Use 'rocprim::invoke_result_binary_op_t' instead!")]]
+using match_result_type ROCPRIM_DEPRECATED_WARNING("Use 'rocprim::invoke_result_binary_op_t' instead!")
= rocprim::invoke_result_binary_op_t<InputType, BinaryFunction>;
} // end namespace detail
diff --git a/rocprim/include/rocprim/detail/various.hpp b/rocprim/include/rocprim/detail/various.hpp
index a8dbfbf..752471a 100644
--- a/rocprim/include/rocprim/detail/various.hpp
+++ b/rocprim/include/rocprim/detail/various.hpp
@@ -189,8 +189,8 @@ struct match_fundamental_type
// A storage-backing wrapper that allows types with non-trivial constructors to be aliased in unions
template<typename T>
-struct [[deprecated("To store non default-constructible types in local memory, use "
- "rocprim::uninitialized_array instead")]] raw_storage
+struct ROCPRIM_DEPRECATED_WARNING("To store non default-constructible types in local memory, use "
+ "rocprim::uninitialized_array instead") raw_storage
{
// Biggest memory-access word that T is a whole multiple of and is not larger than the alignment of T
typedef typename detail::match_fundamental_type<T>::type device_word;
diff --git a/rocprim/include/rocprim/device/detail/lookback_scan_state.hpp b/rocprim/include/rocprim/device/detail/lookback_scan_state.hpp
index a6a2095..9937b27 100644
--- a/rocprim/include/rocprim/device/detail/lookback_scan_state.hpp
+++ b/rocprim/include/rocprim/device/detail/lookback_scan_state.hpp
@@ -214,9 +214,9 @@ public:
return hipSuccess;
}
- [[deprecated(
+ ROCPRIM_DEPRECATED_WARNING(
"Please use the overload returns an error code, this function assumes the default"
- " stream and silently ignores errors.")]] ROCPRIM_HOST static inline lookback_scan_state
+ " stream and silently ignores errors.") ROCPRIM_HOST static inline lookback_scan_state
create(void* temp_storage, const unsigned int number_of_blocks)
{
lookback_scan_state result;
@@ -236,8 +236,8 @@ public:
return error;
}
- [[deprecated("Please use the overload returns an error code, this function assumes the default"
- " stream and silently ignores errors.")]] ROCPRIM_HOST static inline size_t
+ ROCPRIM_DEPRECATED_WARNING("Please use the overload returns an error code, this function assumes the default"
+ " stream and silently ignores errors.") ROCPRIM_HOST static inline size_t
get_storage_size(const unsigned int number_of_blocks)
{
size_t result;
@@ -256,8 +256,8 @@ public:
return error;
}
- [[deprecated("Please use the overload returns an error code, this function assumes the default"
- " stream and silently ignores errors.")]] ROCPRIM_HOST static inline detail::
+ ROCPRIM_DEPRECATED_WARNING("Please use the overload returns an error code, this function assumes the default"
+ " stream and silently ignores errors.") ROCPRIM_HOST static inline detail::
temp_storage::layout
get_temp_storage_layout(const unsigned int number_of_blocks)
{
@@ -467,9 +467,9 @@ public:
return error;
}
- [[deprecated(
+ ROCPRIM_DEPRECATED_WARNING(
"Please use the overload returns an error code, this function assumes the default"
- " stream and silently ignores errors.")]] ROCPRIM_HOST static inline lookback_scan_state
+ " stream and silently ignores errors.") ROCPRIM_HOST static inline lookback_scan_state
create(void* temp_storage, const unsigned int number_of_blocks)
{
lookback_scan_state result;
@@ -491,8 +491,8 @@ public:
return error;
}
- [[deprecated("Please use the overload returns an error code, this function assumes the default"
- " stream and silently ignores errors.")]] ROCPRIM_HOST static inline size_t
+ ROCPRIM_DEPRECATED_WARNING("Please use the overload returns an error code, this function assumes the default"
+ " stream and silently ignores errors.") ROCPRIM_HOST static inline size_t
get_storage_size(const unsigned int number_of_blocks)
{
size_t result;
@@ -513,8 +513,8 @@ public:
return error;
}
- [[deprecated("Please use the overload returns an error code, this function assumes the default"
- " stream and silently ignores errors.")]] ROCPRIM_HOST static inline detail::
+ ROCPRIM_DEPRECATED_WARNING("Please use the overload returns an error code, this function assumes the default"
+ " stream and silently ignores errors.") ROCPRIM_HOST static inline detail::
temp_storage::layout
get_temp_storage_layout(const unsigned int number_of_blocks)
{
diff --git a/rocprim/include/rocprim/intrinsics/thread.hpp b/rocprim/include/rocprim/intrinsics/thread.hpp
index d5b273f..fbf8c70 100644
--- a/rocprim/include/rocprim/intrinsics/thread.hpp
+++ b/rocprim/include/rocprim/intrinsics/thread.hpp
@@ -39,8 +39,8 @@ BEGIN_ROCPRIM_NAMESPACE
/// It is constant for a device.
///
/// \warning This function will be removed in a future release.
-[[deprecated(
- "Use the functions provided in 'rocprim::arch::wavefront' instead.")]]
+ROCPRIM_DEPRECATED_WARNING(
+ "Use the functions provided in 'rocprim::arch::wavefront' instead.")
ROCPRIM_HOST_DEVICE
inline constexpr unsigned int warp_size()
{
@@ -53,8 +53,8 @@ inline constexpr unsigned int warp_size()
/// It is constant for a device.
///
/// \warning This function will be removed in a future release.
-[[deprecated("Use the functions provided in 'rocprim::arch::wavefront' "
- "instead.")]]
+ROCPRIM_DEPRECATED_WARNING("Use the functions provided in 'rocprim::arch::wavefront' "
+ "instead.")
ROCPRIM_DEVICE ROCPRIM_INLINE
constexpr unsigned int device_warp_size()
{
diff --git a/rocprim/include/rocprim/iterator/arg_index_iterator.hpp b/rocprim/include/rocprim/iterator/arg_index_iterator.hpp
index 5b96abb..4cfc92c 100644
--- a/rocprim/include/rocprim/iterator/arg_index_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/arg_index_iterator.hpp
@@ -208,7 +208,7 @@ public:
offset_ = 0;
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os,
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os,
const arg_index_iterator& /* iter */)
{
return os;
diff --git a/rocprim/include/rocprim/iterator/constant_iterator.hpp b/rocprim/include/rocprim/iterator/constant_iterator.hpp
index 468a565..3b6215c 100644
--- a/rocprim/include/rocprim/iterator/constant_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/constant_iterator.hpp
@@ -204,7 +204,7 @@ public:
return distance_to(other) <= 0;
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os, const constant_iterator& iter)
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os, const constant_iterator& iter)
{
os << "[" << iter.value_ << "]";
return os;
diff --git a/rocprim/include/rocprim/iterator/counting_iterator.hpp b/rocprim/include/rocprim/iterator/counting_iterator.hpp
index e8e02f5..b486b02 100644
--- a/rocprim/include/rocprim/iterator/counting_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/counting_iterator.hpp
@@ -207,7 +207,7 @@ public:
return distance_to(other) <= 0;
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os, const counting_iterator& iter)
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os, const counting_iterator& iter)
{
os << "[" << iter.value_ << "]";
return os;
diff --git a/rocprim/include/rocprim/iterator/discard_iterator.hpp b/rocprim/include/rocprim/iterator/discard_iterator.hpp
index 0cfae34..b62c09d 100644
--- a/rocprim/include/rocprim/iterator/discard_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/discard_iterator.hpp
@@ -202,7 +202,7 @@ public:
return index_ >= other.index_;
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os,
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os,
const discard_iterator& /* iter */)
{
return os;
diff --git a/rocprim/include/rocprim/iterator/texture_cache_iterator.hpp b/rocprim/include/rocprim/iterator/texture_cache_iterator.hpp
index 6e5c916..add34a4 100644
--- a/rocprim/include/rocprim/iterator/texture_cache_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/texture_cache_iterator.hpp
@@ -330,7 +330,7 @@ public:
return (ptr - other.ptr) <= 0;
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os,
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os,
const texture_cache_iterator& /* iter */)
{
return os;
diff --git a/rocprim/include/rocprim/iterator/transform_iterator.hpp b/rocprim/include/rocprim/iterator/transform_iterator.hpp
index 4f04eda..ff4aa3d 100644
--- a/rocprim/include/rocprim/iterator/transform_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/transform_iterator.hpp
@@ -206,7 +206,7 @@ public:
return iterator_ >= other.iterator_;
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os,
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os,
const transform_iterator& /* iter */)
{
return os;
diff --git a/rocprim/include/rocprim/iterator/zip_iterator.hpp b/rocprim/include/rocprim/iterator/zip_iterator.hpp
index 63acd5e..cb9e71f 100644
--- a/rocprim/include/rocprim/iterator/zip_iterator.hpp
+++ b/rocprim/include/rocprim/iterator/zip_iterator.hpp
@@ -283,7 +283,7 @@ public:
return !(*this < other);
}
- [[deprecated]] friend std::ostream& operator<<(std::ostream& os, const zip_iterator& /* iter */)
+ ROCPRIM_DEPRECATED friend std::ostream& operator<<(std::ostream& os, const zip_iterator& /* iter */)
{
return os;
}
diff --git a/rocprim/include/rocprim/thread/radix_key_codec.hpp b/rocprim/include/rocprim/thread/radix_key_codec.hpp
index 81ebe07..4071095 100644
--- a/rocprim/include/rocprim/thread/radix_key_codec.hpp
+++ b/rocprim/include/rocprim/thread/radix_key_codec.hpp
@@ -657,7 +657,7 @@ namespace detail
{
template<class Key, bool Descending = false>
-using radix_key_codec [[deprecated("radix_key_codec is now public API.")]]
+using radix_key_codec ROCPRIM_DEPRECATED_WARNING("radix_key_codec is now public API.")
= rocprim::radix_key_codec<Key, Descending>;
} // namespace detail
diff --git a/rocprim/include/rocprim/thread/thread_load.hpp b/rocprim/include/rocprim/thread/thread_load.hpp
index c29cf58..17348d3 100644
--- a/rocprim/include/rocprim/thread/thread_load.hpp
+++ b/rocprim/include/rocprim/thread/thread_load.hpp
@@ -140,7 +140,7 @@ ROCPRIM_ASM_THREAD_LOAD_GROUP(load_cs, "", "s_waitcnt", "");
/// \param itr [in] Iterator to location where data is to be stored
/// \return Data that is loaded from memory
template<cache_load_modifier MODIFIER = load_default, typename InputIteratorT>
-[[deprecated("Use a dereference instead.")]] ROCPRIM_DEVICE ROCPRIM_INLINE
+ROCPRIM_DEPRECATED_WARNING("Use a dereference instead.") ROCPRIM_DEVICE ROCPRIM_INLINE
typename std::iterator_traits<InputIteratorT>::value_type
thread_load(InputIteratorT itr)
{
@@ -155,7 +155,7 @@ template<cache_load_modifier MODIFIER = load_default, typename InputIteratorT>
/// \param ptr [in] - Pointer to data to be loaded
/// \return Data that is loaded from memory
template<cache_load_modifier MODIFIER = load_default, typename T>
-[[deprecated("Use a dereference instead.")]] ROCPRIM_DEVICE ROCPRIM_INLINE T thread_load(T* ptr)
+ROCPRIM_DEPRECATED_WARNING("Use a dereference instead.") ROCPRIM_DEVICE ROCPRIM_INLINE T thread_load(T* ptr)
{
return detail::AsmThreadLoad<MODIFIER, T>(ptr);
}
diff --git a/rocprim/include/rocprim/type_traits.hpp b/rocprim/include/rocprim/type_traits.hpp
index 2bed271..6dd2293 100644
--- a/rocprim/include/rocprim/type_traits.hpp
+++ b/rocprim/include/rocprim/type_traits.hpp
@@ -155,8 +155,8 @@ struct get_unsigned_bits_type<T, 16>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template<typename T, typename UnsignedBits>
-[[deprecated("TwiddleIn is deprecated."
- "Use radix_key_codec instead.")]] ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ROCPRIM_DEPRECATED_WARNING("TwiddleIn is deprecated."
+ "Use radix_key_codec instead.") ROCPRIM_DEVICE ROCPRIM_INLINE auto
TwiddleIn(UnsignedBits key) ->
typename std::enable_if<is_floating_point<T>::value, UnsignedBits>::type
{
@@ -166,8 +166,8 @@ template<typename T, typename UnsignedBits>
}
template<typename T, typename UnsignedBits>
-[[deprecated("TwiddleIn is deprecated."
- "Use radix_key_codec instead.")]] static ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ROCPRIM_DEPRECATED_WARNING("TwiddleIn is deprecated."
+ "Use radix_key_codec instead.") static ROCPRIM_DEVICE ROCPRIM_INLINE auto
TwiddleIn(UnsignedBits key) ->
typename std::enable_if<is_unsigned<T>::value, UnsignedBits>::type
{
@@ -175,8 +175,8 @@ template<typename T, typename UnsignedBits>
};
template<typename T, typename UnsignedBits>
-[[deprecated("TwiddleIn is deprecated."
- "Use radix_key_codec instead.")]] static ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ROCPRIM_DEPRECATED_WARNING("TwiddleIn is deprecated."
+ "Use radix_key_codec instead.") static ROCPRIM_DEVICE ROCPRIM_INLINE auto
TwiddleIn(UnsignedBits key) ->
typename std::enable_if<is_integral<T>::value && is_signed<T>::value, UnsignedBits>::type
{
@@ -185,8 +185,8 @@ template<typename T, typename UnsignedBits>
};
template<typename T, typename UnsignedBits>
-[[deprecated("TwiddleOut is deprecated."
- "Use radix_key_codec instead.")]] ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ROCPRIM_DEPRECATED_WARNING("TwiddleOut is deprecated."
+ "Use radix_key_codec instead.") ROCPRIM_DEVICE ROCPRIM_INLINE auto
TwiddleOut(UnsignedBits key) ->
typename std::enable_if<is_floating_point<T>::value, UnsignedBits>::type
{
@@ -196,8 +196,8 @@ template<typename T, typename UnsignedBits>
}
template<typename T, typename UnsignedBits>
-[[deprecated("TwiddleOut is deprecated."
- "Use radix_key_codec instead.")]] static ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ROCPRIM_DEPRECATED_WARNING("TwiddleOut is deprecated."
+ "Use radix_key_codec instead.") static ROCPRIM_DEVICE ROCPRIM_INLINE auto
TwiddleOut(UnsignedBits key) ->
typename std::enable_if<is_unsigned<T>::value, UnsignedBits>::type
{
@@ -205,8 +205,8 @@ template<typename T, typename UnsignedBits>
};
template<typename T, typename UnsignedBits>
-[[deprecated("TwiddleOut is deprecated."
- "Use radix_key_codec instead.")]] static ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ROCPRIM_DEPRECATED_WARNING("TwiddleOut is deprecated."
+ "Use radix_key_codec instead.") static ROCPRIM_DEVICE ROCPRIM_INLINE auto
TwiddleOut(UnsignedBits key) ->
typename std::enable_if<is_integral<T>::value && is_signed<T>::value, UnsignedBits>::type
{
diff --git a/rocprim/include/rocprim/type_traits_interface.hpp b/rocprim/include/rocprim/type_traits_interface.hpp
index 25eccc6..79458b6 100644
--- a/rocprim/include/rocprim/type_traits_interface.hpp
+++ b/rocprim/include/rocprim/type_traits_interface.hpp
@@ -55,7 +55,7 @@ template<class...>
using void_t = void;
template<class Key>
-struct [[deprecated]] float_bit_mask;
+struct ROCPRIM_DEPRECATED float_bit_mask;
} // namespace detail
diff --git a/rocprim/include/rocprim/warp/detail/warp_scan_dpp.hpp b/rocprim/include/rocprim/warp/detail/warp_scan_dpp.hpp
index ea22091..2a52cdb 100644
--- a/rocprim/include/rocprim/warp/detail/warp_scan_dpp.hpp
+++ b/rocprim/include/rocprim/warp/detail/warp_scan_dpp.hpp
@@ -245,7 +245,7 @@ public:
}
protected:
- [[deprecated]] ROCPRIM_DEVICE ROCPRIM_INLINE void
+ ROCPRIM_DEPRECATED ROCPRIM_DEVICE ROCPRIM_INLINE void
to_exclusive(T inclusive_input, T& exclusive_output, storage_type& storage)
{
(void) storage;
diff --git a/rocprim/include/rocprim/warp/detail/warp_scan_shared_mem.hpp b/rocprim/include/rocprim/warp/detail/warp_scan_shared_mem.hpp
index d130058..e97d185 100644
--- a/rocprim/include/rocprim/warp/detail/warp_scan_shared_mem.hpp
+++ b/rocprim/include/rocprim/warp/detail/warp_scan_shared_mem.hpp
@@ -169,7 +169,7 @@ public:
}
protected:
- [[deprecated]] ROCPRIM_DEVICE ROCPRIM_INLINE void
+ ROCPRIM_DEPRECATED ROCPRIM_DEVICE ROCPRIM_INLINE void
to_exclusive(T inclusive_input, T& exclusive_output, storage_type& storage)
{
(void) inclusive_input;
diff --git a/rocprim/include/rocprim/warp/detail/warp_scan_shuffle.hpp b/rocprim/include/rocprim/warp/detail/warp_scan_shuffle.hpp
index 106888c..42efe5c 100644
--- a/rocprim/include/rocprim/warp/detail/warp_scan_shuffle.hpp
+++ b/rocprim/include/rocprim/warp/detail/warp_scan_shuffle.hpp
@@ -209,7 +209,7 @@ public:
}
protected:
- [[deprecated]] ROCPRIM_DEVICE ROCPRIM_INLINE void
+ ROCPRIM_DEPRECATED ROCPRIM_DEVICE ROCPRIM_INLINE void
to_exclusive(T inclusive_input, T& exclusive_output, storage_type& storage)
{
(void) storage;
diff --git a/rocprim/include/rocprim/warp/warp_scan.hpp b/rocprim/include/rocprim/warp/warp_scan.hpp
index ea484f4..90d5b82 100644
--- a/rocprim/include/rocprim/warp/warp_scan.hpp
+++ b/rocprim/include/rocprim/warp/warp_scan.hpp
@@ -696,7 +696,7 @@ public:
protected:
// These undocumented functions are used by hipCUB prior to version 3.1
template<unsigned int FunctionWarpSize = WarpSize>
- [[deprecated]] ROCPRIM_DEVICE ROCPRIM_INLINE auto
+ ROCPRIM_DEPRECATED ROCPRIM_DEVICE ROCPRIM_INLINE auto
to_exclusive(T inclusive_input, T& exclusive_output, storage_type& storage) ->
typename std::enable_if<(FunctionWarpSize <= arch::wavefront::min_size()), void>::type
{
@@ -704,7 +704,7 @@ protected:
}
template<unsigned int FunctionWarpSize = WarpSize>
- [[deprecated]] ROCPRIM_DEVICE ROCPRIM_INLINE auto to_exclusive(T, T&, storage_type&) ->
+ ROCPRIM_DEPRECATED ROCPRIM_DEVICE ROCPRIM_INLINE auto to_exclusive(T, T&, storage_type&) ->
typename std::enable_if<(FunctionWarpSize > arch::wavefront::min_size()), void>::type
{
ROCPRIM_PRINT_ERROR_ONCE("Specified warp size exceeds current hardware supported warp size. Aborting warp sort.");
|