Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[ENHANCEMENT]: Add hasher/comparator adaptor to better support mapping table use case

Đang mở
#476 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@njones93531 đang làm issue này rồi.

Từ ngày 3/6/2024.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
50/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
data

Hướng nghiên cứu

Bắt đầu với include/cuco/utility/mapping_table.cuh và so sánh cách sử dụng mapping_table_example.cu hiện tại. Xem xét các câu hỏi về cách đặt tên cùng với các quy ước utility hiện có, sau đó cập nhật ví dụ và liên kết godbolt trong README. Hoàn thành khi cả hai adaptor đều được cung cấp và cả ba mục TODO đều được xử lý.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

good first issue P2: Nice to have type: improvement
Is your feature request related to a problem? Please describe.

Many hash-based implementations rely on the mapping table method to handle large keys/values that are expensive to copy or move around. Every time users need to write the mapping table hasher/key_equal adaptors on their own, they shouldn't have to.

Describe the solution you'd like

As proposed by @esoha-nvidia, to better serve all users in this scenario, cuco could provide two handy utilities to the user:

  1. mapping_table_hash wrapper constructed from a span (a pointer to the beginning of the original data and a size) and the original hasher
  2. mapping_table_key_eq wrapper constructed from a span and the original key comparator

TODO:

  • Add two utilities (probably in include/cuco/utility/mapping_table.cuh)
  • Update the example accordingly
  • Update godbolt link in README
Describe alternatives you've considered

Seeking help for better naming

  • Is the mapping_table_ prefix descriptive enough? Any other suggestions?
  • STL also use pred/predicate to refer to key comparators but I found mapping_table_key_pred/mapping_table_pred can be misleading since we support conditional operations like insert_if and contains_if where the condition is also named as predicate
  • mapping_table_equal good enough? key_eq is the STL canonical but the _eq abbreviation is ambiguous.
Ngôn ngữ chính
Cuda
Star
671
Fork
122
Merge trung bình
4 ngày 19 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuCollections

Tất cả issue của NVIDIA/cuCollections

Issue tương tự

Thêm issue về Data Engineering

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.