Skip to content

Commit

Permalink
Add CustomMin auxilary snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
gonidelis committed Mar 11, 2024
1 parent d21af18 commit 868d50c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cub/cub/device/device_segmented_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,12 @@ public:
//! .. literalinclude:: ../../test/catch2_test_device_segmented_reduce_api.cu
//! :language: c++
//! :dedent:
//! :start-after: example-begin segmented-reduce-custommin
//! :end-before: example-end segmented-reduce-custommin
//!
//! .. literalinclude:: ../../test/catch2_test_device_segmented_reduce_api.cu
//! :language: c++
//! :dedent:
//! :start-after: example-begin segmented-reduce-min
//! :end-before: example-end segmented-reduce-min
//!
Expand Down
3 changes: 3 additions & 0 deletions cub/test/catch2_test_device_segmented_reduce_api.cu
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "catch2_test_helper.h"
#include "thrust/detail/raw_pointer_cast.h"

// example-begin segmented-reduce-custommin
struct CustomMin
{
template <typename T>
Expand All @@ -45,6 +46,8 @@ struct CustomMin
}
};

// example-end segmented-reduce-custommin

struct is_equal
{
__device__ bool operator()(cub::KeyValuePair<int, int> lhs, cub::KeyValuePair<int, int> rhs)
Expand Down

0 comments on commit 868d50c

Please sign in to comment.