~ubuntu-branches/ubuntu/trusty/libthrust/trusty

« back to all changes in this revision

Viewing changes to detail/binary_search.inl

  • Committer: Package Import Robot
  • Author(s): Andreas Beckmann
  • Date: 2011-12-02 01:48:24 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20111202014824-bpfczhbx39usefge
Tags: 1.5.0-1
* New upstream release.
* debian/copyright:
  - Update to dep5.mdwn?revision=202.
  - Update copyright entries for added/moved files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <thrust/functional.h>
23
23
 
24
24
#include <thrust/iterator/iterator_traits.h>
25
 
#include <thrust/detail/dispatch/binary_search.h>
 
25
#include <thrust/detail/backend/binary_search.h>
26
26
 
27
27
namespace thrust
28
28
{
45
45
                            const T& value, 
46
46
                            StrictWeakOrdering comp)
47
47
{
48
 
    // dispatch on space
49
 
    return thrust::detail::dispatch::lower_bound(first, last, value, comp,
50
 
            typename thrust::iterator_space<ForwardIterator>::type());
51
 
 
 
48
    return thrust::detail::backend::lower_bound(first, last, value, comp);
52
49
}
53
50
 
54
51
template <class ForwardIterator, class LessThanComparable>
65
62
                            const T& value, 
66
63
                            StrictWeakOrdering comp)
67
64
{
68
 
    // dispatch on space
69
 
    return thrust::detail::dispatch::upper_bound(first, last, value, comp,
70
 
            typename thrust::iterator_space<ForwardIterator>::type());
71
 
 
 
65
    return thrust::detail::backend::upper_bound(first, last, value, comp);
72
66
}
73
67
 
74
68
template <class ForwardIterator, class LessThanComparable>
85
79
                   const T& value, 
86
80
                   StrictWeakOrdering comp)
87
81
{
88
 
    // dispatch on space
89
 
    return thrust::detail::dispatch::binary_search(first, last, value, comp,
90
 
            typename thrust::iterator_space<ForwardIterator>::type());
91
 
 
 
82
    return thrust::detail::backend::binary_search(first, last, value, comp);
92
83
}
93
84
 
94
85
template <class ForwardIterator, class LessThanComparable>
136
127
                           OutputIterator output,
137
128
                           StrictWeakOrdering comp)
138
129
{
139
 
    // dispatch on space
140
 
    return thrust::detail::dispatch::lower_bound(first, last, values_first, values_last, output, comp,
141
 
            typename thrust::iterator_space<ForwardIterator>::type(),
142
 
            typename thrust::iterator_space<InputIterator>::type(),
143
 
            typename thrust::iterator_space<OutputIterator>::type());
 
130
    return thrust::detail::backend::lower_bound(first, last, values_first, values_last, output, comp);
144
131
}
145
132
    
146
133
template <class ForwardIterator, class InputIterator, class OutputIterator>
163
150
                           OutputIterator output,
164
151
                           StrictWeakOrdering comp)
165
152
{
166
 
    // dispatch on space
167
 
    return thrust::detail::dispatch::upper_bound(first, last, values_first, values_last, output, comp,
168
 
            typename thrust::iterator_space<ForwardIterator>::type(),
169
 
            typename thrust::iterator_space<InputIterator>::type(),
170
 
            typename thrust::iterator_space<OutputIterator>::type());
 
153
    return thrust::detail::backend::upper_bound(first, last, values_first, values_last, output, comp);
171
154
}
172
155
 
173
156
template <class ForwardIterator, class InputIterator, class OutputIterator>
190
173
                             OutputIterator output,
191
174
                             StrictWeakOrdering comp)
192
175
{
193
 
    // dispatch on space
194
 
    return thrust::detail::dispatch::binary_search(first, last, values_first, values_last, output, comp,
195
 
            typename thrust::iterator_space<ForwardIterator>::type(),
196
 
            typename thrust::iterator_space<InputIterator>::type(),
197
 
            typename thrust::iterator_space<OutputIterator>::type());
 
176
    return thrust::detail::backend::binary_search(first, last, values_first, values_last, output, comp);
198
177
}
199
178
 
200
179
} // end namespace thrust