This source code was originally written to support the conclusions of an article published in March 2018 on the Journal of parallel and Distributed Co

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-11-15 01:00:07

This source code was originally written to support the conclusions of an article published in March 2018 on the Journal of parallel and Distributed Computing. It demonstrates and test various fast vectorizable algorithms for searching for the insertion point in a sorted vector of floating point numbers. This includes several variations of binary search, including the well known lower_bound implemented in the STL, ternary, pentary and nonary search, and a new search method with complexity O(1). The article is available on elsevier and a preprint draft is available on arxiv. The abstract section is copied here below.

Since then the code has been refactored to be usable as a header-only library. It is very easy to use the library, it only takes a few lines of code. Just include BinSearch.h, instantiate an engine and use it.

A C and a Fortran simple API with external memory management are also available. They only allow to use a small subset of the features in the library and have been designed specifically to support inclusion of these features in the NAG library (nag routine m01ndc).

Leave a Comment