@@ -767,6 +767,70 @@ class static_map {
767767 OutputIt output_begin,
768768 cuda::stream_ref stream = {}) const ;
769769
770+ /* *
771+ * @brief For all keys in the range `[first, last)`, finds a match with its key equivalent to the
772+ * query key.
773+ *
774+ * @note If `pred( *(stencil + i) )` is true, stores the payload of the
775+ * matched key or the `empty_value_sentienl` to `(output_begin + i)`. If `pred( *(stencil + i) )`
776+ * is false, always stores the `empty_value_sentienl` to `(output_begin + i)`.
777+ * @note This function synchronizes the given stream. For asynchronous execution use
778+ * `find_if_async`.
779+ *
780+ * @tparam InputIt Device accessible input iterator
781+ * @tparam StencilIt Device accessible random access iterator whose `value_type` is convertible to
782+ * Predicate's argument type
783+ * @tparam Predicate Unary predicate callable whose return type must be convertible to `bool` and
784+ * argument type is convertible from <tt>std::iterator_traits<StencilIt>::value_type</tt>
785+ * @tparam OutputIt Device accessible output iterator
786+ *
787+ * @param first Beginning of the sequence of keys
788+ * @param last End of the sequence of keys
789+ * @param stencil Beginning of the stencil sequence
790+ * @param pred Predicate to test on every element in the range `[stencil, stencil +
791+ * std::distance(first, last))`
792+ * @param output_begin Beginning of the sequence of matches retrieved for each key
793+ * @param stream Stream used for executing the kernels
794+ */
795+ template <typename InputIt, typename StencilIt, typename Predicate, typename OutputIt>
796+ void find_if (InputIt first,
797+ InputIt last,
798+ StencilIt stencil,
799+ Predicate pred,
800+ OutputIt output_begin,
801+ cuda::stream_ref stream = {}) const ;
802+
803+ /* *
804+ * @brief For all keys in the range `[first, last)`, asynchronously finds
805+ * a match with its key equivalent to the query key.
806+ *
807+ * @note If `pred( *(stencil + i) )` is true, stores the payload of the
808+ * matched key or the `empty_value_sentienl` to `(output_begin + i)`. If `pred( *(stencil + i) )`
809+ * is false, always stores the `empty_value_sentienl` to `(output_begin + i)`.
810+ *
811+ * @tparam InputIt Device accessible input iterator
812+ * @tparam StencilIt Device accessible random access iterator whose `value_type` is convertible to
813+ * Predicate's argument type
814+ * @tparam Predicate Unary predicate callable whose return type must be convertible to `bool` and
815+ * argument type is convertible from <tt>std::iterator_traits<StencilIt>::value_type</tt>
816+ * @tparam OutputIt Device accessible output iterator
817+ *
818+ * @param first Beginning of the sequence of keys
819+ * @param last End of the sequence of keys
820+ * @param stencil Beginning of the stencil sequence
821+ * @param pred Predicate to test on every element in the range `[stencil, stencil +
822+ * std::distance(first, last))`
823+ * @param output_begin Beginning of the sequence of matches retrieved for each key
824+ * @param stream Stream used for executing the kernels
825+ */
826+ template <typename InputIt, typename StencilIt, typename Predicate, typename OutputIt>
827+ void find_if_async (InputIt first,
828+ InputIt last,
829+ StencilIt stencil,
830+ Predicate pred,
831+ OutputIt output_begin,
832+ cuda::stream_ref stream = {}) const ;
833+
770834 /* *
771835 * @brief Applies the given function object `callback_op` to the copy of every filled slot in the
772836 * container
0 commit comments