Skip to main content
Ctrl+K
ROCm Documentation is transitioning to this site. For the legacy documentation, please visit docs.amd.com. For more information or to provide feedback about this documentation transition, please see our announcement.
AMD Logo
ROCm™ Platform
  • GitHub
  • Community
  • AMD Lab Notes
  • Infinity Hub
  • Support
  • Feedback

ROCm Documentation Home

rocPRIM Documentation

  • Introduction
  • Summary of the Operations
  • Device-Wide Operations
    • Configuring the Kernels
    • Transform
    • Unique
    • Sort
    • Merge
    • Partition
    • Run Length Encode
    • Scan
    • Select
    • Reduce
    • Adjacent difference
    • Binary Search
    • Histogram
  • Block-Wide Operations
    • Operation classes
      • Load
      • Store
      • Adjacent difference
      • Discontinuity
      • Scan
      • Reduce
      • Shuffle
      • Exchange
      • Sort
      • Histogram
    • Data movement functions
  • Warp-Level Operations
    • Load
    • Store
    • Reduce
    • Scan
    • Sort
    • Shuffle
    • Exchange
  • Thread-Level Operations (Utilities)
  • Iterators
  • Intrinsics
  • Glossary
  • Device-Wide Operations
  • Binary Search

Binary Search

Binary Search#

template<class Config = default_config, class HaystackIterator, class NeedlesIterator, class OutputIterator, class CompareFunction = ::rocprim::less<>>
inline hipError_t rocprim::binary_search(void *temporary_storage, size_t &storage_size, HaystackIterator haystack, NeedlesIterator needles, OutputIterator output, size_t haystack_size, size_t needles_size, CompareFunction compare_op = CompareFunction(), hipStream_t stream = 0, bool debug_synchronous = false)#

previous

Adjacent difference

next

Histogram

  • Terms and Conditions
  • ROCm Licenses and Disclaimers
  • Privacy
  • Trademarks
  • Statement on Forced Labor
  • Fair and Open Competition
  • UK Tax Strategy
  • Cookie Policy
  • Cookie Settings
© 2023 Advanced Micro Devices, Inc