Functions | |
static const unsigned int * | optimized_lower_bound (const unsigned int *first, const unsigned int *last, const unsigned int &val) |
unsigned int | get_column_index_from_iterator (const unsigned int i) |
template<typename value > | |
unsigned int | get_column_index_from_iterator (const std::pair< unsigned int, value > &i) |
template<typename value > | |
unsigned int | get_column_index_from_iterator (const std::pair< const unsigned int, value > &i) |
static const unsigned int* internals::SparsityPatternTools::optimized_lower_bound | ( | const unsigned int * | first, | |
const unsigned int * | last, | |||
const unsigned int & | val | |||
) | [inline, static] |
Optimized replacement for std::lower_bound
for searching within the range of column indices. Slashes execution time by approximately one half for the present application, partly because we have eliminated templates and the compiler seems to be able to optimize better, and partly because the binary search is replaced by a linear search for small loop lengths.
References Assert.
unsigned int internals::SparsityPatternTools::get_column_index_from_iterator | ( | const unsigned int | i | ) |
Helper function to get the column index from a dereferenced iterator in the copy_from() function, if the inner iterator type points to plain unsigned integers.
unsigned int internals::SparsityPatternTools::get_column_index_from_iterator | ( | const std::pair< unsigned int, value > & | i | ) | [inline] |
Helper function to get the column index from a dereferenced iterator in the copy_from() function, if the inner iterator type points to pairs of unsigned integers and some other value.