Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add host-bulk for_each for static_map #565

Merged
merged 23 commits into from
Aug 13, 2024
Merged

Conversation

srinivasyadav18
Copy link
Contributor

This PR adds two overloads of host-bulk for_each API for static_map.

  1. for_each(Callback callback_op)
    executes callback_op on every filled element in the map.

  2. for_each(InputIt first, IntputIt last, CallbackOp callback_op)
    executes callback_op on every matched slot with key equals to a key from the input sequence.

Copy link

copy-pr-bot bot commented Jul 29, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@sleeepyjack
Copy link
Collaborator

/ok to test

@PointKernel PointKernel added topic: static_map Issue related to the static_map type: feature request New feature request Needs Review Awaiting reviews before merging labels Jul 30, 2024
@sleeepyjack
Copy link
Collaborator

/ok to test

Copy link
Collaborator

@sleeepyjack sleeepyjack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from the missing deallocate(tmp)

@PointKernel
Copy link
Member

This PR adds two overloads of host-bulk for_each API for static_map.

  1. for_each(Callback callback_op)
    executes callback_op on every filled element in the map.
  2. for_each(InputIt first, IntputIt last, CallbackOp callback_op)
    executes callback_op on every matched slot with key equals to a key from the input sequence.

With the first overload no longer desired by libcudf, shall we remove it from the current PR?

@sleeepyjack
Copy link
Collaborator

@PointKernel the first overload was requested (or better proposed by me) in this thread (NV internal): https://nvidia.enterprise.slack.com/archives/CRJDZ0SKG/p1721975163922999

I think this overload is useful in general as it enables functionality similar to the begin/end iterators in STL containers.

@PointKernel
Copy link
Member

/ok to test

@sleeepyjack
Copy link
Collaborator

/ok to test

@PointKernel
Copy link
Member

/ok to test

@PointKernel
Copy link
Member

/ok to test

@PointKernel
Copy link
Member

/ok to test

@sleeepyjack sleeepyjack merged commit 118fd1f into NVIDIA:dev Aug 13, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review Awaiting reviews before merging topic: static_map Issue related to the static_map type: feature request New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants