Skip to content

Commit

Permalink
debug types
Browse files Browse the repository at this point in the history
  • Loading branch information
elstehle committed Jan 11, 2025
1 parent f5a8fbc commit 0400592
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions cub/cub/device/dispatch/dispatch_segmented_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ using per_invocation_segment_offset_t = int;
// Type used for total number of segments and to index within segments globally
using global_segment_offset_t = int;

template<typename ValT, typename RefT, typename Base, typename Deref>
void foo(Base base, Deref deref)
{
static_assert(std::is_same<ValT, void>::value, "Debug.");
}

template <typename T>
struct DereferenceHelper {
using type = decltype(*std::declval<T>().base());
Expand All @@ -91,17 +97,15 @@ class OffsetIteratorT
Iterator,
THRUST_NS_QUALIFIER::use_default,
THRUST_NS_QUALIFIER::any_system_tag,
THRUST_NS_QUALIFIER::random_access_traversal_tag,
typename ::cuda::std::iterator_traits<Iterator>::value_type>
THRUST_NS_QUALIFIER::random_access_traversal_tag>
{
public:
using super_t =
THRUST_NS_QUALIFIER::iterator_adaptor<OffsetIteratorT<Iterator, OffsetItT>,
Iterator,
THRUST_NS_QUALIFIER::use_default,
THRUST_NS_QUALIFIER::any_system_tag,
THRUST_NS_QUALIFIER::random_access_traversal_tag,
typename ::cuda::std::iterator_traits<Iterator>::value_type>;
THRUST_NS_QUALIFIER::random_access_traversal_tag>;

OffsetIteratorT() = default;

Expand All @@ -120,7 +124,9 @@ private:

_CCCL_HOST_DEVICE _CCCL_FORCEINLINE typename ::cuda::std::iterator_traits<Iterator>::value_type dereference() const
{
return *(it + static_cast<typename super_t::difference_type>(*offset_it));
foo<typename super_t::reference, typename super_t::value_type>(*this->base(), *it);
// return *(it + static_cast<typename super_t::difference_type>(*offset_it));
return *it;
}
};

Expand Down

0 comments on commit 0400592

Please sign in to comment.