DASH  0.3.0
AllOf.h
1 #ifndef DASH__ALGORITHM__ALL_OF_H__
2 #define DASH__ALGORITHM__ALL_OF_H__
3 
4 #include <dash/iterator/GlobIter.h>
5 #include <dash/algorithm/Find.h>
6 
7 
8 namespace dash {
9 
10 
21 template<
22  typename GlobIter,
23  typename UnaryPredicate>
24 bool all_of(
28  GlobIter last,
30  UnaryPredicate p)
31 {
32  return find_if_not(first, last, p) == last;
33 }
34 
35 } // namespace dash
36 
37 #endif // DASH__ALGORITHM__ALL_OF_H__
This class is a simple memory pool which holds allocates elements of size ValueType.
Definition: AllOf.h:8
GlobIter find_if_not(GlobIter first, GlobIter last, UnaryPredicate predicate)
Returns an iterator to the first element in the range [first,last) that does not satisfy the predicat...
Definition: Find.h:160
Returns second operand.
Definition: Operation.h:201
bool all_of(GlobIter first, GlobIter last, UnaryPredicate p)
Check whether all element in the range satisfy predicate p.
Definition: AllOf.h:24
Iterator on Partitioned Global Address Space.
Definition: GlobIter.h:45