@@ -590,6 +590,34 @@ class static_set {
590590 OutputIt output_begin,
591591 cuda::stream_ref stream = {}) const ;
592592
593+ /* *
594+ * @brief For all keys in the range `[first, last)`, asynchronously finds an element with key
595+ * equivalent to the query key.
596+ *
597+ * @note If the key `*(first + i)` has a matched `element` in the set, copies `element` to
598+ * `(output_begin + i)`. Else, copies the empty key sentinel.
599+ *
600+ * @tparam InputIt Device accessible input iterator
601+ * @tparam ProbeEqual Binary callable equal type
602+ * @tparam ProbeHash Unary callable hasher type that can be constructed from
603+ * an integer value
604+ * @tparam OutputIt Device accessible output iterator assignable from the set's `key_type`
605+ *
606+ * @param first Beginning of the sequence of keys
607+ * @param last End of the sequence of keys
608+ * @param probe_equal The binary function to compare set keys and probe keys for equality
609+ * @param probe_hash The unary function to hash probe keys
610+ * @param output_begin Beginning of the sequence of elements retrieved for each key
611+ * @param stream Stream used for executing the kernels
612+ */
613+ template <typename InputIt, typename ProbeEqual, typename ProbeHash, typename OutputIt>
614+ void find_async (InputIt first,
615+ InputIt last,
616+ ProbeEqual const & probe_equal,
617+ ProbeHash const & probe_hash,
618+ OutputIt output_begin,
619+ cuda::stream_ref stream = {}) const ;
620+
593621 /* *
594622 * @brief For all keys in the range `[first, last)`, finds a match with its key equivalent to the
595623 * query key.
@@ -654,6 +682,49 @@ class static_set {
654682 OutputIt output_begin,
655683 cuda::stream_ref stream = {}) const ;
656684
685+ /* *
686+ * @brief For all keys in the range `[first, last)`, asynchronously finds
687+ * a match with its key equivalent to the query key.
688+ *
689+ * @note If `pred( *(stencil + i) )` is true, stores the payload of the
690+ * matched key or the `empty_value_sentienl` to `(output_begin + i)`. If `pred( *(stencil + i) )`
691+ * is false, always stores the `empty_value_sentienl` to `(output_begin + i)`.
692+ *
693+ * @tparam InputIt Device accessible input iterator
694+ * @tparam StencilIt Device accessible random access iterator whose `value_type` is convertible to
695+ * Predicate's argument type
696+ * @tparam Predicate Unary predicate callable whose return type must be convertible to `bool` and
697+ * argument type is convertible from <tt>std::iterator_traits<StencilIt>::value_type</tt>
698+ * @tparam ProbeEqual Binary callable equal type
699+ * @tparam ProbeHash Unary callable hasher type that can be constructed from
700+ * an integer value
701+ * @tparam OutputIt Device accessible output iterator
702+ *
703+ * @param first Beginning of the sequence of keys
704+ * @param last End of the sequence of keys
705+ * @param stencil Beginning of the stencil sequence
706+ * @param pred Predicate to test on every element in the range `[stencil, stencil +
707+ * std::distance(first, last))`
708+ * @param probe_equal The binary function to compare set keys and probe keys for equality
709+ * @param probe_hash The unary function to hash probe keys
710+ * @param output_begin Beginning of the sequence of matches retrieved for each key
711+ * @param stream Stream used for executing the kernels
712+ */
713+ template <typename InputIt,
714+ typename StencilIt,
715+ typename Predicate,
716+ typename ProbeEqual,
717+ typename ProbeHash,
718+ typename OutputIt>
719+ void find_if_async (InputIt first,
720+ InputIt last,
721+ StencilIt stencil,
722+ Predicate pred,
723+ ProbeEqual const & probe_equal,
724+ ProbeHash const & probe_hash,
725+ OutputIt output_begin,
726+ cuda::stream_ref stream = {}) const ;
727+
657728 /* *
658729 * @brief Applies the given function object `callback_op` to the copy of every filled slot in the
659730 * container
0 commit comments