Dendro  5.01
Dendro in Greek language means tree. The Dendro library is a large scale (262K cores on ORNL's Titan) distributed memory adaptive octree framework. The main goal of Dendro is to perform large scale multiphysics simulations efficeiently in mordern supercomputers. Dendro consists of efficient parallel data structures and algorithms to perform variational ( finite element) methods and finite difference mthods on 2:1 balanced arbitary adaptive octrees which enables the users to perform simulations raning from black holes (binary black hole mergers) to blood flow in human body, where applications ranging from relativity, astrophysics to biomedical engineering.
seqUtils.h
Go to the documentation of this file.
1 
11 #ifndef __SEQ_UTILS_H_
12 #define __SEQ_UTILS_H_
13 
14 #include <vector>
15 
22 namespace seq {
23 
43  template <typename T> void flashsort(T* a, int n, int m, int *ctr);
44 
45 
55  template <typename T>
56  bool BinarySearch(const T* arr, unsigned int nelem, const T & key, unsigned int *idx) ;
57 
67  template <typename T>
68  int UpperBound (unsigned int nelem,const T * arr,unsigned int startIdx, const T & key);
69 
81  template <typename T>
82  bool maxLowerBound(const std::vector<T> & arr,const T & key, unsigned int & retIdx,
83  unsigned int* leftIdx, unsigned int* rightIdx);
84 
85 
86 
87 
88 };//end namespace
89 
90 #include "seqUtils.tcc"
91 
92 #endif
93 
bool BinarySearch(const T *arr, unsigned int nelem, const T &key, unsigned int *idx)
A binary search implementation.
void flashsort(T *a, int n, int m, int *ctr)
Flash sort algo to sort an array in O(n).
int UpperBound(unsigned int nelem, const T *arr, unsigned int startIdx, const T &key)
Finds the index of the smallest upper bound of the search key in the array.
bool maxLowerBound(const std::vector< T > &arr, const T &key, unsigned int &retIdx, unsigned int *leftIdx, unsigned int *rightIdx)
Finds the index of the greatest lower bound of the search key in the array. The implementation uses a...
Collection of Generic Sequential Functions.