key_store.cuh#

namespace cugraph
template<typename key_t, bool use_binary_search = true>
class key_store_t

Public Types

using key_type = key_t#

Public Functions

inline key_store_t(rmm::cuda_stream_view stream)#
template<bool binary_search = use_binary_search>
inline key_store_t(
size_t capacity,
key_t invalid_key,
rmm::cuda_stream_view stream,
std::enable_if_t<!binary_search, int32_t> = 0
)#
template<typename KeyIterator, bool binary_search = use_binary_search>
inline key_store_t(
KeyIterator key_first,
KeyIterator key_last,
bool key_sorted,
rmm::cuda_stream_view stream,
std::enable_if_t<binary_search, int32_t> = 0
)#
template<typename KeyIterator, bool binary_search = use_binary_search>
inline key_store_t(
KeyIterator key_first,
KeyIterator key_last,
key_t invalid_key,
rmm::cuda_stream_view stream,
std::enable_if_t<!binary_search, int32_t> = 0
)#
template<bool binary_search = use_binary_search>
inline key_store_t(
rmm::device_uvector<key_t> &&keys,
bool key_sorted,
rmm::cuda_stream_view stream,
std::enable_if_t<binary_search, int32_t> = 0
)#
template<typename KeyIterator, bool binary_search = use_binary_search>
inline std::enable_if_t<!binary_search, void> insert(
KeyIterator key_first,
KeyIterator key_last,
rmm::cuda_stream_view stream
)#
template<typename KeyIterator, typename StencilIterator, typename PredOp, bool binary_search = use_binary_search>
inline std::enable_if_t<!binary_search, void> insert_if(
KeyIterator key_first,
KeyIterator key_last,
StencilIterator stencil_first,
PredOp pred_op,
rmm::cuda_stream_view stream
)#
inline auto release(rmm::cuda_stream_view stream)#
inline auto view() const#
template<bool binary_search = use_binary_search>
inline std::enable_if_t<!binary_search, key_t> invalid_key(
) const#
inline size_t size() const#
inline size_t capacity() const#

Private Members

std::conditional_t<use_binary_search, detail::key_binary_search_store_t<key_t>, detail::key_cuco_store_t<key_t>> store_#
namespace detail

Typedefs

typedef cuco::storage<1> cuco_storage_type

cuco window storage type

template<typename KeyIterator>
struct key_binary_search_contains_op_t

Public Types

using key_type = typename thrust::iterator_traits<KeyIterator>::value_type#

Public Functions

inline __device__ bool operator() (key_type key) const

Public Members

KeyIterator store_key_first = {}#
KeyIterator store_key_last = {}#
template<typename ViewType>
struct key_binary_search_store_device_view_t

Public Types

using key_type = typename ViewType::key_type#

Public Functions

inline __host__ key_binary_search_store_device_view_t(ViewType view)#
inline __device__ bool contains (key_type key) const

Public Members

ViewType::key_iterator store_key_first = {}#
ViewType::key_iterator store_key_last = {}#
template<typename key_t>
class key_binary_search_store_t

Public Types

using key_type = key_t#

Public Functions

inline key_binary_search_store_t(rmm::cuda_stream_view stream)#
template<typename KeyIterator>
inline key_binary_search_store_t(
KeyIterator key_first,
KeyIterator key_last,
bool key_sorted,
rmm::cuda_stream_view stream
)#
inline key_binary_search_store_t(
rmm::device_uvector<key_t> &&keys,
bool key_sorted,
rmm::cuda_stream_view stream
)#
inline auto release(rmm::cuda_stream_view stream)#
inline key_t const *store_key_first() const#
inline key_t const *store_key_last() const#
inline size_t size() const#
inline size_t capacity() const#

Private Members

rmm::device_uvector<key_t> store_keys_#
template<typename KeyIterator>
class key_binary_search_store_view_t

Public Types

using key_type = std::remove_cv_t<typename thrust::iterator_traits<KeyIterator>::value_type>#
using key_iterator = KeyIterator#

Public Functions

inline key_binary_search_store_view_t(
KeyIterator key_first,
KeyIterator key_last
)#
template<typename QueryKeyIterator, typename ResultValueIterator>
inline void contains(
QueryKeyIterator key_first,
QueryKeyIterator key_last,
ResultValueIterator value_first,
rmm::cuda_stream_view stream
) const#
inline KeyIterator store_key_first() const#
inline KeyIterator store_key_last() const#

Public Static Attributes

static bool binary_search = true#

Private Members

KeyIterator store_key_first_ = {}#
KeyIterator store_key_last_ = {}#
template<typename ViewType>
struct key_cuco_store_contains_device_view_t

Public Types

using key_type = typename ViewType::key_type#
using cuco_store_device_ref_type = typename ViewType::cuco_set_type::ref_type<cuco::contains_tag>#

Public Functions

inline __host__ key_cuco_store_contains_device_view_t(ViewType view)#
inline __device__ bool contains (key_type key) const

Public Members

cuco_store_device_ref_type cuco_store_device_ref = {}#
template<typename ViewType>
struct key_cuco_store_insert_device_view_t

Public Types

using key_type = typename ViewType::key_type#
using cuco_store_device_ref_type = typename ViewType::cuco_set_type::ref_type<cuco::insert_tag>#

Public Functions

inline __host__ key_cuco_store_insert_device_view_t(ViewType view)#
inline __device__ void insert (key_type key)

Public Members

cuco_store_device_ref_type cuco_store_device_ref = {}#
template<typename key_t>
class key_cuco_store_t

Public Types

using key_type = key_t#
using cuco_set_type = cuco::static_set<key_t, cuco::extent<std::size_t>, cuda::thread_scope_device, cuda::std::equal_to<key_t>, cuco::linear_probing<1, cuco::murmurhash3_32<key_t>>, rmm::mr::polymorphic_allocator<std::byte>, cuco_storage_type>#

Public Functions

inline key_cuco_store_t(rmm::cuda_stream_view stream)#
inline key_cuco_store_t(
size_t capacity,
key_t invalid_key,
rmm::cuda_stream_view stream
)#
template<typename KeyIterator>
inline key_cuco_store_t(
KeyIterator key_first,
KeyIterator key_last,
key_t invalid_key,
rmm::cuda_stream_view stream
)#
template<typename KeyIterator>
inline void insert(
KeyIterator key_first,
KeyIterator key_last,
rmm::cuda_stream_view stream
)#
template<typename KeyIterator, typename StencilIterator, typename PredOp>
inline void insert_if(
KeyIterator key_first,
KeyIterator key_last,
StencilIterator stencil_first,
PredOp pred_op,
rmm::cuda_stream_view stream
)#
inline auto release(rmm::cuda_stream_view stream)#
inline cuco_set_type const *cuco_store_ptr() const#
inline key_t invalid_key() const#
inline size_t size() const#
inline size_t capacity() const#

Private Functions

inline void allocate(
size_t num_keys,
key_t invalid_key,
rmm::cuda_stream_view stream
)#

Private Members

std::unique_ptr<cuco_set_type> cuco_store_ = {nullptr}#
size_t capacity_ = {0}#
size_t size_ = {0}#
template<typename key_t>
class key_cuco_store_view_t

Public Types

using key_type = key_t#
using cuco_set_type = cuco::static_set<key_t, cuco::extent<std::size_t>, cuda::thread_scope_device, cuda::std::equal_to<key_t>, cuco::linear_probing<1, cuco::murmurhash3_32<key_t>>, rmm::mr::polymorphic_allocator<std::byte>, cuco_storage_type>#

Public Functions

inline key_cuco_store_view_t(cuco_set_type const *store)#
template<typename QueryKeyIterator, typename ResultValueIterator>
inline void contains(
QueryKeyIterator key_first,
QueryKeyIterator key_last,
ResultValueIterator value_first,
rmm::cuda_stream_view stream
) const#
inline auto cuco_store_contains_device_ref() const#
inline auto cuco_store_insert_device_ref() const#
inline key_t invalid_key() const#

Public Static Attributes

static bool binary_search = false#

Private Members

cuco_set_type const *cuco_store_ = {}#