ZTWHHH commited on
Commit
96fa03e
·
verified ·
1 Parent(s): 4bf47e9

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/addressof.h +31 -0
  2. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/advance.h +140 -0
  3. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/copy.h +512 -0
  4. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/adjacent_difference.inl +86 -0
  5. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/advance.inl +74 -0
  6. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/alignment.h +204 -0
  7. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/allocator_aware_execution_policy.h +101 -0
  8. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/caching_allocator.h +47 -0
  9. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/copy.inl +129 -0
  10. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/count.inl +77 -0
  11. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/cpp11_required.h +26 -0
  12. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/cpp14_required.h +26 -0
  13. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/cstdint.h +83 -0
  14. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/device_delete.inl +44 -0
  15. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/device_free.inl +39 -0
  16. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/device_new.inl +56 -0
  17. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/equal.inl +80 -0
  18. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/event_error.h +164 -0
  19. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/execute_with_allocator_fwd.h +106 -0
  20. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/execution_policy.h +76 -0
  21. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/fill.inl +86 -0
  22. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/find.inl +108 -0
  23. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/for_each.inl +86 -0
  24. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/function.h +161 -0
  25. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/functional.inl +126 -0
  26. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/generate.inl +92 -0
  27. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/get_iterator_value.h +55 -0
  28. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/inner_product.inl +101 -0
  29. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/internal_functional.h +558 -0
  30. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/malloc_and_free.h +83 -0
  31. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/merge.inl +221 -0
  32. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/mismatch.inl +89 -0
  33. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/modern_gcc_required.h +26 -0
  34. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/numeric_wrapper.h +27 -0
  35. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/overlapped_copy.h +131 -0
  36. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/partition.inl +411 -0
  37. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/raw_reference_cast.h +332 -0
  38. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/reduce.inl +276 -0
  39. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/remove.inl +246 -0
  40. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/replace.inl +218 -0
  41. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/scan.inl +522 -0
  42. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/scatter.inl +163 -0
  43. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/seq.h +52 -0
  44. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/shuffle.inl +83 -0
  45. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/sort.inl +404 -0
  46. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/static_assert.h +91 -0
  47. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/static_map.h +169 -0
  48. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/tabulate.inl +58 -0
  49. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/temporary_array.inl +168 -0
  50. videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/transform.inl +247 -0
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/addressof.h ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (c) 2018 NVIDIA Corporation
2
+ // Author: Bryce Adelstein Lelbach <brycelelbach@gmail.com>
3
+ //
4
+ // Distributed under the Boost Software License v1.0 (boost.org/LICENSE_1_0.txt)
5
+
6
+ #pragma once
7
+
8
+ #include <thrust/detail/config.h>
9
+
10
+ #if THRUST_CPP_DIALECT >= 2011
11
+ # include <thrust/detail/memory_wrapper.h>
12
+ #endif
13
+
14
+ THRUST_NAMESPACE_BEGIN
15
+
16
+ ///////////////////////////////////////////////////////////////////////////////
17
+
18
+ /*! Obtains the actual address of the object or function arg, even in presence of overloaded operator&.
19
+ */
20
+ template <typename T>
21
+ __host__ __device__
22
+ T* addressof(T& arg)
23
+ {
24
+ return reinterpret_cast<T*>(
25
+ &const_cast<char&>(reinterpret_cast<const volatile char&>(arg))
26
+ );
27
+ }
28
+
29
+ ///////////////////////////////////////////////////////////////////////////////
30
+
31
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/advance.h ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /*! \file advance.h
19
+ * \brief Advance an iterator by a given distance.
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include <thrust/detail/config.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ /*! \addtogroup iterators
29
+ * \{
30
+ */
31
+
32
+ /*! \p advance(i, n) increments the iterator \p i by the distance \p n.
33
+ * If <tt>n > 0</tt> it is equivalent to executing <tt>++i</tt> \p n
34
+ * times, and if <tt>n < 0</tt> it is equivalent to executing <tt>--i</tt>
35
+ * \p n times. If <tt>n == 0</tt>, the call has no effect.
36
+ *
37
+ * \param i The iterator to be advanced.
38
+ * \param n The distance by which to advance the iterator.
39
+ *
40
+ * \tparam InputIterator is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>.
41
+ * \tparam Distance is an integral type that is convertible to \p InputIterator's distance type.
42
+ *
43
+ * \pre \p n shall be negative only for bidirectional and random access iterators.
44
+ *
45
+ * The following code snippet demonstrates how to use \p advance to increment
46
+ * an iterator a given number of times.
47
+ *
48
+ * \code
49
+ * #include <thrust/advance.h>
50
+ * #include <thrust/device_vector.h>
51
+ * ...
52
+ * thrust::device_vector<int> vec(13);
53
+ * thrust::device_vector<int>::iterator iter = vec.begin();
54
+ *
55
+ * thrust::advance(iter, 7);
56
+ *
57
+ * // iter - vec.begin() == 7
58
+ * \endcode
59
+ *
60
+ * \see https://en.cppreference.com/w/cpp/iterator/advance
61
+ */
62
+ template <typename InputIterator, typename Distance>
63
+ __host__ __device__
64
+ void advance(InputIterator& i, Distance n);
65
+
66
+ /*! \p next(i, n) returns the \p n th successor of the iterator \p i.
67
+ *
68
+ * \param i An iterator.
69
+ * \param n The number of elements to advance.
70
+ *
71
+ * \tparam InputIterator must meet the <a href="https://en.cppreference.com/w/cpp/named_req/InputIterator">InputIterator</a>.
72
+ *
73
+ * \pre \p n shall be negative only for bidirectional and random access iterators.
74
+ *
75
+ * The following code snippet demonstrates how to use \p next.
76
+ *
77
+ * \code
78
+ * #include <thrust/advance.h>
79
+ * #include <thrust/device_vector.h>
80
+ * ...
81
+ * thrust::device_vector<int> vec(13);
82
+ * thrust::device_vector<int>::iterator i0 = vec.begin();
83
+ *
84
+ * auto i1 = thrust::next(i0);
85
+ *
86
+ * // i0 - vec.begin() == 0
87
+ * // i1 - vec.begin() == 1
88
+ * \endcode
89
+ *
90
+ * \see https://en.cppreference.com/w/cpp/iterator/next
91
+ */
92
+ #if 0 // Doxygen only
93
+ template <typename InputIterator, typename Distance>
94
+ __host__ __device__
95
+ InputIterator next(
96
+ InputIterator i
97
+ , typename iterator_traits<InputIterator>::difference_type n = 1
98
+ );
99
+ #endif
100
+
101
+ /*! \p prev(i, n) returns the \p n th predecessor of the iterator \p i.
102
+ *
103
+ * \param i An iterator.
104
+ * \param n The number of elements to descend.
105
+ *
106
+ * \tparam BidirectionalIterator must meet the <a href="https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator">BidirectionalIterator</a>.
107
+ *
108
+ * The following code snippet demonstrates how to use \p prev.
109
+ *
110
+ * \code
111
+ * #include <thrust/advance.h>
112
+ * #include <thrust/device_vector.h>
113
+ * ...
114
+ * thrust::device_vector<int> vec(13);
115
+ * thrust::device_vector<int>::iterator i0 = vec.end();
116
+ *
117
+ * auto i1 = thrust::prev(i0);
118
+ *
119
+ * // vec.end() - i0 == 0
120
+ * // vec.end() - i1 == 1
121
+ * \endcode
122
+ *
123
+ * \see https://en.cppreference.com/w/cpp/iterator/prev
124
+ */
125
+ #if 0 // Doxygen only
126
+ template <typename BidirectionalIterator, typename Distance>
127
+ __host__ __device__
128
+ BidirectionalIterator prev(
129
+ BidirectionalIterator i
130
+ , typename iterator_traits<BidirectionalIterator>::difference_type n = 1
131
+ );
132
+ #endif
133
+
134
+ /*! \} // end iterators
135
+ */
136
+
137
+ THRUST_NAMESPACE_END
138
+
139
+ #include <thrust/detail/advance.inl>
140
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/copy.h ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /*! \file thrust/copy.h
19
+ * \brief Copies elements from one range to another
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include <thrust/detail/config.h>
25
+ #include <thrust/detail/execution_policy.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ /*! \addtogroup algorithms
30
+ */
31
+
32
+ /*! \addtogroup copying
33
+ * \ingroup algorithms
34
+ * \{
35
+ */
36
+
37
+
38
+ /*! \p copy copies elements from the range [\p first, \p last) to the range
39
+ * [\p result, \p result + (\p last - \p first)). That is, it performs
40
+ * the assignments *\p result = *\p first, *(\p result + \c 1) = *(\p first + \c 1),
41
+ * and so on. Generally, for every integer \c n from \c 0 to \p last - \p first, \p copy
42
+ * performs the assignment *(\p result + \c n) = *(\p first + \c n). Unlike
43
+ * \c std::copy, \p copy offers no guarantee on order of operation. As a result,
44
+ * calling \p copy with overlapping source and destination ranges has undefined
45
+ * behavior.
46
+ *
47
+ * The return value is \p result + (\p last - \p first).
48
+ *
49
+ * The algorithm's execution is parallelized as determined by \p exec.
50
+ *
51
+ * \param exec The execution policy to use for parallelization.
52
+ * \param first The beginning of the sequence to copy.
53
+ * \param last The end of the sequence to copy.
54
+ * \param result The destination sequence.
55
+ * \return The end of the destination sequence.
56
+ * \see https://en.cppreference.com/w/cpp/algorithm/copy
57
+ *
58
+ * \tparam DerivedPolicy The name of the derived execution policy.
59
+ * \tparam InputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a> and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type.
60
+ * \tparam OutputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator</a>.
61
+ *
62
+ * \pre \p result may be equal to \p first, but \p result shall not be in the range <tt>[first, last)</tt> otherwise.
63
+ *
64
+ * The following code snippet demonstrates how to use \p copy
65
+ * to copy from one range to another using the \p thrust::device parallelization policy:
66
+ *
67
+ * \code
68
+ * #include <thrust/copy.h>
69
+ * #include <thrust/device_vector.h>
70
+ * #include <thrust/execution_policy.h>
71
+ * ...
72
+ *
73
+ * thrust::device_vector<int> vec0(100);
74
+ * thrust::device_vector<int> vec1(100);
75
+ * ...
76
+ *
77
+ * thrust::copy(thrust::device, vec0.begin(), vec0.end(), vec1.begin());
78
+ *
79
+ * // vec1 is now a copy of vec0
80
+ * \endcode
81
+ */
82
+ template<typename DerivedPolicy, typename InputIterator, typename OutputIterator>
83
+ __host__ __device__
84
+ OutputIterator copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
85
+ InputIterator first,
86
+ InputIterator last,
87
+ OutputIterator result);
88
+
89
+
90
+ /*! \p copy_n copies elements from the range <tt>[first, first + n)</tt> to the range
91
+ * <tt>[result, result + n)</tt>. That is, it performs the assignments <tt>*result = *first, *(result + 1) = *(first + 1)</tt>,
92
+ * and so on. Generally, for every integer \c i from \c 0 to \c n, \p copy
93
+ * performs the assignment *(\p result + \c i) = *(\p first + \c i). Unlike
94
+ * \c std::copy_n, \p copy_n offers no guarantee on order of operation. As a result,
95
+ * calling \p copy_n with overlapping source and destination ranges has undefined
96
+ * behavior.
97
+ *
98
+ * The return value is \p result + \p n.
99
+ *
100
+ * The algorithm's execution is parallelized as determined by \p exec.
101
+ *
102
+ * \param exec The execution policy to use for parallelization.
103
+ * \param first The beginning of the range to copy.
104
+ * \param n The number of elements to copy.
105
+ * \param result The beginning destination range.
106
+ * \return The end of the destination range.
107
+ *
108
+ * \tparam DerivedPolicy The name of the derived execution policy.
109
+ * \tparam InputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a> and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type.
110
+ * \tparam Size is an integral type.
111
+ * \tparam OutputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator</a>.
112
+ *
113
+ * \pre \p result may be equal to \p first, but \p result shall not be in the range <tt>[first, first + n)</tt> otherwise.
114
+ *
115
+ * The following code snippet demonstrates how to use \p copy
116
+ * to copy from one range to another using the \p thrust::device parallelization policy:
117
+ *
118
+ * \code
119
+ * #include <thrust/copy.h>
120
+ * #include <thrust/device_vector.h>
121
+ * #include <thrust/execution_policy.h>
122
+ * ...
123
+ * size_t n = 100;
124
+ * thrust::device_vector<int> vec0(n);
125
+ * thrust::device_vector<int> vec1(n);
126
+ * ...
127
+ * thrust::copy_n(thrust::device, vec0.begin(), n, vec1.begin());
128
+ *
129
+ * // vec1 is now a copy of vec0
130
+ * \endcode
131
+ *
132
+ * \see https://en.cppreference.com/w/cpp/algorithm/copy_n
133
+ * \see thrust::copy
134
+ */
135
+ template<typename DerivedPolicy, typename InputIterator, typename Size, typename OutputIterator>
136
+ __host__ __device__
137
+ OutputIterator copy_n(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
138
+ InputIterator first,
139
+ Size n,
140
+ OutputIterator result);
141
+
142
+
143
+
144
+ /*! \p copy copies elements from the range [\p first, \p last) to the range
145
+ * [\p result, \p result + (\p last - \p first)). That is, it performs
146
+ * the assignments *\p result = *\p first, *(\p result + \c 1) = *(\p first + \c 1),
147
+ * and so on. Generally, for every integer \c n from \c 0 to \p last - \p first, \p copy
148
+ * performs the assignment *(\p result + \c n) = *(\p first + \c n). Unlike
149
+ * \c std::copy, \p copy offers no guarantee on order of operation. As a result,
150
+ * calling \p copy with overlapping source and destination ranges has undefined
151
+ * behavior.
152
+ *
153
+ * The return value is \p result + (\p last - \p first).
154
+ *
155
+ * \param first The beginning of the sequence to copy.
156
+ * \param last The end of the sequence to copy.
157
+ * \param result The destination sequence.
158
+ * \return The end of the destination sequence.
159
+ * \see https://en.cppreference.com/w/cpp/algorithm/copy
160
+ *
161
+ * \tparam InputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a> and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type.
162
+ * \tparam OutputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator</a>.
163
+ *
164
+ * \pre \p result may be equal to \p first, but \p result shall not be in the range <tt>[first, last)</tt> otherwise.
165
+ *
166
+ * The following code snippet demonstrates how to use \p copy
167
+ * to copy from one range to another.
168
+ *
169
+ * \code
170
+ * #include <thrust/copy.h>
171
+ * #include <thrust/device_vector.h>
172
+ * ...
173
+ *
174
+ * thrust::device_vector<int> vec0(100);
175
+ * thrust::device_vector<int> vec1(100);
176
+ * ...
177
+ *
178
+ * thrust::copy(vec0.begin(), vec0.end(),
179
+ * vec1.begin());
180
+ *
181
+ * // vec1 is now a copy of vec0
182
+ * \endcode
183
+ */
184
+ template<typename InputIterator, typename OutputIterator>
185
+ OutputIterator copy(InputIterator first,
186
+ InputIterator last,
187
+ OutputIterator result);
188
+
189
+ /*! \p copy_n copies elements from the range <tt>[first, first + n)</tt> to the range
190
+ * <tt>[result, result + n)</tt>. That is, it performs the assignments <tt>*result = *first, *(result + 1) = *(first + 1)</tt>,
191
+ * and so on. Generally, for every integer \c i from \c 0 to \c n, \p copy
192
+ * performs the assignment *(\p result + \c i) = *(\p first + \c i). Unlike
193
+ * \c std::copy_n, \p copy_n offers no guarantee on order of operation. As a result,
194
+ * calling \p copy_n with overlapping source and destination ranges has undefined
195
+ * behavior.
196
+ *
197
+ * The return value is \p result + \p n.
198
+ *
199
+ * \param first The beginning of the range to copy.
200
+ * \param n The number of elements to copy.
201
+ * \param result The beginning destination range.
202
+ * \return The end of the destination range.
203
+ *
204
+ * \tparam InputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a> and \c InputIterator's \c value_type must be convertible to \c OutputIterator's \c value_type.
205
+ * \tparam Size is an integral type.
206
+ * \tparam OutputIterator must be a model of <a href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator</a>.
207
+ *
208
+ * \pre \p result may be equal to \p first, but \p result shall not be in the range <tt>[first, first + n)</tt> otherwise.
209
+ *
210
+ * The following code snippet demonstrates how to use \p copy
211
+ * to copy from one range to another.
212
+ *
213
+ * \code
214
+ * #include <thrust/copy.h>
215
+ * #include <thrust/device_vector.h>
216
+ * ...
217
+ * size_t n = 100;
218
+ * thrust::device_vector<int> vec0(n);
219
+ * thrust::device_vector<int> vec1(n);
220
+ * ...
221
+ * thrust::copy_n(vec0.begin(), n, vec1.begin());
222
+ *
223
+ * // vec1 is now a copy of vec0
224
+ * \endcode
225
+ *
226
+ * \see https://en.cppreference.com/w/cpp/algorithm/copy_n
227
+ * \see thrust::copy
228
+ */
229
+ template<typename InputIterator, typename Size, typename OutputIterator>
230
+ OutputIterator copy_n(InputIterator first,
231
+ Size n,
232
+ OutputIterator result);
233
+
234
+ /*! \} // end copying
235
+ */
236
+
237
+ /*! \addtogroup stream_compaction
238
+ * \{
239
+ */
240
+
241
+
242
+ /*! This version of \p copy_if copies elements from the range <tt>[first,last)</tt>
243
+ * to a range beginning at \p result, except that any element which causes \p pred
244
+ * to be \c false is not copied. \p copy_if is stable, meaning that the relative
245
+ * order of elements that are copied is unchanged.
246
+ *
247
+ * More precisely, for every integer \c n such that <tt>0 <= n < last-first</tt>,
248
+ * \p copy_if performs the assignment <tt>*result = *(first+n)</tt> and \p result
249
+ * is advanced one position if <tt>pred(*(first+n))</tt>. Otherwise, no assignment
250
+ * occurs and \p result is not advanced.
251
+ *
252
+ * The algorithm's execution is parallelized as determined by \p system.
253
+ *
254
+ * \param exec The execution policy to use for parallelization.
255
+ * \param first The beginning of the sequence from which to copy.
256
+ * \param last The end of the sequence from which to copy.
257
+ * \param result The beginning of the sequence into which to copy.
258
+ * \param pred The predicate to test on every value of the range <tt>[first, last)</tt>.
259
+ * \return <tt>result + n</tt>, where \c n is equal to the number of times \p pred
260
+ * evaluated to \c true in the range <tt>[first, last)</tt>.
261
+ *
262
+ * \tparam DerivedPolicy The name of the derived execution policy.
263
+ * \tparam InputIterator is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>,
264
+ * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type.
265
+ * \tparam OutputIterator is a model of <a href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator</a>.
266
+ * \tparam Predicate is a model of <a href="https://en.cppreference.com/w/cpp/concepts/predicate">Predicate</a>.
267
+ *
268
+ * \pre The ranges <tt>[first, last)</tt> and <tt>[result, result + (last - first))</tt> shall not overlap.
269
+ *
270
+ * The following code snippet demonstrates how to use \p copy_if to perform stream compaction
271
+ * to copy even numbers to an output range using the \p thrust::host parallelization policy:
272
+ *
273
+ * \code
274
+ * #include <thrust/copy.h>
275
+ * #include <thrust/execution_policy.h>
276
+ * ...
277
+ * struct is_even
278
+ * {
279
+ * __host__ __device__
280
+ * bool operator()(const int x)
281
+ * {
282
+ * return (x % 2) == 0;
283
+ * }
284
+ * };
285
+ * ...
286
+ * const int N = 6;
287
+ * int V[N] = {-2, 0, -1, 0, 1, 2};
288
+ * int result[4];
289
+ *
290
+ * thrust::copy_if(thrust::host, V, V + N, result, is_even());
291
+ *
292
+ * // V remains {-2, 0, -1, 0, 1, 2}
293
+ * // result is now {-2, 0, 0, 2}
294
+ * \endcode
295
+ *
296
+ * \see \c remove_copy_if
297
+ */
298
+ template<typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename Predicate>
299
+ __host__ __device__
300
+ OutputIterator copy_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
301
+ InputIterator first,
302
+ InputIterator last,
303
+ OutputIterator result,
304
+ Predicate pred);
305
+
306
+
307
+
308
+ /*! This version of \p copy_if copies elements from the range <tt>[first,last)</tt>
309
+ * to a range beginning at \p result, except that any element which causes \p pred
310
+ * to \c false is not copied. \p copy_if is stable, meaning that the relative
311
+ * order of elements that are copied is unchanged.
312
+ *
313
+ * More precisely, for every integer \c n such that <tt>0 <= n < last-first</tt>,
314
+ * \p copy_if performs the assignment <tt>*result = *(first+n)</tt> and \p result
315
+ * is advanced one position if <tt>pred(*(first+n))</tt>. Otherwise, no assignment
316
+ * occurs and \p result is not advanced.
317
+ *
318
+ * \param first The beginning of the sequence from which to copy.
319
+ * \param last The end of the sequence from which to copy.
320
+ * \param result The beginning of the sequence into which to copy.
321
+ * \param pred The predicate to test on every value of the range <tt>[first, last)</tt>.
322
+ * \return <tt>result + n</tt>, where \c n is equal to the number of times \p pred
323
+ * evaluated to \c true in the range <tt>[first, last)</tt>.
324
+ *
325
+ * \tparam InputIterator is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>,
326
+ * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type.
327
+ * \tparam OutputIterator is a model of <a href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator</a>.
328
+ * \tparam Predicate is a model of <a href="https://en.cppreference.com/w/cpp/concepts/predicate">Predicate</a>.
329
+ *
330
+ * \pre The ranges <tt>[first, last)</tt> and <tt>[result, result + (last - first))</tt> shall not overlap.
331
+ *
332
+ * The following code snippet demonstrates how to use \p copy_if to perform stream compaction
333
+ * to copy even numbers to an output range.
334
+ *
335
+ * \code
336
+ * #include <thrust/copy.h>
337
+ * ...
338
+ * struct is_even
339
+ * {
340
+ * __host__ __device__
341
+ * bool operator()(const int x)
342
+ * {
343
+ * return (x % 2) == 0;
344
+ * }
345
+ * };
346
+ * ...
347
+ * const int N = 6;
348
+ * int V[N] = {-2, 0, -1, 0, 1, 2};
349
+ * int result[4];
350
+ *
351
+ * thrust::copy_if(V, V + N, result, is_even());
352
+ *
353
+ * // V remains {-2, 0, -1, 0, 1, 2}
354
+ * // result is now {-2, 0, 0, 2}
355
+ * \endcode
356
+ *
357
+ * \see \c remove_copy_if
358
+ */
359
+ template<typename InputIterator,
360
+ typename OutputIterator,
361
+ typename Predicate>
362
+ OutputIterator copy_if(InputIterator first,
363
+ InputIterator last,
364
+ OutputIterator result,
365
+ Predicate pred);
366
+
367
+
368
+ /*! This version of \p copy_if copies elements from the range <tt>[first,last)</tt>
369
+ * to a range beginning at \p result, except that any element whose corresponding stencil
370
+ * element causes \p pred to be \c false is not copied. \p copy_if is stable, meaning
371
+ * that the relative order of elements that are copied is unchanged.
372
+ *
373
+ * More precisely, for every integer \c n such that <tt>0 <= n < last-first</tt>,
374
+ * \p copy_if performs the assignment <tt>*result = *(first+n)</tt> and \p result
375
+ * is advanced one position if <tt>pred(*(stencil+n))</tt>. Otherwise, no assignment
376
+ * occurs and \p result is not advanced.
377
+ *
378
+ * The algorithm's execution is parallelized as determined by \p exec.
379
+ *
380
+ * \param exec The execution policy to use for parallelization.
381
+ * \param first The beginning of the sequence from which to copy.
382
+ * \param last The end of the sequence from which to copy.
383
+ * \param stencil The beginning of the stencil sequence.
384
+ * \param result The beginning of the sequence into which to copy.
385
+ * \param pred The predicate to test on every value of the range <tt>[stencil, stencil + (last-first))</tt>.
386
+ * \return <tt>result + n</tt>, where \c n is equal to the number of times \p pred
387
+ * evaluated to \c true in the range <tt>[stencil, stencil + (last-first))</tt>.
388
+ *
389
+ * \tparam DerivedPolicy The name of the derived execution policy.
390
+ * \tparam InputIterator1 is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>.
391
+ * \tparam InputIterator2 is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>,
392
+ * and \p InputIterator2's \c value_type is convertible to \p Predicate's \c argument_type.
393
+ * \tparam OutputIterator is a model of <a href="https://en.cppreference.com/w/cpp/named_req/OutputIterator">Output Iterator</a>.
394
+ * \tparam Predicate is a model of <a href="https://en.cppreference.com/w/cpp/concepts/predicate">Predicate</a>.
395
+ *
396
+ * \pre The ranges <tt>[first, last)</tt> and <tt>[result, result + (last - first))</tt> shall not overlap.
397
+ * \pre The ranges <tt>[stencil, stencil + (last - first))</tt> and <tt>[result, result + (last - first))</tt> shall not overlap.
398
+ *
399
+ * The following code snippet demonstrates how to use \p copy_if to perform stream compaction
400
+ * to copy numbers to an output range when corresponding stencil elements are even using the \p thrust::host execution policy:
401
+ *
402
+ * \code
403
+ * #include <thrust/copy.h>
404
+ * #include <thrust/execution_policy.h>
405
+ * ...
406
+ * struct is_even
407
+ * {
408
+ * __host__ __device__
409
+ * bool operator()(const int x)
410
+ * {
411
+ * return (x % 2) == 0;
412
+ * }
413
+ * };
414
+ * ...
415
+ * int N = 6;
416
+ * int data[N] = { 0, 1, 2, 3, 4, 5};
417
+ * int stencil[N] = {-2, 0, -1, 0, 1, 2};
418
+ * int result[4];
419
+ *
420
+ * thrust::copy_if(thrust::host, data, data + N, stencil, result, is_even());
421
+ *
422
+ * // data remains = { 0, 1, 2, 3, 4, 5};
423
+ * // stencil remains = {-2, 0, -1, 0, 1, 2};
424
+ * // result is now { 0, 1, 3, 5}
425
+ * \endcode
426
+ *
427
+ * \see \c remove_copy_if
428
+ */
429
+ template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Predicate>
430
+ __host__ __device__
431
+ OutputIterator copy_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
432
+ InputIterator1 first,
433
+ InputIterator1 last,
434
+ InputIterator2 stencil,
435
+ OutputIterator result,
436
+ Predicate pred);
437
+
438
+
439
+ /*! This version of \p copy_if copies elements from the range <tt>[first,last)</tt>
440
+ * to a range beginning at \p result, except that any element whose corresponding stencil
441
+ * element causes \p pred to be \c false is not copied. \p copy_if is stable, meaning
442
+ * that the relative order of elements that are copied is unchanged.
443
+ *
444
+ * More precisely, for every integer \c n such that <tt>0 <= n < last-first</tt>,
445
+ * \p copy_if performs the assignment <tt>*result = *(first+n)</tt> and \p result
446
+ * is advanced one position if <tt>pred(*(stencil+n))</tt>. Otherwise, no assignment
447
+ * occurs and \p result is not advanced.
448
+ *
449
+ * \param first The beginning of the sequence from which to copy.
450
+ * \param last The end of the sequence from which to copy.
451
+ * \param stencil The beginning of the stencil sequence.
452
+ * \param result The beginning of the sequence into which to copy.
453
+ * \param pred The predicate to test on every value of the range <tt>[stencil, stencil + (last-first))</tt>.
454
+ * \return <tt>result + n</tt>, where \c n is equal to the number of times \p pred
455
+ * evaluated to \c true in the range <tt>[stencil, stencil + (last-first))</tt>.
456
+ *
457
+ * \tparam InputIterator1 is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>.
458
+ * \tparam InputIterator2 is a model of <a href="https://en.cppreference.com/w/cpp/iterator/input_iterator">Input Iterator</a>,
459
+ * and \p InputIterator2's \c value_type is convertible to \p Predicate's \c argument_type.
460
+ * \tparam OutputIterator is a model of <a href="https://en.cppreference.com/w/cpp/named_req/OutputIterator">Output Iterator</a>.
461
+ * \tparam Predicate is a model of <a href="https://en.cppreference.com/w/cpp/concepts/predicate">Predicate</a>.
462
+ *
463
+ * \pre The ranges <tt>[first, last)</tt> and <tt>[result, result + (last - first))</tt> shall not overlap.
464
+ * \pre The ranges <tt>[stencil, stencil + (last - first))</tt> and <tt>[result, result + (last - first))</tt> shall not overlap.
465
+ *
466
+ * The following code snippet demonstrates how to use \p copy_if to perform stream compaction
467
+ * to copy numbers to an output range when corresponding stencil elements are even:
468
+ *
469
+ * \code
470
+ * #include <thrust/copy.h>
471
+ * ...
472
+ * struct is_even
473
+ * {
474
+ * __host__ __device__
475
+ * bool operator()(const int x)
476
+ * {
477
+ * return (x % 2) == 0;
478
+ * }
479
+ * };
480
+ * ...
481
+ * int N = 6;
482
+ * int data[N] = { 0, 1, 2, 3, 4, 5};
483
+ * int stencil[N] = {-2, 0, -1, 0, 1, 2};
484
+ * int result[4];
485
+ *
486
+ * thrust::copy_if(data, data + N, stencil, result, is_even());
487
+ *
488
+ * // data remains = { 0, 1, 2, 3, 4, 5};
489
+ * // stencil remains = {-2, 0, -1, 0, 1, 2};
490
+ * // result is now { 0, 1, 3, 5}
491
+ * \endcode
492
+ *
493
+ * \see \c remove_copy_if
494
+ */
495
+ template<typename InputIterator1,
496
+ typename InputIterator2,
497
+ typename OutputIterator,
498
+ typename Predicate>
499
+ OutputIterator copy_if(InputIterator1 first,
500
+ InputIterator1 last,
501
+ InputIterator2 stencil,
502
+ OutputIterator result,
503
+ Predicate pred);
504
+
505
+ /*! \} // end stream_compaction
506
+ */
507
+
508
+ THRUST_NAMESPACE_END
509
+
510
+ #include <thrust/detail/copy.h>
511
+ #include <thrust/detail/copy_if.h>
512
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/adjacent_difference.inl ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/system/detail/generic/select_system.h>
21
+ #include <thrust/system/detail/generic/adjacent_difference.h>
22
+ #include <thrust/system/detail/adl/adjacent_difference.h>
23
+
24
+ THRUST_NAMESPACE_BEGIN
25
+
26
+ __thrust_exec_check_disable__
27
+ template <typename DerivedPolicy, typename InputIterator, typename OutputIterator>
28
+ __host__ __device__
29
+ OutputIterator adjacent_difference(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
30
+ InputIterator first, InputIterator last,
31
+ OutputIterator result)
32
+ {
33
+ using thrust::system::detail::generic::adjacent_difference;
34
+
35
+ return adjacent_difference(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result);
36
+ } // end adjacent_difference()
37
+
38
+
39
+ __thrust_exec_check_disable__
40
+ template <typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename BinaryFunction>
41
+ __host__ __device__
42
+ OutputIterator adjacent_difference(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
43
+ InputIterator first, InputIterator last,
44
+ OutputIterator result,
45
+ BinaryFunction binary_op)
46
+ {
47
+ using thrust::system::detail::generic::adjacent_difference;
48
+
49
+ return adjacent_difference(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, binary_op);
50
+ } // end adjacent_difference()
51
+
52
+
53
+ template <typename InputIterator, typename OutputIterator>
54
+ OutputIterator adjacent_difference(InputIterator first, InputIterator last,
55
+ OutputIterator result)
56
+ {
57
+ using thrust::system::detail::generic::select_system;
58
+
59
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
60
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
61
+
62
+ System1 system1;
63
+ System2 system2;
64
+
65
+ return thrust::adjacent_difference(select_system(system1, system2), first, last, result);
66
+ } // end adjacent_difference()
67
+
68
+
69
+ template <typename InputIterator, typename OutputIterator, typename BinaryFunction>
70
+ OutputIterator adjacent_difference(InputIterator first, InputIterator last,
71
+ OutputIterator result,
72
+ BinaryFunction binary_op)
73
+ {
74
+ using thrust::system::detail::generic::select_system;
75
+
76
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
77
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
78
+
79
+ System1 system1;
80
+ System2 system2;
81
+
82
+ return thrust::adjacent_difference(select_system(system1, system2), first, last, result, binary_op);
83
+ } // end adjacent_difference()
84
+
85
+
86
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/advance.inl ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/advance.h>
21
+ #include <thrust/system/detail/generic/advance.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/detail/type_traits.h>
24
+ #include <thrust/detail/type_traits/has_nested_type.h>
25
+ #include <thrust/detail/type_traits/pointer_traits.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ __THRUST_DEFINE_HAS_NESTED_TYPE(has_difference_type, difference_type)
30
+
31
+ template <typename InputIterator, typename Distance>
32
+ __host__ __device__
33
+ void advance(InputIterator& i, Distance n)
34
+ {
35
+ thrust::system::detail::generic::advance(i, n);
36
+ }
37
+
38
+ template <typename InputIterator>
39
+ __host__ __device__
40
+ InputIterator next(
41
+ InputIterator i
42
+ , typename iterator_traits<InputIterator>::difference_type n = 1
43
+ )
44
+ {
45
+ thrust::system::detail::generic::advance(i, n);
46
+ return i;
47
+ }
48
+
49
+ template <typename BidirectionalIterator>
50
+ __host__ __device__
51
+ BidirectionalIterator prev(
52
+ BidirectionalIterator i
53
+ , typename iterator_traits<BidirectionalIterator>::difference_type n = 1
54
+ )
55
+ {
56
+ thrust::system::detail::generic::advance(i, -n);
57
+ return i;
58
+ }
59
+
60
+ template <typename BidirectionalIterator>
61
+ __host__ __device__
62
+ typename detail::disable_if<
63
+ has_difference_type<iterator_traits<BidirectionalIterator> >::value
64
+ , BidirectionalIterator
65
+ >::type prev(
66
+ BidirectionalIterator i
67
+ , typename detail::pointer_traits<BidirectionalIterator>::difference_type n = 1
68
+ )
69
+ {
70
+ thrust::system::detail::generic::advance(i, -n);
71
+ return i;
72
+ }
73
+
74
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/alignment.h ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2017 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*! \file alignment.h
18
+ * \brief Type-alignment utilities.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+ #include <thrust/detail/type_traits.h> // For `integral_constant`.
25
+
26
+ #include <cstddef> // For `std::size_t` and `std::max_align_t`.
27
+
28
+ #if THRUST_CPP_DIALECT >= 2011
29
+ #include <type_traits> // For `std::alignment_of`.
30
+ #endif
31
+
32
+ THRUST_NAMESPACE_BEGIN
33
+
34
+ namespace detail
35
+ {
36
+
37
+ /// \p THRUST_ALIGNOF is a macro that takes a single type-id as a parameter,
38
+ /// and returns the alignment requirement of the type in bytes.
39
+ ///
40
+ /// It is an approximation of C++11's `alignof` operator.
41
+ ///
42
+ /// Note: MSVC does not allow the builtin used to implement this to be placed
43
+ /// inside of a `__declspec(align(#))` attribute. As a workaround, you can
44
+ /// assign the result of \p THRUST_ALIGNOF to a variable and pass the variable
45
+ /// as the argument to `__declspec(align(#))`.
46
+ #if THRUST_CPP_DIALECT >= 2011
47
+ #define THRUST_ALIGNOF(x) alignof(x)
48
+ #else
49
+ #define THRUST_ALIGNOF(x) __alignof(x)
50
+ #endif
51
+
52
+ /// \p alignment_of provides the member constant `value` which is equal to the
53
+ /// alignment requirement of the type `T`, as if obtained by a C++11 `alignof`
54
+ /// expression.
55
+ ///
56
+ /// It is an implementation of C++11's \p std::alignment_of.
57
+ #if THRUST_CPP_DIALECT >= 2011
58
+ template <typename T>
59
+ using alignment_of = std::alignment_of<T>;
60
+ #else
61
+ template <typename T>
62
+ struct alignment_of;
63
+
64
+ template <typename T, std::size_t size_diff>
65
+ struct alignment_of_helper
66
+ {
67
+ static const std::size_t value =
68
+ integral_constant<std::size_t, size_diff>::value;
69
+ };
70
+
71
+ template <typename T>
72
+ struct alignment_of_helper<T, 0>
73
+ {
74
+ static const std::size_t value = alignment_of<T>::value;
75
+ };
76
+
77
+ template <typename T>
78
+ struct alignment_of
79
+ {
80
+ private:
81
+ struct impl
82
+ {
83
+ T x;
84
+ char c;
85
+ };
86
+
87
+ public:
88
+ static const std::size_t value =
89
+ alignment_of_helper<impl, sizeof(impl) - sizeof(T)>::value;
90
+ };
91
+ #endif
92
+
93
+ /// \p aligned_type provides the nested type `type`, which is a trivial
94
+ /// type whose alignment requirement is a divisor of `Align`.
95
+ ///
96
+ /// The behavior is undefined if `Align` is not a power of 2.
97
+ template <std::size_t Align>
98
+ struct aligned_type;
99
+
100
+ #if THRUST_CPP_DIALECT >= 2011 \
101
+ && (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
102
+ && (THRUST_GCC_VERSION >= 40800)
103
+ // C++11 implementation, excluding GCC 4.7, which doesn't have `alignas`.
104
+ template <std::size_t Align>
105
+ struct aligned_type
106
+ {
107
+ struct alignas(Align) type {};
108
+ };
109
+ #elif (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) \
110
+ || ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
111
+ && (THRUST_GCC_VERSION < 40600))
112
+ // C++03 implementation for MSVC and GCC <= 4.5.
113
+ //
114
+ // We have to implement `aligned_type` with specializations for MSVC
115
+ // and GCC 4.2.x and older because they require literals as arguments to
116
+ // their alignment attribute.
117
+
118
+ #if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC)
119
+ // MSVC implementation.
120
+ #define THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(X) \
121
+ template <> \
122
+ struct aligned_type<X> \
123
+ { \
124
+ __declspec(align(X)) struct type {}; \
125
+ }; \
126
+ /**/
127
+ #else
128
+ // GCC <= 4.2 implementation.
129
+ #define THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(X) \
130
+ template <> \
131
+ struct aligned_type<X> \
132
+ { \
133
+ struct type {} __attribute__((aligned(X))); \
134
+ }; \
135
+ /**/
136
+ #endif
137
+
138
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(1);
139
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(2);
140
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(4);
141
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(8);
142
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(16);
143
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(32);
144
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(64);
145
+ THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION(128);
146
+
147
+ #undef THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION
148
+ #else
149
+ // C++03 implementation for GCC > 4.5, Clang, PGI, ICPC, and xlC.
150
+ template <std::size_t Align>
151
+ struct aligned_type
152
+ {
153
+ struct type {} __attribute__((aligned(Align)));
154
+ };
155
+ #endif
156
+
157
+ /// \p max_align_t is a trivial type whose alignment requirement is at least as
158
+ /// strict (as large) as that of every scalar type.
159
+ ///
160
+ /// It is an implementation of C++11's \p std::max_align_t.
161
+ #if THRUST_CPP_DIALECT >= 2011 \
162
+ && (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
163
+ && (THRUST_GCC_VERSION >= 40900)
164
+ // GCC 4.7 and 4.8 don't have `std::max_align_t`.
165
+ using max_align_t = std::max_align_t;
166
+ #else
167
+ union max_align_t
168
+ {
169
+ // These cannot be private because C++03 POD types cannot have private
170
+ // data members.
171
+ char c;
172
+ short s;
173
+ int i;
174
+ long l;
175
+ float f;
176
+ double d;
177
+ long long ll;
178
+ long double ld;
179
+ void* p;
180
+ };
181
+ #endif
182
+
183
+ /// \p aligned_reinterpret_cast `reinterpret_cast`s \p u of type \p U to `void*`
184
+ /// and then `reinterpret_cast`s the result to \p T. The indirection through
185
+ /// `void*` suppresses compiler warnings when the alignment requirement of \p *u
186
+ /// is less than the alignment requirement of \p *t. The caller of
187
+ /// \p aligned_reinterpret_cast is responsible for ensuring that the alignment
188
+ /// requirements are actually satisified.
189
+ template <typename T, typename U>
190
+ __host__ __device__
191
+ T aligned_reinterpret_cast(U u)
192
+ {
193
+ return reinterpret_cast<T>(reinterpret_cast<void*>(u));
194
+ }
195
+
196
+ __host__ __device__
197
+ inline std::size_t aligned_storage_size(std::size_t n, std::size_t align)
198
+ {
199
+ return ((n + align - 1) / align) * align;
200
+ }
201
+
202
+ } // end namespace detail
203
+
204
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/allocator_aware_execution_policy.h ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/execute_with_allocator_fwd.h>
21
+ #include <thrust/detail/alignment.h>
22
+
23
+ #if THRUST_CPP_DIALECT >= 2011
24
+ #include <type_traits>
25
+ #endif
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ namespace mr
30
+ {
31
+
32
+ template<typename T, class MR>
33
+ class allocator;
34
+
35
+ }
36
+
37
+ namespace detail
38
+ {
39
+
40
+ template<template <typename> class ExecutionPolicyCRTPBase>
41
+ struct allocator_aware_execution_policy
42
+ {
43
+ template<typename MemoryResource>
44
+ struct execute_with_memory_resource_type
45
+ {
46
+ typedef thrust::detail::execute_with_allocator<
47
+ thrust::mr::allocator<
48
+ thrust::detail::max_align_t,
49
+ MemoryResource
50
+ >,
51
+ ExecutionPolicyCRTPBase
52
+ > type;
53
+ };
54
+
55
+ template<typename Allocator>
56
+ struct execute_with_allocator_type
57
+ {
58
+ typedef thrust::detail::execute_with_allocator<
59
+ Allocator,
60
+ ExecutionPolicyCRTPBase
61
+ > type;
62
+ };
63
+
64
+ template<typename MemoryResource>
65
+ typename execute_with_memory_resource_type<MemoryResource>::type
66
+ operator()(MemoryResource * mem_res) const
67
+ {
68
+ return typename execute_with_memory_resource_type<MemoryResource>::type(mem_res);
69
+ }
70
+
71
+ template<typename Allocator>
72
+ typename execute_with_allocator_type<Allocator&>::type
73
+ operator()(Allocator &alloc) const
74
+ {
75
+ return typename execute_with_allocator_type<Allocator&>::type(alloc);
76
+ }
77
+
78
+ template<typename Allocator>
79
+ typename execute_with_allocator_type<Allocator>::type
80
+ operator()(const Allocator &alloc) const
81
+ {
82
+ return typename execute_with_allocator_type<Allocator>::type(alloc);
83
+ }
84
+
85
+ #if THRUST_CPP_DIALECT >= 2011
86
+ // just the rvalue overload
87
+ // perfect forwarding doesn't help, because a const reference has to be turned
88
+ // into a value by copying for the purpose of storing it in execute_with_allocator
89
+ template<typename Allocator,
90
+ typename std::enable_if<!std::is_lvalue_reference<Allocator>::value>::type * = nullptr>
91
+ typename execute_with_allocator_type<Allocator>::type
92
+ operator()(Allocator &&alloc) const
93
+ {
94
+ return typename execute_with_allocator_type<Allocator>::type(std::move(alloc));
95
+ }
96
+ #endif
97
+ };
98
+
99
+ } // end namespace detail
100
+
101
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/caching_allocator.h ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2020 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/mr/allocator.h>
21
+ #include <thrust/mr/disjoint_tls_pool.h>
22
+ #include <thrust/mr/new.h>
23
+ #include <thrust/mr/device_memory_resource.h>
24
+
25
+ THRUST_NAMESPACE_BEGIN
26
+
27
+ namespace detail
28
+ {
29
+ inline
30
+ thrust::mr::allocator<
31
+ char,
32
+ thrust::mr::disjoint_unsynchronized_pool_resource<
33
+ thrust::device_memory_resource,
34
+ thrust::mr::new_delete_resource
35
+ >
36
+ > single_device_tls_caching_allocator()
37
+ {
38
+ return {
39
+ &thrust::mr::tls_disjoint_pool(
40
+ thrust::mr::get_global_resource<thrust::device_memory_resource>(),
41
+ thrust::mr::get_global_resource<thrust::mr::new_delete_resource>()
42
+ )
43
+ };
44
+ }
45
+ }
46
+
47
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/copy.inl ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/copy.h>
21
+ #include <thrust/system/detail/generic/select_system.h>
22
+ #include <thrust/system/detail/generic/copy.h>
23
+ #include <thrust/system/detail/adl/copy.h>
24
+
25
+ THRUST_NAMESPACE_BEGIN
26
+
27
+ __thrust_exec_check_disable__
28
+ template<typename DerivedPolicy, typename InputIterator, typename OutputIterator>
29
+ __host__ __device__
30
+ OutputIterator copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
31
+ InputIterator first,
32
+ InputIterator last,
33
+ OutputIterator result)
34
+ {
35
+ using thrust::system::detail::generic::copy;
36
+ return copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result);
37
+ } // end copy()
38
+
39
+
40
+ __thrust_exec_check_disable__
41
+ template<typename DerivedPolicy, typename InputIterator, typename Size, typename OutputIterator>
42
+ __host__ __device__
43
+ OutputIterator copy_n(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
44
+ InputIterator first,
45
+ Size n,
46
+ OutputIterator result)
47
+ {
48
+ using thrust::system::detail::generic::copy_n;
49
+ return copy_n(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, n, result);
50
+ } // end copy_n()
51
+
52
+
53
+ namespace detail
54
+ {
55
+
56
+
57
+ __thrust_exec_check_disable__ // because we might call e.g. std::ostream_iterator's constructor
58
+ template<typename System1,
59
+ typename System2,
60
+ typename InputIterator,
61
+ typename OutputIterator>
62
+ __host__ __device__
63
+ OutputIterator two_system_copy(const thrust::execution_policy<System1> &system1,
64
+ const thrust::execution_policy<System2> &system2,
65
+ InputIterator first,
66
+ InputIterator last,
67
+ OutputIterator result)
68
+ {
69
+ using thrust::system::detail::generic::select_system;
70
+
71
+ return thrust::copy(select_system(thrust::detail::derived_cast(thrust::detail::strip_const(system1)), thrust::detail::derived_cast(thrust::detail::strip_const(system2))), first, last, result);
72
+ } // end two_system_copy()
73
+
74
+
75
+ __thrust_exec_check_disable__ // because we might call e.g. std::ostream_iterator's constructor
76
+ template<typename System1,
77
+ typename System2,
78
+ typename InputIterator,
79
+ typename Size,
80
+ typename OutputIterator>
81
+ __host__ __device__
82
+ OutputIterator two_system_copy_n(const thrust::execution_policy<System1> &system1,
83
+ const thrust::execution_policy<System2> &system2,
84
+ InputIterator first,
85
+ Size n,
86
+ OutputIterator result)
87
+ {
88
+ using thrust::system::detail::generic::select_system;
89
+
90
+ return thrust::copy_n(select_system(thrust::detail::derived_cast(thrust::detail::strip_const(system1)), thrust::detail::derived_cast(thrust::detail::strip_const(system2))), first, n, result);
91
+ } // end two_system_copy_n()
92
+
93
+
94
+ } // end detail
95
+
96
+
97
+ template<typename InputIterator,
98
+ typename OutputIterator>
99
+ OutputIterator copy(InputIterator first,
100
+ InputIterator last,
101
+ OutputIterator result)
102
+ {
103
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
104
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
105
+
106
+ System1 system1;
107
+ System2 system2;
108
+
109
+ return thrust::detail::two_system_copy(system1, system2, first, last, result);
110
+ } // end copy()
111
+
112
+
113
+ template<typename InputIterator,
114
+ typename Size,
115
+ typename OutputIterator>
116
+ OutputIterator copy_n(InputIterator first,
117
+ Size n,
118
+ OutputIterator result)
119
+ {
120
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
121
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
122
+
123
+ System1 system1;
124
+ System2 system2;
125
+
126
+ return thrust::detail::two_system_copy_n(system1, system2, first, n, result);
127
+ } // end copy_n()
128
+
129
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/count.inl ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/count.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/count.h>
24
+ #include <thrust/system/detail/adl/count.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename DerivedPolicy, typename InputIterator, typename EqualityComparable>
30
+ __host__ __device__
31
+ typename thrust::iterator_traits<InputIterator>::difference_type
32
+ count(const thrust::detail::execution_policy_base<DerivedPolicy> &exec, InputIterator first, InputIterator last, const EqualityComparable& value)
33
+ {
34
+ using thrust::system::detail::generic::count;
35
+ return count(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, value);
36
+ } // end count()
37
+
38
+
39
+ __thrust_exec_check_disable__
40
+ template<typename DerivedPolicy, typename InputIterator, typename Predicate>
41
+ __host__ __device__
42
+ typename thrust::iterator_traits<InputIterator>::difference_type
43
+ count_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec, InputIterator first, InputIterator last, Predicate pred)
44
+ {
45
+ using thrust::system::detail::generic::count_if;
46
+ return count_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
47
+ } // end count_if()
48
+
49
+
50
+ template <typename InputIterator, typename EqualityComparable>
51
+ typename thrust::iterator_traits<InputIterator>::difference_type
52
+ count(InputIterator first, InputIterator last, const EqualityComparable& value)
53
+ {
54
+ using thrust::system::detail::generic::select_system;
55
+
56
+ typedef typename thrust::iterator_system<InputIterator>::type System;
57
+
58
+ System system;
59
+
60
+ return thrust::count(select_system(system), first, last, value);
61
+ } // end count()
62
+
63
+
64
+ template <typename InputIterator, typename Predicate>
65
+ typename thrust::iterator_traits<InputIterator>::difference_type
66
+ count_if(InputIterator first, InputIterator last, Predicate pred)
67
+ {
68
+ using thrust::system::detail::generic::select_system;
69
+
70
+ typedef typename thrust::iterator_system<InputIterator>::type System;
71
+
72
+ System system;
73
+
74
+ return thrust::count_if(select_system(system), first, last, pred);
75
+ } // end count_if()
76
+
77
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/cpp11_required.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config/cpp_dialect.h>
20
+
21
+ #ifndef THRUST_CPP11_REQUIRED_NO_ERROR
22
+ # if THRUST_CPP_DIALECT < 2011
23
+ # error C++11 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++XX flag to it.
24
+ # endif
25
+ #endif
26
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/cpp14_required.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config/cpp_dialect.h>
20
+
21
+ #ifndef THRUST_CPP14_REQUIRED_NO_ERROR
22
+ # if THRUST_CPP_DIALECT < 2014
23
+ # error C++14 is required for this Thrust feature; please upgrade your compiler or pass the appropriate -std=c++14 flag to it.
24
+ # endif
25
+ #endif
26
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/cstdint.h ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) || \
22
+ (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG) || \
23
+ (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_INTEL)
24
+ #include <stdint.h>
25
+ #endif
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ namespace detail
30
+ {
31
+
32
+ #if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC)
33
+
34
+ #if (_MSC_VER < 1300)
35
+ typedef signed char int8_t;
36
+ typedef signed short int16_t;
37
+ typedef signed int int32_t;
38
+ typedef unsigned char uint8_t;
39
+ typedef unsigned short uint16_t;
40
+ typedef unsigned int uint32_t;
41
+ #else
42
+ typedef signed __int8 int8_t;
43
+ typedef signed __int16 int16_t;
44
+ typedef signed __int32 int32_t;
45
+ typedef unsigned __int8 uint8_t;
46
+ typedef unsigned __int16 uint16_t;
47
+ typedef unsigned __int32 uint32_t;
48
+ #endif
49
+ typedef signed __int64 int64_t;
50
+ typedef unsigned __int64 uint64_t;
51
+
52
+ #else
53
+
54
+ typedef ::int8_t int8_t;
55
+ typedef ::int16_t int16_t;
56
+ typedef ::int32_t int32_t;
57
+ typedef ::int64_t int64_t;
58
+ typedef ::uint8_t uint8_t;
59
+ typedef ::uint16_t uint16_t;
60
+ typedef ::uint32_t uint32_t;
61
+ typedef ::uint64_t uint64_t;
62
+
63
+ #endif
64
+
65
+
66
+ // an oracle to tell us how to define intptr_t
67
+ template<int word_size = sizeof(void*)> struct divine_intptr_t;
68
+ template<int word_size = sizeof(void*)> struct divine_uintptr_t;
69
+
70
+ // 32b platforms
71
+ template<> struct divine_intptr_t<4> { typedef thrust::detail::int32_t type; };
72
+ template<> struct divine_uintptr_t<4> { typedef thrust::detail::uint32_t type; };
73
+
74
+ // 64b platforms
75
+ template<> struct divine_intptr_t<8> { typedef thrust::detail::int64_t type; };
76
+ template<> struct divine_uintptr_t<8> { typedef thrust::detail::uint64_t type; };
77
+
78
+ typedef divine_intptr_t<>::type intptr_t;
79
+ typedef divine_uintptr_t<>::type uintptr_t;
80
+
81
+ } // end detail
82
+
83
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/device_delete.inl ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/device_delete.h>
21
+ #include <thrust/device_free.h>
22
+ #include <thrust/detail/allocator/destroy_range.h>
23
+
24
+ THRUST_NAMESPACE_BEGIN
25
+
26
+ namespace detail
27
+ {
28
+
29
+ // define an empty allocator class to use below
30
+ struct device_delete_allocator {};
31
+
32
+ }
33
+
34
+ template<typename T>
35
+ void device_delete(device_ptr<T> ptr,
36
+ const size_t n)
37
+ {
38
+ // we can use device_allocator to destroy the range
39
+ thrust::detail::device_delete_allocator a;
40
+ thrust::detail::destroy_range(a, ptr, n);
41
+ thrust::device_free(ptr);
42
+ } // end device_delete()
43
+
44
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/device_free.inl ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/device_free.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/detail/malloc_and_free.h>
24
+
25
+ THRUST_NAMESPACE_BEGIN
26
+
27
+ void device_free(thrust::device_ptr<void> ptr)
28
+ {
29
+ using thrust::system::detail::generic::select_system;
30
+
31
+ typedef thrust::iterator_system< thrust::device_ptr<void> >::type system;
32
+
33
+ // XXX lower to select_system(system) here
34
+ system s;
35
+
36
+ thrust::free(s, ptr);
37
+ } // end device_free()
38
+
39
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/device_new.inl ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/device_new.h>
21
+ #include <thrust/device_malloc.h>
22
+ #include <thrust/uninitialized_fill.h>
23
+
24
+ THRUST_NAMESPACE_BEGIN
25
+
26
+ template<typename T>
27
+ device_ptr<T> device_new(device_ptr<void> p,
28
+ const size_t n)
29
+ {
30
+ // XXX TODO dispatch n null device constructors at p here
31
+ // in the meantime, dispatch 1 null host constructor here
32
+ // and dispatch n copy constructors
33
+ return device_new<T>(p, T(), n);
34
+ } // end device_new()
35
+
36
+ template<typename T>
37
+ device_ptr<T> device_new(device_ptr<void> p,
38
+ const T &exemplar,
39
+ const size_t n)
40
+ {
41
+ device_ptr<T> result(reinterpret_cast<T*>(p.get()));
42
+
43
+ // run copy constructors at p here
44
+ thrust::uninitialized_fill(result, result + n, exemplar);
45
+
46
+ return result;
47
+ } // end device_new()
48
+
49
+ template<typename T>
50
+ device_ptr<T> device_new(const size_t n)
51
+ {
52
+ // call placement new
53
+ return device_new<T>(thrust::device_malloc<T>(n));
54
+ } // end device_new()
55
+
56
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/equal.inl ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/equal.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/equal.h>
24
+ #include <thrust/system/detail/adl/equal.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename System, typename InputIterator1, typename InputIterator2>
30
+ __host__ __device__
31
+ bool equal(const thrust::detail::execution_policy_base<System> &system, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
32
+ {
33
+ using thrust::system::detail::generic::equal;
34
+ return equal(thrust::detail::derived_cast(thrust::detail::strip_const(system)), first1, last1, first2);
35
+ } // end equal()
36
+
37
+
38
+ __thrust_exec_check_disable__
39
+ template<typename System, typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
40
+ __host__ __device__
41
+ bool equal(const thrust::detail::execution_policy_base<System> &system, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate binary_pred)
42
+ {
43
+ using thrust::system::detail::generic::equal;
44
+ return equal(thrust::detail::derived_cast(thrust::detail::strip_const(system)), first1, last1, first2, binary_pred);
45
+ } // end equal()
46
+
47
+
48
+ template <typename InputIterator1, typename InputIterator2>
49
+ bool equal(InputIterator1 first1, InputIterator1 last1,
50
+ InputIterator2 first2)
51
+ {
52
+ using thrust::system::detail::generic::select_system;
53
+
54
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
55
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
56
+
57
+ System1 system1;
58
+ System2 system2;
59
+
60
+ return thrust::equal(select_system(system1,system2), first1, last1, first2);
61
+ }
62
+
63
+
64
+ template <typename InputIterator1, typename InputIterator2,
65
+ typename BinaryPredicate>
66
+ bool equal(InputIterator1 first1, InputIterator1 last1,
67
+ InputIterator2 first2, BinaryPredicate binary_pred)
68
+ {
69
+ using thrust::system::detail::generic::select_system;
70
+
71
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
72
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
73
+
74
+ System1 system1;
75
+ System2 system2;
76
+
77
+ return thrust::equal(select_system(system1,system2), first1, last1, first2, binary_pred);
78
+ }
79
+
80
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/event_error.h ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /// \file thrust/detail/event_error.h
18
+ /// \brief \c thrust::future and thrust::future error handling types and codes.
19
+
20
+ #pragma once
21
+
22
+ #include <thrust/detail/config.h>
23
+ #include <thrust/detail/cpp14_required.h>
24
+
25
+ #if THRUST_CPP_DIALECT >= 2014
26
+
27
+ #include <thrust/detail/type_traits.h>
28
+ #include <thrust/system/error_code.h>
29
+
30
+ #include <stdexcept>
31
+
32
+ THRUST_NAMESPACE_BEGIN
33
+
34
+ enum class event_errc
35
+ {
36
+ unknown_event_error
37
+ , no_state
38
+ , no_content
39
+ , last_event_error
40
+ };
41
+
42
+ /// \return <tt>error_code(static_cast<int>(e), event_category())</tt>
43
+ inline error_code make_error_code(event_errc e);
44
+
45
+ /// \return <tt>error_condition(static_cast<int>(e), event_category())</tt>.
46
+ inline error_condition make_error_condition(event_errc e);
47
+
48
+ struct event_error_category : error_category
49
+ {
50
+ event_error_category() = default;
51
+
52
+ virtual char const* name() const
53
+ {
54
+ return "event";
55
+ }
56
+
57
+ virtual std::string message(int ev) const
58
+ {
59
+ switch (static_cast<event_errc>(ev))
60
+ {
61
+ case event_errc::no_state:
62
+ {
63
+ return "no_state: an operation that requires an event or future to have "
64
+ "a stream or content has been performed on a event or future "
65
+ "without either, e.g. a moved-from or default constructed event "
66
+ "or future (an event or future may have been consumed more than "
67
+ "once)";
68
+ }
69
+ case event_errc::no_content:
70
+ {
71
+ return "no_content: an operation that requires a future to have content "
72
+ "has been performed on future without any, e.g. a moved-from, "
73
+ "default constructed, or `thrust::new_stream` constructed future "
74
+ "(a future may have been consumed more than once)";
75
+ }
76
+ default:
77
+ {
78
+ return "unknown_event_error: an unknown error with a future "
79
+ "object has occurred";
80
+ }
81
+ };
82
+ }
83
+
84
+ virtual error_condition default_error_condition(int ev) const
85
+ {
86
+ if (
87
+ event_errc::last_event_error
88
+ >
89
+ static_cast<event_errc>(ev)
90
+ )
91
+ return make_error_condition(static_cast<event_errc>(ev));
92
+
93
+ return system_category().default_error_condition(ev);
94
+ }
95
+ };
96
+
97
+ /// Obtains a reference to the static error category object for the errors
98
+ /// related to futures and promises. The object is required to override the
99
+ /// virtual function error_category::name() to return a pointer to the string
100
+ /// "event". It is used to identify error codes provided in the
101
+ /// exceptions of type event_error.
102
+ inline error_category const& event_category()
103
+ {
104
+ static const event_error_category result;
105
+ return result;
106
+ }
107
+
108
+ namespace system
109
+ {
110
+ /// Specialization of \p is_error_code_enum for \p event_errc.
111
+ template<> struct is_error_code_enum<event_errc> : true_type {};
112
+ } // end system
113
+
114
+ /// \return <tt>error_code(static_cast<int>(e), event_category())</tt>
115
+ inline error_code make_error_code(event_errc e)
116
+ {
117
+ return error_code(static_cast<int>(e), event_category());
118
+ }
119
+
120
+ /// \return <tt>error_condition(static_cast<int>(e), event_category())</tt>.
121
+ inline error_condition make_error_condition(event_errc e)
122
+ {
123
+ return error_condition(static_cast<int>(e), event_category());
124
+ }
125
+
126
+ struct event_error : std::logic_error
127
+ {
128
+ __host__
129
+ explicit event_error(error_code ec)
130
+ : std::logic_error(ec.message()), ec_(ec)
131
+ {}
132
+
133
+ __host__
134
+ explicit event_error(event_errc e)
135
+ : event_error(make_error_code(e))
136
+ {}
137
+
138
+ __host__
139
+ error_code const& code() const noexcept
140
+ {
141
+ return ec_;
142
+ }
143
+
144
+ __host__
145
+ virtual ~event_error() noexcept {}
146
+
147
+ private:
148
+ error_code ec_;
149
+ };
150
+
151
+ inline bool operator==(event_error const& lhs, event_error const& rhs) noexcept
152
+ {
153
+ return lhs.code() == rhs.code();
154
+ }
155
+
156
+ inline bool operator<(event_error const& lhs, event_error const& rhs) noexcept
157
+ {
158
+ return lhs.code() < rhs.code();
159
+ }
160
+
161
+ THRUST_NAMESPACE_END
162
+
163
+ #endif // C++14
164
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/execute_with_allocator_fwd.h ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/detail/type_traits.h>
22
+
23
+ #if THRUST_CPP_DIALECT >= 2011
24
+ #include <thrust/detail/execute_with_dependencies.h>
25
+ #endif
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ namespace detail
30
+ {
31
+
32
+ template <typename Allocator, template <typename> class BaseSystem>
33
+ struct execute_with_allocator
34
+ : BaseSystem<execute_with_allocator<Allocator, BaseSystem> >
35
+ {
36
+ private:
37
+ typedef BaseSystem<execute_with_allocator<Allocator, BaseSystem> > super_t;
38
+
39
+ Allocator alloc;
40
+
41
+ public:
42
+ __host__ __device__
43
+ execute_with_allocator(super_t const& super, Allocator alloc_)
44
+ : super_t(super), alloc(alloc_)
45
+ {}
46
+
47
+ __thrust_exec_check_disable__
48
+ __host__ __device__
49
+ execute_with_allocator(Allocator alloc_)
50
+ : alloc(alloc_)
51
+ {}
52
+
53
+ typename remove_reference<Allocator>::type& get_allocator() { return alloc; }
54
+
55
+ #if THRUST_CPP_DIALECT >= 2011
56
+ template<typename ...Dependencies>
57
+ __host__
58
+ execute_with_allocator_and_dependencies<Allocator, BaseSystem, Dependencies...>
59
+ after(Dependencies&& ...dependencies) const
60
+ {
61
+ return { alloc, capture_as_dependency(THRUST_FWD(dependencies))... };
62
+ }
63
+
64
+ template<typename ...Dependencies>
65
+ __host__
66
+ execute_with_allocator_and_dependencies<Allocator, BaseSystem, Dependencies...>
67
+ after(std::tuple<Dependencies...>& dependencies) const
68
+ {
69
+ return { alloc, capture_as_dependency(dependencies) };
70
+ }
71
+ template<typename ...Dependencies>
72
+ __host__
73
+ execute_with_allocator_and_dependencies<Allocator, BaseSystem, Dependencies...>
74
+ after(std::tuple<Dependencies...>&& dependencies) const
75
+ {
76
+ return { alloc, capture_as_dependency(std::move(dependencies)) };
77
+ }
78
+
79
+ template<typename ...Dependencies>
80
+ __host__
81
+ execute_with_allocator_and_dependencies<Allocator, BaseSystem, Dependencies...>
82
+ rebind_after(Dependencies&& ...dependencies) const
83
+ {
84
+ return { alloc, capture_as_dependency(THRUST_FWD(dependencies))... };
85
+ }
86
+
87
+ template<typename ...Dependencies>
88
+ __host__
89
+ execute_with_allocator_and_dependencies<Allocator, BaseSystem, Dependencies...>
90
+ rebind_after(std::tuple<Dependencies...>& dependencies) const
91
+ {
92
+ return { alloc, capture_as_dependency(dependencies) };
93
+ }
94
+ template<typename ...Dependencies>
95
+ __host__
96
+ execute_with_allocator_and_dependencies<Allocator, BaseSystem, Dependencies...>
97
+ rebind_after(std::tuple<Dependencies...>&& dependencies) const
98
+ {
99
+ return { alloc, capture_as_dependency(std::move(dependencies)) };
100
+ }
101
+ #endif
102
+ };
103
+
104
+ } // namespace detail
105
+
106
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/execution_policy.h ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ THRUST_NAMESPACE_BEGIN
22
+
23
+ namespace detail
24
+ {
25
+
26
+ struct execution_policy_marker {};
27
+
28
+ // execution_policy_base serves as a guard against
29
+ // inifinite recursion in thrust entry points:
30
+ //
31
+ // template<typename DerivedPolicy>
32
+ // void foo(const thrust::detail::execution_policy_base<DerivedPolicy> &s)
33
+ // {
34
+ // using thrust::system::detail::generic::foo;
35
+ //
36
+ // foo(thrust::detail::derived_cast(thrust::detail::strip_const(s));
37
+ // }
38
+ //
39
+ // foo is not recursive when
40
+ // 1. DerivedPolicy is derived from thrust::execution_policy below
41
+ // 2. generic::foo takes thrust::execution_policy as a parameter
42
+ template<typename DerivedPolicy>
43
+ struct execution_policy_base : execution_policy_marker {};
44
+
45
+
46
+ template<typename DerivedPolicy>
47
+ constexpr __host__ __device__
48
+ execution_policy_base<DerivedPolicy> &strip_const(const execution_policy_base<DerivedPolicy> &x)
49
+ {
50
+ return const_cast<execution_policy_base<DerivedPolicy>&>(x);
51
+ }
52
+
53
+
54
+ template<typename DerivedPolicy>
55
+ constexpr __host__ __device__
56
+ DerivedPolicy &derived_cast(execution_policy_base<DerivedPolicy> &x)
57
+ {
58
+ return static_cast<DerivedPolicy&>(x);
59
+ }
60
+
61
+
62
+ template<typename DerivedPolicy>
63
+ constexpr __host__ __device__
64
+ const DerivedPolicy &derived_cast(const execution_policy_base<DerivedPolicy> &x)
65
+ {
66
+ return static_cast<const DerivedPolicy&>(x);
67
+ }
68
+
69
+ } // end detail
70
+
71
+ template<typename DerivedPolicy>
72
+ struct execution_policy
73
+ : thrust::detail::execution_policy_base<DerivedPolicy>
74
+ {};
75
+
76
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/fill.inl ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/fill.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/system/detail/generic/fill.h>
25
+ #include <thrust/system/detail/adl/fill.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy, typename ForwardIterator, typename T>
31
+ __host__ __device__
32
+ void fill(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
33
+ ForwardIterator first,
34
+ ForwardIterator last,
35
+ const T &value)
36
+ {
37
+ using thrust::system::detail::generic::fill;
38
+ return fill(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, value);
39
+ } // end fill()
40
+
41
+
42
+ __thrust_exec_check_disable__
43
+ template<typename DerivedPolicy, typename OutputIterator, typename Size, typename T>
44
+ __host__ __device__
45
+ OutputIterator fill_n(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
46
+ OutputIterator first,
47
+ Size n,
48
+ const T &value)
49
+ {
50
+ using thrust::system::detail::generic::fill_n;
51
+ return fill_n(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, n, value);
52
+ } // end fill_n()
53
+
54
+
55
+ template<typename ForwardIterator, typename T>
56
+ __host__ __device__
57
+ void fill(ForwardIterator first,
58
+ ForwardIterator last,
59
+ const T &value)
60
+ {
61
+ using thrust::system::detail::generic::select_system;
62
+
63
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
64
+
65
+ System system;
66
+
67
+ thrust::fill(select_system(system), first, last, value);
68
+ } // end fill()
69
+
70
+
71
+ template<typename OutputIterator, typename Size, typename T>
72
+ __host__ __device__
73
+ OutputIterator fill_n(OutputIterator first,
74
+ Size n,
75
+ const T &value)
76
+ {
77
+ using thrust::system::detail::generic::select_system;
78
+
79
+ typedef typename thrust::iterator_system<OutputIterator>::type System;
80
+
81
+ System system;
82
+
83
+ return thrust::fill_n(select_system(system), first, n, value);
84
+ } // end fill()
85
+
86
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/find.inl ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/iterator/iterator_traits.h>
21
+ #include <thrust/system/detail/generic/select_system.h>
22
+ #include <thrust/system/detail/generic/find.h>
23
+ #include <thrust/system/detail/adl/find.h>
24
+
25
+ THRUST_NAMESPACE_BEGIN
26
+
27
+ __thrust_exec_check_disable__
28
+ template<typename DerivedPolicy, typename InputIterator, typename T>
29
+ __host__ __device__
30
+ InputIterator find(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
31
+ InputIterator first,
32
+ InputIterator last,
33
+ const T& value)
34
+ {
35
+ using thrust::system::detail::generic::find;
36
+ return find(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, value);
37
+ } // end find()
38
+
39
+
40
+ __thrust_exec_check_disable__
41
+ template<typename DerivedPolicy, typename InputIterator, typename Predicate>
42
+ __host__ __device__
43
+ InputIterator find_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
44
+ InputIterator first,
45
+ InputIterator last,
46
+ Predicate pred)
47
+ {
48
+ using thrust::system::detail::generic::find_if;
49
+ return find_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
50
+ } // end find_if()
51
+
52
+
53
+ __thrust_exec_check_disable__
54
+ template<typename DerivedPolicy, typename InputIterator, typename Predicate>
55
+ __host__ __device__
56
+ InputIterator find_if_not(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
57
+ InputIterator first,
58
+ InputIterator last,
59
+ Predicate pred)
60
+ {
61
+ using thrust::system::detail::generic::find_if_not;
62
+ return find_if_not(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
63
+ } // end find_if_not()
64
+
65
+
66
+ template <typename InputIterator, typename T>
67
+ InputIterator find(InputIterator first,
68
+ InputIterator last,
69
+ const T& value)
70
+ {
71
+ using thrust::system::detail::generic::select_system;
72
+
73
+ typedef typename thrust::iterator_system<InputIterator>::type System;
74
+
75
+ System system;
76
+
77
+ return thrust::find(select_system(system), first, last, value);
78
+ }
79
+
80
+ template <typename InputIterator, typename Predicate>
81
+ InputIterator find_if(InputIterator first,
82
+ InputIterator last,
83
+ Predicate pred)
84
+ {
85
+ using thrust::system::detail::generic::select_system;
86
+
87
+ typedef typename thrust::iterator_system<InputIterator>::type System;
88
+
89
+ System system;
90
+
91
+ return thrust::find_if(select_system(system), first, last, pred);
92
+ }
93
+
94
+ template <typename InputIterator, typename Predicate>
95
+ InputIterator find_if_not(InputIterator first,
96
+ InputIterator last,
97
+ Predicate pred)
98
+ {
99
+ using thrust::system::detail::generic::select_system;
100
+
101
+ typedef typename thrust::iterator_system<InputIterator>::type System;
102
+
103
+ System system;
104
+
105
+ return thrust::find_if_not(select_system(system), first, last, pred);
106
+ }
107
+
108
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/for_each.inl ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/for_each.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/for_each.h>
24
+ #include <thrust/system/detail/adl/for_each.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename DerivedPolicy,
30
+ typename InputIterator,
31
+ typename UnaryFunction>
32
+ __host__ __device__
33
+ InputIterator for_each(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
34
+ InputIterator first,
35
+ InputIterator last,
36
+ UnaryFunction f)
37
+ {
38
+ using thrust::system::detail::generic::for_each;
39
+
40
+ return for_each(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, f);
41
+ }
42
+
43
+
44
+ template<typename InputIterator,
45
+ typename UnaryFunction>
46
+ InputIterator for_each(InputIterator first,
47
+ InputIterator last,
48
+ UnaryFunction f)
49
+ {
50
+ using thrust::system::detail::generic::select_system;
51
+ typedef typename thrust::iterator_system<InputIterator>::type System;
52
+
53
+ System system;
54
+ return thrust::for_each(select_system(system), first, last, f);
55
+ } // end for_each()
56
+
57
+ __thrust_exec_check_disable__
58
+ template<typename DerivedPolicy, typename InputIterator, typename Size, typename UnaryFunction>
59
+ __host__ __device__
60
+ InputIterator for_each_n(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
61
+ InputIterator first,
62
+ Size n,
63
+ UnaryFunction f)
64
+ {
65
+ using thrust::system::detail::generic::for_each_n;
66
+
67
+ return for_each_n(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, n, f);
68
+ } // end for_each_n()
69
+
70
+
71
+ template<typename InputIterator,
72
+ typename Size,
73
+ typename UnaryFunction>
74
+ InputIterator for_each_n(InputIterator first,
75
+ Size n,
76
+ UnaryFunction f)
77
+ {
78
+ using thrust::system::detail::generic::select_system;
79
+
80
+ typedef typename thrust::iterator_system<InputIterator>::type System;
81
+
82
+ System system;
83
+ return thrust::for_each_n(select_system(system), first, n, f);
84
+ } // end for_each_n()
85
+
86
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/function.h ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/raw_reference_cast.h>
21
+
22
+ THRUST_NAMESPACE_BEGIN
23
+
24
+ namespace detail
25
+ {
26
+
27
+ template <typename Function, typename Result>
28
+ struct wrapped_function
29
+ {
30
+ // mutable because Function::operator() might be const
31
+ mutable Function m_f;
32
+
33
+ inline __host__ __device__
34
+ wrapped_function()
35
+ : m_f()
36
+ {}
37
+
38
+ inline __host__ __device__
39
+ wrapped_function(const Function& f)
40
+ : m_f(f)
41
+ {}
42
+
43
+ __thrust_exec_check_disable__
44
+ template <typename Argument>
45
+ __thrust_forceinline__ __host__ __device__
46
+ Result operator()(Argument& x) const
47
+ {
48
+ return static_cast<Result>(m_f(thrust::raw_reference_cast(x)));
49
+ }
50
+
51
+ __thrust_exec_check_disable__
52
+ template <typename Argument>
53
+ __thrust_forceinline__ __host__ __device__
54
+ Result operator()(const Argument& x) const
55
+ {
56
+ return static_cast<Result>(m_f(thrust::raw_reference_cast(x)));
57
+ }
58
+
59
+ __thrust_exec_check_disable__
60
+ template <typename Argument1, typename Argument2>
61
+ __thrust_forceinline__ __host__ __device__
62
+ Result operator()(Argument1& x, Argument2& y) const
63
+ {
64
+ return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
65
+ thrust::raw_reference_cast(y)));
66
+ }
67
+
68
+ __thrust_exec_check_disable__
69
+ template <typename Argument1, typename Argument2>
70
+ __thrust_forceinline__ __host__ __device__
71
+ Result operator()(const Argument1& x, Argument2& y) const
72
+ {
73
+ return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
74
+ thrust::raw_reference_cast(y)));
75
+ }
76
+
77
+ __thrust_exec_check_disable__
78
+ template <typename Argument1, typename Argument2>
79
+ __thrust_forceinline__ __host__ __device__
80
+ Result operator()(const Argument1& x, const Argument2& y) const
81
+ {
82
+ return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
83
+ thrust::raw_reference_cast(y)));
84
+ }
85
+
86
+ __thrust_exec_check_disable__
87
+ template <typename Argument1, typename Argument2>
88
+ __thrust_forceinline__ __host__ __device__
89
+ Result operator()(Argument1& x, const Argument2& y) const
90
+ {
91
+ return static_cast<Result>(m_f(thrust::raw_reference_cast(x),
92
+ thrust::raw_reference_cast(y)));
93
+ }
94
+ }; // end wrapped_function
95
+
96
+ // Specialize for void return types:
97
+ template <typename Function>
98
+ struct wrapped_function<Function, void>
99
+ {
100
+ // mutable because Function::operator() might be const
101
+ mutable Function m_f;
102
+ inline __host__ __device__
103
+ wrapped_function()
104
+ : m_f()
105
+ {}
106
+
107
+ inline __host__ __device__
108
+ wrapped_function(const Function& f)
109
+ : m_f(f)
110
+ {}
111
+
112
+ __thrust_exec_check_disable__
113
+ template <typename Argument>
114
+ __thrust_forceinline__ __host__ __device__
115
+ void operator()(Argument& x) const
116
+ {
117
+ m_f(thrust::raw_reference_cast(x));
118
+ }
119
+
120
+ __thrust_exec_check_disable__
121
+ template <typename Argument>
122
+ __thrust_forceinline__ __host__ __device__
123
+ void operator()(const Argument& x) const
124
+ {
125
+ m_f(thrust::raw_reference_cast(x));
126
+ }
127
+
128
+ __thrust_exec_check_disable__
129
+ template <typename Argument1, typename Argument2>
130
+ __thrust_forceinline__ __host__ __device__
131
+ void operator()(Argument1& x, Argument2& y) const
132
+ {
133
+ m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
134
+ }
135
+
136
+ __thrust_exec_check_disable__
137
+ template <typename Argument1, typename Argument2>
138
+ __thrust_forceinline__ __host__ __device__
139
+ void operator()(const Argument1& x, Argument2& y) const
140
+ {
141
+ m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
142
+ }
143
+ __thrust_exec_check_disable__
144
+ template <typename Argument1, typename Argument2>
145
+ __thrust_forceinline__ __host__ __device__
146
+ void operator()(const Argument1& x, const Argument2& y) const
147
+ {
148
+ m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
149
+ }
150
+ __thrust_exec_check_disable__
151
+ template <typename Argument1, typename Argument2>
152
+ __thrust_forceinline__ __host__ __device__
153
+ void operator()(Argument1& x, const Argument2& y) const
154
+ {
155
+ m_f(thrust::raw_reference_cast(x), thrust::raw_reference_cast(y));
156
+ }
157
+ }; // end wrapped_function
158
+
159
+ } // namespace detail
160
+
161
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/functional.inl ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/functional.h>
22
+
23
+ THRUST_NAMESPACE_BEGIN
24
+
25
+ namespace detail
26
+ {
27
+
28
+ template<typename Operation>
29
+ struct unary_traits_imp;
30
+
31
+ template<typename Operation>
32
+ struct unary_traits_imp<Operation*>
33
+ {
34
+ typedef Operation function_type;
35
+ typedef const function_type & param_type;
36
+ typedef typename Operation::result_type result_type;
37
+ typedef typename Operation::argument_type argument_type;
38
+ }; // end unary_traits_imp
39
+
40
+ template<typename Result, typename Argument>
41
+ struct unary_traits_imp<Result(*)(Argument)>
42
+ {
43
+ typedef Result (*function_type)(Argument);
44
+ typedef Result (*param_type)(Argument);
45
+ typedef Result result_type;
46
+ typedef Argument argument_type;
47
+ }; // end unary_traits_imp
48
+
49
+ template<typename Operation>
50
+ struct binary_traits_imp;
51
+
52
+ template<typename Operation>
53
+ struct binary_traits_imp<Operation*>
54
+ {
55
+ typedef Operation function_type;
56
+ typedef const function_type & param_type;
57
+ typedef typename Operation::result_type result_type;
58
+ typedef typename Operation::first_argument_type first_argument_type;
59
+ typedef typename Operation::second_argument_type second_argument_type;
60
+ }; // end binary_traits_imp
61
+
62
+ template<typename Result, typename Argument1, typename Argument2>
63
+ struct binary_traits_imp<Result(*)(Argument1, Argument2)>
64
+ {
65
+ typedef Result (*function_type)(Argument1, Argument2);
66
+ typedef Result (*param_type)(Argument1, Argument2);
67
+ typedef Result result_type;
68
+ typedef Argument1 first_argument_type;
69
+ typedef Argument2 second_argument_type;
70
+ }; // end binary_traits_imp
71
+
72
+ } // end detail
73
+
74
+ template<typename Operation>
75
+ struct unary_traits
76
+ {
77
+ typedef typename detail::unary_traits_imp<Operation*>::function_type function_type;
78
+ typedef typename detail::unary_traits_imp<Operation*>::param_type param_type;
79
+ typedef typename detail::unary_traits_imp<Operation*>::result_type result_type;
80
+ typedef typename detail::unary_traits_imp<Operation*>::argument_type argument_type;
81
+ }; // end unary_traits
82
+
83
+ template<typename Result, typename Argument>
84
+ struct unary_traits<Result(*)(Argument)>
85
+ {
86
+ typedef Result (*function_type)(Argument);
87
+ typedef Result (*param_type)(Argument);
88
+ typedef Result result_type;
89
+ typedef Argument argument_type;
90
+ }; // end unary_traits
91
+
92
+ template<typename Operation>
93
+ struct binary_traits
94
+ {
95
+ typedef typename detail::binary_traits_imp<Operation*>::function_type function_type;
96
+ typedef typename detail::binary_traits_imp<Operation*>::param_type param_type;
97
+ typedef typename detail::binary_traits_imp<Operation*>::result_type result_type;
98
+ typedef typename detail::binary_traits_imp<Operation*>::first_argument_type first_argument_type;
99
+ typedef typename detail::binary_traits_imp<Operation*>::second_argument_type second_argument_type;
100
+ }; // end binary_traits
101
+
102
+ template<typename Result, typename Argument1, typename Argument2>
103
+ struct binary_traits<Result(*)(Argument1, Argument2)>
104
+ {
105
+ typedef Result (*function_type)(Argument1, Argument2);
106
+ typedef Result (*param_type)(Argument1, Argument2);
107
+ typedef Result result_type;
108
+ typedef Argument1 first_argument_type;
109
+ typedef Argument2 second_argument_type;
110
+ }; // end binary_traits
111
+
112
+ template<typename Predicate>
113
+ __host__ __device__
114
+ unary_negate<Predicate> not1(const Predicate &pred)
115
+ {
116
+ return unary_negate<Predicate>(pred);
117
+ } // end not1()
118
+
119
+ template<typename BinaryPredicate>
120
+ __host__ __device__
121
+ binary_negate<BinaryPredicate> not2(const BinaryPredicate &pred)
122
+ {
123
+ return binary_negate<BinaryPredicate>(pred);
124
+ } // end not2()
125
+
126
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/generate.inl ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/generate.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/system/detail/generic/generate.h>
25
+ #include <thrust/system/detail/adl/generate.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy,
31
+ typename ForwardIterator,
32
+ typename Generator>
33
+ __host__ __device__
34
+ void generate(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
35
+ ForwardIterator first,
36
+ ForwardIterator last,
37
+ Generator gen)
38
+ {
39
+ using thrust::system::detail::generic::generate;
40
+ return generate(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, gen);
41
+ } // end generate()
42
+
43
+
44
+ __thrust_exec_check_disable__
45
+ template<typename DerivedPolicy,
46
+ typename OutputIterator,
47
+ typename Size,
48
+ typename Generator>
49
+ __host__ __device__
50
+ OutputIterator generate_n(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
51
+ OutputIterator first,
52
+ Size n,
53
+ Generator gen)
54
+ {
55
+ using thrust::system::detail::generic::generate_n;
56
+ return generate_n(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, n, gen);
57
+ } // end generate_n()
58
+
59
+
60
+ template<typename ForwardIterator,
61
+ typename Generator>
62
+ void generate(ForwardIterator first,
63
+ ForwardIterator last,
64
+ Generator gen)
65
+ {
66
+ using thrust::system::detail::generic::select_system;
67
+
68
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
69
+
70
+ System system;
71
+
72
+ return thrust::generate(select_system(system), first, last, gen);
73
+ } // end generate()
74
+
75
+
76
+ template<typename OutputIterator,
77
+ typename Size,
78
+ typename Generator>
79
+ OutputIterator generate_n(OutputIterator first,
80
+ Size n,
81
+ Generator gen)
82
+ {
83
+ using thrust::system::detail::generic::select_system;
84
+
85
+ typedef typename thrust::iterator_system<OutputIterator>::type System;
86
+
87
+ System system;
88
+
89
+ return thrust::generate_n(select_system(system), first, n, gen);
90
+ } // end generate_n()
91
+
92
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/get_iterator_value.h ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ /*
3
+ * Copyright 2008-2016 NVIDIA Corporation
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ #include <thrust/detail/config.h>
19
+ #include <thrust/iterator/iterator_traits.h>
20
+ #include <thrust/execution_policy.h>
21
+ #include <thrust/detail/type_traits/pointer_traits.h>
22
+ #include <thrust/system/detail/generic/memory.h> // for get_value()
23
+
24
+ THRUST_NAMESPACE_BEGIN
25
+
26
+ namespace detail {
27
+
28
+ // get_iterator_value specialization on iterators
29
+ // --------------------------------------------------
30
+ // it is okay to dereference iterator in the usual way
31
+ template<typename DerivedPolicy, typename Iterator>
32
+ __host__ __device__
33
+ typename thrust::iterator_traits<Iterator>::value_type
34
+ get_iterator_value(thrust::execution_policy<DerivedPolicy> &, Iterator it)
35
+ {
36
+ return *it;
37
+ } // get_iterator_value(exec,Iterator);
38
+
39
+ // get_iterator_value specialization on pointer
40
+ // ----------------------------------------------
41
+ // we can't just dereference a pointer in the usual way, because
42
+ // it may point to a location in the device memory.
43
+ // we use get_value(exec,pointer*) function
44
+ // to perform a dereferencing consistent with the execution policy
45
+ template<typename DerivedPolicy, typename Pointer>
46
+ __host__ __device__
47
+ typename thrust::detail::pointer_traits<Pointer*>::element_type
48
+ get_iterator_value(thrust::execution_policy<DerivedPolicy> &exec, Pointer* ptr)
49
+ {
50
+ return get_value(derived_cast(exec),ptr);
51
+ } // get_iterator_value(exec,Pointer*)
52
+
53
+ } // namespace detail
54
+
55
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/inner_product.inl ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/inner_product.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/inner_product.h>
24
+ #include <thrust/system/detail/adl/inner_product.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename DerivedPolicy,
30
+ typename InputIterator1,
31
+ typename InputIterator2,
32
+ typename OutputType>
33
+ __host__ __device__
34
+ OutputType inner_product(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
35
+ InputIterator1 first1,
36
+ InputIterator1 last1,
37
+ InputIterator2 first2,
38
+ OutputType init)
39
+ {
40
+ using thrust::system::detail::generic::inner_product;
41
+ return inner_product(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, init);
42
+ } // end inner_product()
43
+
44
+
45
+ __thrust_exec_check_disable__
46
+ template<typename DerivedPolicy,
47
+ typename InputIterator1,
48
+ typename InputIterator2,
49
+ typename OutputType,
50
+ typename BinaryFunction1,
51
+ typename BinaryFunction2>
52
+ __host__ __device__
53
+ OutputType inner_product(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
54
+ InputIterator1 first1,
55
+ InputIterator1 last1,
56
+ InputIterator2 first2,
57
+ OutputType init,
58
+ BinaryFunction1 binary_op1,
59
+ BinaryFunction2 binary_op2)
60
+ {
61
+ using thrust::system::detail::generic::inner_product;
62
+ return inner_product(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, init, binary_op1, binary_op2);
63
+ } // end inner_product()
64
+
65
+
66
+ template<typename InputIterator1, typename InputIterator2, typename OutputType>
67
+ OutputType
68
+ inner_product(InputIterator1 first1, InputIterator1 last1,
69
+ InputIterator2 first2, OutputType init)
70
+ {
71
+ using thrust::system::detail::generic::select_system;
72
+
73
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
74
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
75
+
76
+ System1 system1;
77
+ System2 system2;
78
+
79
+ return thrust::inner_product(select_system(system1,system2), first1, last1, first2, init);
80
+ } // end inner_product()
81
+
82
+
83
+ template<typename InputIterator1, typename InputIterator2, typename OutputType,
84
+ typename BinaryFunction1, typename BinaryFunction2>
85
+ OutputType
86
+ inner_product(InputIterator1 first1, InputIterator1 last1,
87
+ InputIterator2 first2, OutputType init,
88
+ BinaryFunction1 binary_op1, BinaryFunction2 binary_op2)
89
+ {
90
+ using thrust::system::detail::generic::select_system;
91
+
92
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
93
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
94
+
95
+ System1 system1;
96
+ System2 system2;
97
+
98
+ return thrust::inner_product(select_system(system1,system2), first1, last1, first2, init, binary_op1, binary_op2);
99
+ } // end inner_product()
100
+
101
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/internal_functional.h ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+
18
+ /*! \file internal_functional.inl
19
+ * \brief Non-public functionals used to implement algorithm internals.
20
+ */
21
+
22
+ #pragma once
23
+
24
+ #include <thrust/tuple.h>
25
+ #include <thrust/iterator/iterator_traits.h>
26
+ #include <thrust/detail/config.h>
27
+ #include <thrust/detail/static_assert.h>
28
+ #include <thrust/detail/type_traits.h>
29
+ #include <thrust/iterator/detail/tuple_of_iterator_references.h>
30
+ #include <thrust/detail/raw_reference_cast.h>
31
+ #include <thrust/detail/memory_wrapper.h> // for ::new
32
+
33
+ THRUST_NAMESPACE_BEGIN
34
+
35
+ namespace detail
36
+ {
37
+
38
+ // unary_negate does not need to know argument_type
39
+ template<typename Predicate>
40
+ struct unary_negate
41
+ {
42
+ typedef bool result_type;
43
+
44
+ Predicate pred;
45
+
46
+ __host__ __device__
47
+ explicit unary_negate(const Predicate& pred) : pred(pred) {}
48
+
49
+ template <typename T>
50
+ __host__ __device__
51
+ bool operator()(const T& x)
52
+ {
53
+ return !bool(pred(x));
54
+ }
55
+ };
56
+
57
+ // binary_negate does not need to know first_argument_type or second_argument_type
58
+ template<typename Predicate>
59
+ struct binary_negate
60
+ {
61
+ typedef bool result_type;
62
+
63
+ Predicate pred;
64
+
65
+ __host__ __device__
66
+ explicit binary_negate(const Predicate& pred) : pred(pred) {}
67
+
68
+ template <typename T1, typename T2>
69
+ __host__ __device__
70
+ bool operator()(const T1& x, const T2& y)
71
+ {
72
+ return !bool(pred(x,y));
73
+ }
74
+ };
75
+
76
+ template<typename Predicate>
77
+ __host__ __device__
78
+ thrust::detail::unary_negate<Predicate> not1(const Predicate &pred)
79
+ {
80
+ return thrust::detail::unary_negate<Predicate>(pred);
81
+ }
82
+
83
+ template<typename Predicate>
84
+ __host__ __device__
85
+ thrust::detail::binary_negate<Predicate> not2(const Predicate &pred)
86
+ {
87
+ return thrust::detail::binary_negate<Predicate>(pred);
88
+ }
89
+
90
+
91
+ // convert a predicate to a 0 or 1 integral value
92
+ template<typename Predicate, typename IntegralType>
93
+ struct predicate_to_integral
94
+ {
95
+ Predicate pred;
96
+
97
+ __host__ __device__
98
+ explicit predicate_to_integral(const Predicate& pred) : pred(pred) {}
99
+
100
+ template <typename T>
101
+ __host__ __device__
102
+ IntegralType operator()(const T& x)
103
+ {
104
+ return pred(x) ? IntegralType(1) : IntegralType(0);
105
+ }
106
+ };
107
+
108
+
109
+ // note that detail::equal_to does not force conversion from T2 -> T1 as equal_to does
110
+ template<typename T1>
111
+ struct equal_to
112
+ {
113
+ typedef bool result_type;
114
+
115
+ template <typename T2>
116
+ __host__ __device__
117
+ bool operator()(const T1& lhs, const T2& rhs) const
118
+ {
119
+ return lhs == rhs;
120
+ }
121
+ };
122
+
123
+ // note that equal_to_value does not force conversion from T2 -> T1 as equal_to does
124
+ template<typename T2>
125
+ struct equal_to_value
126
+ {
127
+ T2 rhs;
128
+
129
+ __host__ __device__
130
+ equal_to_value(const T2& rhs) : rhs(rhs) {}
131
+
132
+ template <typename T1>
133
+ __host__ __device__
134
+ bool operator()(const T1& lhs) const
135
+ {
136
+ return lhs == rhs;
137
+ }
138
+ };
139
+
140
+ template<typename Predicate>
141
+ struct tuple_binary_predicate
142
+ {
143
+ typedef bool result_type;
144
+
145
+ __host__ __device__
146
+ tuple_binary_predicate(const Predicate& p) : pred(p) {}
147
+
148
+ template<typename Tuple>
149
+ __host__ __device__
150
+ bool operator()(const Tuple& t) const
151
+ {
152
+ return pred(thrust::get<0>(t), thrust::get<1>(t));
153
+ }
154
+
155
+ mutable Predicate pred;
156
+ };
157
+
158
+ template<typename Predicate>
159
+ struct tuple_not_binary_predicate
160
+ {
161
+ typedef bool result_type;
162
+
163
+ __host__ __device__
164
+ tuple_not_binary_predicate(const Predicate& p) : pred(p) {}
165
+
166
+ template<typename Tuple>
167
+ __host__ __device__
168
+ bool operator()(const Tuple& t) const
169
+ {
170
+ return !pred(thrust::get<0>(t), thrust::get<1>(t));
171
+ }
172
+
173
+ mutable Predicate pred;
174
+ };
175
+
176
+ template<typename Generator>
177
+ struct host_generate_functor
178
+ {
179
+ typedef void result_type;
180
+
181
+ __thrust_exec_check_disable__
182
+ __host__ __device__
183
+ host_generate_functor(Generator g)
184
+ : gen(g) {}
185
+
186
+ // operator() does not take an lvalue reference because some iterators
187
+ // produce temporary proxy references when dereferenced. for example,
188
+ // consider the temporary tuple of references produced by zip_iterator.
189
+ // such temporaries cannot bind to an lvalue reference.
190
+ //
191
+ // to WAR this, accept a const reference (which is bindable to a temporary),
192
+ // and const_cast in the implementation.
193
+ //
194
+ // XXX change to an rvalue reference upon c++0x (which either a named variable
195
+ // or temporary can bind to)
196
+ template<typename T>
197
+ __host__
198
+ void operator()(const T &x)
199
+ {
200
+ // we have to be naughty and const_cast this to get it to work
201
+ T &lvalue = const_cast<T&>(x);
202
+
203
+ // this assigns correctly whether x is a true reference or proxy
204
+ lvalue = gen();
205
+ }
206
+
207
+ Generator gen;
208
+ };
209
+
210
+ template<typename Generator>
211
+ struct device_generate_functor
212
+ {
213
+ typedef void result_type;
214
+
215
+ __thrust_exec_check_disable__
216
+ __host__ __device__
217
+ device_generate_functor(Generator g)
218
+ : gen(g) {}
219
+
220
+ // operator() does not take an lvalue reference because some iterators
221
+ // produce temporary proxy references when dereferenced. for example,
222
+ // consider the temporary tuple of references produced by zip_iterator.
223
+ // such temporaries cannot bind to an lvalue reference.
224
+ //
225
+ // to WAR this, accept a const reference (which is bindable to a temporary),
226
+ // and const_cast in the implementation.
227
+ //
228
+ // XXX change to an rvalue reference upon c++0x (which either a named variable
229
+ // or temporary can bind to)
230
+ template<typename T>
231
+ __host__ __device__
232
+ void operator()(const T &x)
233
+ {
234
+ // we have to be naughty and const_cast this to get it to work
235
+ T &lvalue = const_cast<T&>(x);
236
+
237
+ // this assigns correctly whether x is a true reference or proxy
238
+ lvalue = gen();
239
+ }
240
+
241
+ Generator gen;
242
+ };
243
+
244
+ template<typename System, typename Generator>
245
+ struct generate_functor
246
+ : thrust::detail::eval_if<
247
+ thrust::detail::is_convertible<System, thrust::host_system_tag>::value,
248
+ thrust::detail::identity_<host_generate_functor<Generator> >,
249
+ thrust::detail::identity_<device_generate_functor<Generator> >
250
+ >
251
+ {};
252
+
253
+
254
+ template<typename ResultType, typename BinaryFunction>
255
+ struct zipped_binary_op
256
+ {
257
+ typedef ResultType result_type;
258
+
259
+ __host__ __device__
260
+ zipped_binary_op(BinaryFunction binary_op)
261
+ : m_binary_op(binary_op) {}
262
+
263
+ template<typename Tuple>
264
+ __host__ __device__
265
+ inline result_type operator()(Tuple t)
266
+ {
267
+ return m_binary_op(thrust::get<0>(t), thrust::get<1>(t));
268
+ }
269
+
270
+ BinaryFunction m_binary_op;
271
+ };
272
+
273
+
274
+ template<typename T>
275
+ struct is_non_const_reference
276
+ : thrust::detail::and_<
277
+ thrust::detail::not_<thrust::detail::is_const<T> >,
278
+ thrust::detail::or_<thrust::detail::is_reference<T>,
279
+ thrust::detail::is_proxy_reference<T> >
280
+ >
281
+ {};
282
+
283
+ template<typename T> struct is_tuple_of_iterator_references : thrust::detail::false_type {};
284
+
285
+ template<typename... Ts>
286
+ struct is_tuple_of_iterator_references<
287
+ thrust::detail::tuple_of_iterator_references<
288
+ Ts...
289
+ >
290
+ >
291
+ : thrust::detail::true_type
292
+ {};
293
+
294
+ // use this enable_if to avoid assigning to temporaries in the transform functors below
295
+ // XXX revisit this problem with c++11 perfect forwarding
296
+ template<typename T>
297
+ struct enable_if_non_const_reference_or_tuple_of_iterator_references
298
+ : thrust::detail::enable_if<
299
+ is_non_const_reference<T>::value || is_tuple_of_iterator_references<T>::value
300
+ >
301
+ {};
302
+
303
+
304
+ template<typename UnaryFunction>
305
+ struct unary_transform_functor
306
+ {
307
+ typedef void result_type;
308
+
309
+ UnaryFunction f;
310
+
311
+ __host__ __device__
312
+ unary_transform_functor(UnaryFunction f)
313
+ : f(f)
314
+ {}
315
+
316
+ __thrust_exec_check_disable__
317
+ template<typename Tuple>
318
+ inline __host__ __device__
319
+ typename enable_if_non_const_reference_or_tuple_of_iterator_references<
320
+ typename thrust::tuple_element<1,Tuple>::type
321
+ >::type
322
+ operator()(Tuple t)
323
+ {
324
+ thrust::get<1>(t) = f(thrust::get<0>(t));
325
+ }
326
+ };
327
+
328
+
329
+ template<typename BinaryFunction>
330
+ struct binary_transform_functor
331
+ {
332
+ BinaryFunction f;
333
+
334
+ __host__ __device__
335
+ binary_transform_functor(BinaryFunction f)
336
+ : f(f)
337
+ {}
338
+
339
+ __thrust_exec_check_disable__
340
+ template<typename Tuple>
341
+ inline __host__ __device__
342
+ typename enable_if_non_const_reference_or_tuple_of_iterator_references<
343
+ typename thrust::tuple_element<2,Tuple>::type
344
+ >::type
345
+ operator()(Tuple t)
346
+ {
347
+ thrust::get<2>(t) = f(thrust::get<0>(t), thrust::get<1>(t));
348
+ }
349
+ };
350
+
351
+
352
+ template<typename UnaryFunction, typename Predicate>
353
+ struct unary_transform_if_functor
354
+ {
355
+ UnaryFunction unary_op;
356
+ Predicate pred;
357
+
358
+ __host__ __device__
359
+ unary_transform_if_functor(UnaryFunction unary_op, Predicate pred)
360
+ : unary_op(unary_op), pred(pred)
361
+ {}
362
+
363
+ __thrust_exec_check_disable__
364
+ template<typename Tuple>
365
+ inline __host__ __device__
366
+ typename enable_if_non_const_reference_or_tuple_of_iterator_references<
367
+ typename thrust::tuple_element<1,Tuple>::type
368
+ >::type
369
+ operator()(Tuple t)
370
+ {
371
+ if(pred(thrust::get<0>(t)))
372
+ {
373
+ thrust::get<1>(t) = unary_op(thrust::get<0>(t));
374
+ }
375
+ }
376
+ }; // end unary_transform_if_functor
377
+
378
+
379
+ template<typename UnaryFunction, typename Predicate>
380
+ struct unary_transform_if_with_stencil_functor
381
+ {
382
+ UnaryFunction unary_op;
383
+ Predicate pred;
384
+
385
+ __host__ __device__
386
+ unary_transform_if_with_stencil_functor(UnaryFunction unary_op, Predicate pred)
387
+ : unary_op(unary_op), pred(pred)
388
+ {}
389
+
390
+ __thrust_exec_check_disable__
391
+ template<typename Tuple>
392
+ inline __host__ __device__
393
+ typename enable_if_non_const_reference_or_tuple_of_iterator_references<
394
+ typename thrust::tuple_element<2,Tuple>::type
395
+ >::type
396
+ operator()(Tuple t)
397
+ {
398
+ if(pred(thrust::get<1>(t)))
399
+ thrust::get<2>(t) = unary_op(thrust::get<0>(t));
400
+ }
401
+ }; // end unary_transform_if_with_stencil_functor
402
+
403
+
404
+ template<typename BinaryFunction, typename Predicate>
405
+ struct binary_transform_if_functor
406
+ {
407
+ BinaryFunction binary_op;
408
+ Predicate pred;
409
+
410
+ __host__ __device__
411
+ binary_transform_if_functor(BinaryFunction binary_op, Predicate pred)
412
+ : binary_op(binary_op), pred(pred) {}
413
+
414
+ __thrust_exec_check_disable__
415
+ template<typename Tuple>
416
+ inline __host__ __device__
417
+ typename enable_if_non_const_reference_or_tuple_of_iterator_references<
418
+ typename thrust::tuple_element<3,Tuple>::type
419
+ >::type
420
+ operator()(Tuple t)
421
+ {
422
+ if(pred(thrust::get<2>(t)))
423
+ thrust::get<3>(t) = binary_op(thrust::get<0>(t), thrust::get<1>(t));
424
+ }
425
+ }; // end binary_transform_if_functor
426
+
427
+
428
+ template<typename T>
429
+ struct host_destroy_functor
430
+ {
431
+ __host__
432
+ void operator()(T &x) const
433
+ {
434
+ x.~T();
435
+ } // end operator()()
436
+ }; // end host_destroy_functor
437
+
438
+
439
+ template<typename T>
440
+ struct device_destroy_functor
441
+ {
442
+ // add __host__ to allow the omp backend to compile with nvcc
443
+ __host__ __device__
444
+ void operator()(T &x) const
445
+ {
446
+ x.~T();
447
+ } // end operator()()
448
+ }; // end device_destroy_functor
449
+
450
+
451
+ template<typename System, typename T>
452
+ struct destroy_functor
453
+ : thrust::detail::eval_if<
454
+ thrust::detail::is_convertible<System, thrust::host_system_tag>::value,
455
+ thrust::detail::identity_<host_destroy_functor<T> >,
456
+ thrust::detail::identity_<device_destroy_functor<T> >
457
+ >
458
+ {};
459
+
460
+
461
+ template <typename T>
462
+ struct fill_functor
463
+ {
464
+ T exemplar;
465
+
466
+ __thrust_exec_check_disable__
467
+ __host__ __device__
468
+ fill_functor(const T& _exemplar)
469
+ : exemplar(_exemplar) {}
470
+
471
+ __thrust_exec_check_disable__
472
+ __host__ __device__
473
+ fill_functor(const fill_functor & other)
474
+ :exemplar(other.exemplar){}
475
+
476
+ __thrust_exec_check_disable__
477
+ __host__ __device__
478
+ ~fill_functor() {}
479
+
480
+ __thrust_exec_check_disable__
481
+ __host__ __device__
482
+ T operator()(void) const
483
+ {
484
+ return exemplar;
485
+ }
486
+ };
487
+
488
+
489
+ template<typename T>
490
+ struct uninitialized_fill_functor
491
+ {
492
+ T exemplar;
493
+
494
+ __thrust_exec_check_disable__
495
+ __host__ __device__
496
+ uninitialized_fill_functor(const T & x):exemplar(x){}
497
+
498
+ __thrust_exec_check_disable__
499
+ __host__ __device__
500
+ uninitialized_fill_functor(const uninitialized_fill_functor & other)
501
+ :exemplar(other.exemplar){}
502
+
503
+ __thrust_exec_check_disable__
504
+ __host__ __device__
505
+ ~uninitialized_fill_functor() {}
506
+
507
+ __thrust_exec_check_disable__
508
+ __host__ __device__
509
+ void operator()(T &x)
510
+ {
511
+ ::new(static_cast<void*>(&x)) T(exemplar);
512
+ } // end operator()()
513
+ }; // end uninitialized_fill_functor
514
+
515
+
516
+ // this predicate tests two two-element tuples
517
+ // we first use a Compare for the first element
518
+ // if the first elements are equivalent, we use
519
+ // < for the second elements
520
+ template<typename Compare>
521
+ struct compare_first_less_second
522
+ {
523
+ compare_first_less_second(Compare c)
524
+ : comp(c) {}
525
+
526
+ template<typename T1, typename T2>
527
+ __host__ __device__
528
+ bool operator()(T1 lhs, T2 rhs)
529
+ {
530
+ return comp(thrust::get<0>(lhs), thrust::get<0>(rhs)) || (!comp(thrust::get<0>(rhs), thrust::get<0>(lhs)) && thrust::get<1>(lhs) < thrust::get<1>(rhs));
531
+ }
532
+
533
+ Compare comp;
534
+ }; // end compare_first_less_second
535
+
536
+
537
+ template<typename Compare>
538
+ struct compare_first
539
+ {
540
+ Compare comp;
541
+
542
+ __host__ __device__
543
+ compare_first(Compare comp)
544
+ : comp(comp)
545
+ {}
546
+
547
+ template<typename Tuple1, typename Tuple2>
548
+ __host__ __device__
549
+ bool operator()(const Tuple1 &x, const Tuple2 &y)
550
+ {
551
+ return comp(thrust::raw_reference_cast(thrust::get<0>(x)), thrust::raw_reference_cast(thrust::get<0>(y)));
552
+ }
553
+ }; // end compare_first
554
+
555
+
556
+ } // end namespace detail
557
+
558
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/malloc_and_free.h ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/execution_policy.h>
21
+ #include <thrust/detail/pointer.h>
22
+ #include <thrust/detail/raw_pointer_cast.h>
23
+ #include <thrust/system/detail/generic/memory.h>
24
+ #include <thrust/system/detail/adl/malloc_and_free.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename DerivedPolicy>
30
+ __host__ __device__
31
+ pointer<void,DerivedPolicy> malloc(const thrust::detail::execution_policy_base<DerivedPolicy> &exec, std::size_t n)
32
+ {
33
+ using thrust::system::detail::generic::malloc;
34
+
35
+ // XXX should use a hypothetical thrust::static_pointer_cast here
36
+ void *raw_ptr = static_cast<void*>(thrust::raw_pointer_cast(malloc(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), n)));
37
+
38
+ return pointer<void,DerivedPolicy>(raw_ptr);
39
+ }
40
+
41
+ __thrust_exec_check_disable__
42
+ template<typename T, typename DerivedPolicy>
43
+ __host__ __device__
44
+ pointer<T,DerivedPolicy> malloc(const thrust::detail::execution_policy_base<DerivedPolicy> &exec, std::size_t n)
45
+ {
46
+ using thrust::system::detail::generic::malloc;
47
+
48
+ T *raw_ptr = static_cast<T*>(thrust::raw_pointer_cast(malloc<T>(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), n)));
49
+
50
+ return pointer<T,DerivedPolicy>(raw_ptr);
51
+ }
52
+
53
+
54
+ // XXX WAR nvbug 992955
55
+ #if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
56
+ #if CUDART_VERSION < 5000
57
+
58
+ // cudafe generates unqualified calls to free(int *volatile)
59
+ // which get confused with thrust::free
60
+ // spoof a thrust::free which simply maps to ::free
61
+ inline __host__ __device__
62
+ void free(int *volatile ptr)
63
+ {
64
+ ::free(ptr);
65
+ }
66
+
67
+ #endif // CUDART_VERSION
68
+ #endif // THRUST_DEVICE_COMPILER
69
+
70
+ __thrust_exec_check_disable__
71
+ template<typename DerivedPolicy, typename Pointer>
72
+ __host__ __device__
73
+ void free(const thrust::detail::execution_policy_base<DerivedPolicy> &exec, Pointer ptr)
74
+ {
75
+ using thrust::system::detail::generic::free;
76
+
77
+ free(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), ptr);
78
+ }
79
+
80
+ // XXX consider another form of free which does not take a system argument and
81
+ // instead infers the system from the pointer
82
+
83
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/merge.inl ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/merge.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/system/detail/generic/merge.h>
25
+ #include <thrust/system/detail/adl/merge.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy,
31
+ typename InputIterator1,
32
+ typename InputIterator2,
33
+ typename OutputIterator>
34
+ __host__ __device__
35
+ OutputIterator merge(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
36
+ InputIterator1 first1,
37
+ InputIterator1 last1,
38
+ InputIterator2 first2,
39
+ InputIterator2 last2,
40
+ OutputIterator result)
41
+ {
42
+ using thrust::system::detail::generic::merge;
43
+ return merge(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, last2, result);
44
+ } // end merge()
45
+
46
+
47
+ __thrust_exec_check_disable__
48
+ template<typename DerivedPolicy,
49
+ typename InputIterator1,
50
+ typename InputIterator2,
51
+ typename OutputIterator,
52
+ typename StrictWeakCompare>
53
+ __host__ __device__
54
+ OutputIterator merge(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
55
+ InputIterator1 first1,
56
+ InputIterator1 last1,
57
+ InputIterator2 first2,
58
+ InputIterator2 last2,
59
+ OutputIterator result,
60
+ StrictWeakCompare comp)
61
+ {
62
+ using thrust::system::detail::generic::merge;
63
+ return merge(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, last2, result, comp);
64
+ } // end merge()
65
+
66
+
67
+ __thrust_exec_check_disable__
68
+ template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2, typename InputIterator3, typename InputIterator4, typename OutputIterator1, typename OutputIterator2>
69
+ __host__ __device__
70
+ thrust::pair<OutputIterator1,OutputIterator2>
71
+ merge_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
72
+ InputIterator1 keys_first1, InputIterator1 keys_last1,
73
+ InputIterator2 keys_first2, InputIterator2 keys_last2,
74
+ InputIterator3 values_first1, InputIterator4 values_first2,
75
+ OutputIterator1 keys_result,
76
+ OutputIterator2 values_result)
77
+ {
78
+ using thrust::system::detail::generic::merge_by_key;
79
+ return merge_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first1, keys_last1, keys_first2, keys_last2, values_first1, values_first2, keys_result, values_result);
80
+ } // end merge_by_key()
81
+
82
+
83
+ __thrust_exec_check_disable__
84
+ template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2, typename InputIterator3, typename InputIterator4, typename OutputIterator1, typename OutputIterator2, typename Compare>
85
+ __host__ __device__
86
+ thrust::pair<OutputIterator1,OutputIterator2>
87
+ merge_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
88
+ InputIterator1 keys_first1, InputIterator1 keys_last1,
89
+ InputIterator2 keys_first2, InputIterator2 keys_last2,
90
+ InputIterator3 values_first1, InputIterator4 values_first2,
91
+ OutputIterator1 keys_result,
92
+ OutputIterator2 values_result,
93
+ Compare comp)
94
+ {
95
+ using thrust::system::detail::generic::merge_by_key;
96
+ return merge_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first1, keys_last1, keys_first2, keys_last2, values_first1, values_first2, keys_result, values_result, comp);
97
+ } // end merge_by_key()
98
+
99
+
100
+ template<typename InputIterator1,
101
+ typename InputIterator2,
102
+ typename OutputIterator,
103
+ typename StrictWeakOrdering>
104
+ OutputIterator merge(InputIterator1 first1,
105
+ InputIterator1 last1,
106
+ InputIterator2 first2,
107
+ InputIterator2 last2,
108
+ OutputIterator result,
109
+ StrictWeakOrdering comp)
110
+ {
111
+ using thrust::system::detail::generic::select_system;
112
+
113
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
114
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
115
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
116
+
117
+ System1 system1;
118
+ System2 system2;
119
+ System3 system3;
120
+
121
+ return thrust::merge(select_system(system1,system2,system3), first1, last1, first2, last2, result, comp);
122
+ } // end merge()
123
+
124
+
125
+ template<typename InputIterator1,
126
+ typename InputIterator2,
127
+ typename OutputIterator>
128
+ OutputIterator merge(InputIterator1 first1,
129
+ InputIterator1 last1,
130
+ InputIterator2 first2,
131
+ InputIterator2 last2,
132
+ OutputIterator result)
133
+ {
134
+ using thrust::system::detail::generic::select_system;
135
+
136
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
137
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
138
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
139
+
140
+ System1 system1;
141
+ System2 system2;
142
+ System3 system3;
143
+
144
+ return thrust::merge(select_system(system1,system2,system3), first1, last1, first2, last2, result);
145
+ } // end merge()
146
+
147
+
148
+ template<typename InputIterator1,
149
+ typename InputIterator2,
150
+ typename InputIterator3,
151
+ typename InputIterator4,
152
+ typename OutputIterator1,
153
+ typename OutputIterator2,
154
+ typename StrictWeakOrdering>
155
+ thrust::pair<OutputIterator1,OutputIterator2>
156
+ merge_by_key(InputIterator1 keys_first1,
157
+ InputIterator1 keys_last1,
158
+ InputIterator2 keys_first2,
159
+ InputIterator2 keys_last2,
160
+ InputIterator3 values_first1,
161
+ InputIterator4 values_first2,
162
+ OutputIterator1 keys_result,
163
+ OutputIterator2 values_result,
164
+ StrictWeakOrdering comp)
165
+ {
166
+ using thrust::system::detail::generic::select_system;
167
+
168
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
169
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
170
+ typedef typename thrust::iterator_system<InputIterator3>::type System3;
171
+ typedef typename thrust::iterator_system<InputIterator4>::type System4;
172
+ typedef typename thrust::iterator_system<OutputIterator1>::type System5;
173
+ typedef typename thrust::iterator_system<OutputIterator2>::type System6;
174
+
175
+ System1 system1;
176
+ System2 system2;
177
+ System3 system3;
178
+ System4 system4;
179
+ System5 system5;
180
+ System6 system6;
181
+
182
+ return thrust::merge_by_key(select_system(system1,system2,system3,system4,system5,system6), keys_first1, keys_last1, keys_first2, keys_last2, values_first1, values_first2, keys_result, values_result, comp);
183
+ } // end merge_by_key()
184
+
185
+
186
+ template<typename InputIterator1,
187
+ typename InputIterator2,
188
+ typename InputIterator3,
189
+ typename InputIterator4,
190
+ typename OutputIterator1,
191
+ typename OutputIterator2>
192
+ thrust::pair<OutputIterator1,OutputIterator2>
193
+ merge_by_key(InputIterator1 keys_first1,
194
+ InputIterator1 keys_last1,
195
+ InputIterator2 keys_first2,
196
+ InputIterator2 keys_last2,
197
+ InputIterator3 values_first1,
198
+ InputIterator4 values_first2,
199
+ OutputIterator1 keys_result,
200
+ OutputIterator2 values_result)
201
+ {
202
+ using thrust::system::detail::generic::select_system;
203
+
204
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
205
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
206
+ typedef typename thrust::iterator_system<InputIterator3>::type System3;
207
+ typedef typename thrust::iterator_system<InputIterator4>::type System4;
208
+ typedef typename thrust::iterator_system<OutputIterator1>::type System5;
209
+ typedef typename thrust::iterator_system<OutputIterator2>::type System6;
210
+
211
+ System1 system1;
212
+ System2 system2;
213
+ System3 system3;
214
+ System4 system4;
215
+ System5 system5;
216
+ System6 system6;
217
+
218
+ return thrust::merge_by_key(select_system(system1,system2,system3,system4,system5,system6), keys_first1, keys_last1, keys_first2, keys_last2, values_first1, values_first2, keys_result, values_result);
219
+ } // end merge_by_key()
220
+
221
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/mismatch.inl ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/mismatch.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/mismatch.h>
24
+ #include <thrust/system/detail/adl/mismatch.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2>
30
+ __host__ __device__
31
+ thrust::pair<InputIterator1, InputIterator2> mismatch(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
32
+ InputIterator1 first1,
33
+ InputIterator1 last1,
34
+ InputIterator2 first2)
35
+ {
36
+ using thrust::system::detail::generic::mismatch;
37
+ return mismatch(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2);
38
+ } // end mismatch()
39
+
40
+
41
+ __thrust_exec_check_disable__
42
+ template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
43
+ __host__ __device__
44
+ thrust::pair<InputIterator1, InputIterator2> mismatch(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
45
+ InputIterator1 first1,
46
+ InputIterator1 last1,
47
+ InputIterator2 first2,
48
+ BinaryPredicate pred)
49
+ {
50
+ using thrust::system::detail::generic::mismatch;
51
+ return mismatch(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, pred);
52
+ } // end mismatch()
53
+
54
+
55
+ template<typename InputIterator1, typename InputIterator2>
56
+ thrust::pair<InputIterator1, InputIterator2> mismatch(InputIterator1 first1,
57
+ InputIterator1 last1,
58
+ InputIterator2 first2)
59
+ {
60
+ using thrust::system::detail::generic::select_system;
61
+
62
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
63
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
64
+
65
+ System1 system1;
66
+ System2 system2;
67
+
68
+ return thrust::mismatch(select_system(system1,system2), first1, last1, first2);
69
+ } // end mismatch()
70
+
71
+
72
+ template<typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
73
+ thrust::pair<InputIterator1, InputIterator2> mismatch(InputIterator1 first1,
74
+ InputIterator1 last1,
75
+ InputIterator2 first2,
76
+ BinaryPredicate pred)
77
+ {
78
+ using thrust::system::detail::generic::select_system;
79
+
80
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
81
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
82
+
83
+ System1 system1;
84
+ System2 system2;
85
+
86
+ return thrust::mismatch(select_system(system1,system2), first1, last1, first2, pred);
87
+ } // end mismatch()
88
+
89
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/modern_gcc_required.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config/cpp_dialect.h>
20
+
21
+ #ifndef THRUST_MODERN_GCC_REQUIRED_NO_ERROR
22
+ # if defined(THRUST_GCC_VERSION) && !defined(THRUST_MODERN_GCC)
23
+ # error GCC 5 or later is required for this Thrust feature; please upgrade your compiler.
24
+ # endif
25
+ #endif
26
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/numeric_wrapper.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ // When a compiler uses Thrust as part of its implementation of Standard C++
20
+ // algorithms, a cycle of included files may result when Thrust code tries to
21
+ // use a standard algorithm. Having a macro that is defined only when Thrust
22
+ // is including an algorithms-related header gives the compiler a chance to
23
+ // detect and break the cycle of includes.
24
+
25
+ #define THRUST_INCLUDING_ALGORITHMS_HEADER
26
+ #include <numeric>
27
+ #undef THRUST_INCLUDING_ALGORITHMS_HEADER
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/overlapped_copy.h ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/iterator/iterator_traits.h>
21
+ #include <thrust/iterator/detail/minimum_system.h>
22
+ #include <thrust/detail/copy.h>
23
+ #include <thrust/detail/temporary_array.h>
24
+ #include <thrust/system/cpp/detail/execution_policy.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ namespace detail
29
+ {
30
+
31
+
32
+ template<typename InputIterator,
33
+ typename OutputIterator>
34
+ OutputIterator sequential_copy(InputIterator first,
35
+ InputIterator last,
36
+ OutputIterator result)
37
+ {
38
+ for(; first != last; ++first, ++result)
39
+ {
40
+ *result = *first;
41
+ } // end for
42
+
43
+ return result;
44
+ } // end sequential_copy()
45
+
46
+
47
+ template<typename BidirectionalIterator1,
48
+ typename BidirectionalIterator2>
49
+ BidirectionalIterator2 sequential_copy_backward(BidirectionalIterator1 first,
50
+ BidirectionalIterator1 last,
51
+ BidirectionalIterator2 result)
52
+ {
53
+ // yes, we preincrement
54
+ // the ranges are open on the right, i.e. [first, last)
55
+ while(first != last)
56
+ {
57
+ *--result = *--last;
58
+ } // end while
59
+
60
+ return result;
61
+ } // end sequential_copy_backward()
62
+
63
+
64
+ namespace dispatch
65
+ {
66
+
67
+
68
+ template<typename DerivedPolicy,
69
+ typename RandomAccessIterator1,
70
+ typename RandomAccessIterator2>
71
+ RandomAccessIterator2 overlapped_copy(thrust::system::cpp::detail::execution_policy<DerivedPolicy> &,
72
+ RandomAccessIterator1 first,
73
+ RandomAccessIterator1 last,
74
+ RandomAccessIterator2 result)
75
+ {
76
+ if(first < last && first <= result && result < last)
77
+ {
78
+ // result lies in [first, last)
79
+ // it's safe to use std::copy_backward here
80
+ thrust::detail::sequential_copy_backward(first, last, result + (last - first));
81
+ result += (last - first);
82
+ } // end if
83
+ else
84
+ {
85
+ // result + (last - first) lies in [first, last)
86
+ // it's safe to use sequential_copy here
87
+ result = thrust::detail::sequential_copy(first, last, result);
88
+ } // end else
89
+
90
+ return result;
91
+ } // end overlapped_copy()
92
+
93
+
94
+ template<typename DerivedPolicy,
95
+ typename RandomAccessIterator1,
96
+ typename RandomAccessIterator2>
97
+ RandomAccessIterator2 overlapped_copy(thrust::execution_policy<DerivedPolicy> &exec,
98
+ RandomAccessIterator1 first,
99
+ RandomAccessIterator1 last,
100
+ RandomAccessIterator2 result)
101
+ {
102
+ typedef typename thrust::iterator_value<RandomAccessIterator1>::type value_type;
103
+
104
+ // make a temporary copy of [first,last), and copy into it first
105
+ thrust::detail::temporary_array<value_type, DerivedPolicy> temp(exec, first, last);
106
+ return thrust::copy(exec, temp.begin(), temp.end(), result);
107
+ } // end overlapped_copy()
108
+
109
+ } // end dispatch
110
+
111
+
112
+ template<typename RandomAccessIterator1,
113
+ typename RandomAccessIterator2>
114
+ RandomAccessIterator2 overlapped_copy(RandomAccessIterator1 first,
115
+ RandomAccessIterator1 last,
116
+ RandomAccessIterator2 result)
117
+ {
118
+ typedef typename thrust::iterator_system<RandomAccessIterator2>::type System1;
119
+ typedef typename thrust::iterator_system<RandomAccessIterator2>::type System2;
120
+
121
+ typedef typename thrust::detail::minimum_system<System1, System2>::type System;
122
+
123
+ // XXX presumes System is default constructible
124
+ System system;
125
+
126
+ return thrust::detail::dispatch::overlapped_copy(system, first, last, result);
127
+ } // end overlapped_copy()
128
+
129
+ } // end detail
130
+
131
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/partition.inl ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/partition.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/partition.h>
24
+ #include <thrust/system/detail/adl/partition.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ __thrust_exec_check_disable__
29
+ template<typename DerivedPolicy,
30
+ typename ForwardIterator,
31
+ typename Predicate>
32
+ __host__ __device__
33
+ ForwardIterator partition(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
34
+ ForwardIterator first,
35
+ ForwardIterator last,
36
+ Predicate pred)
37
+ {
38
+ using thrust::system::detail::generic::partition;
39
+ return partition(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
40
+ } // end partition()
41
+
42
+
43
+ __thrust_exec_check_disable__
44
+ template<typename DerivedPolicy,
45
+ typename ForwardIterator,
46
+ typename InputIterator,
47
+ typename Predicate>
48
+ __host__ __device__
49
+ ForwardIterator partition(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
50
+ ForwardIterator first,
51
+ ForwardIterator last,
52
+ InputIterator stencil,
53
+ Predicate pred)
54
+ {
55
+ using thrust::system::detail::generic::partition;
56
+ return partition(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, pred);
57
+ } // end partition()
58
+
59
+
60
+ __thrust_exec_check_disable__
61
+ template<typename DerivedPolicy,
62
+ typename InputIterator,
63
+ typename OutputIterator1,
64
+ typename OutputIterator2,
65
+ typename Predicate>
66
+ __host__ __device__
67
+ thrust::pair<OutputIterator1,OutputIterator2>
68
+ partition_copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
69
+ InputIterator first,
70
+ InputIterator last,
71
+ OutputIterator1 out_true,
72
+ OutputIterator2 out_false,
73
+ Predicate pred)
74
+ {
75
+ using thrust::system::detail::generic::partition_copy;
76
+ return partition_copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, out_true, out_false, pred);
77
+ } // end partition_copy()
78
+
79
+
80
+ __thrust_exec_check_disable__
81
+ template<typename DerivedPolicy,
82
+ typename InputIterator1,
83
+ typename InputIterator2,
84
+ typename OutputIterator1,
85
+ typename OutputIterator2,
86
+ typename Predicate>
87
+ __host__ __device__
88
+ thrust::pair<OutputIterator1,OutputIterator2>
89
+ partition_copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
90
+ InputIterator1 first,
91
+ InputIterator1 last,
92
+ InputIterator2 stencil,
93
+ OutputIterator1 out_true,
94
+ OutputIterator2 out_false,
95
+ Predicate pred)
96
+ {
97
+ using thrust::system::detail::generic::partition_copy;
98
+ return partition_copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, out_true, out_false, pred);
99
+ } // end partition_copy()
100
+
101
+
102
+ __thrust_exec_check_disable__
103
+ template<typename DerivedPolicy,
104
+ typename ForwardIterator,
105
+ typename Predicate>
106
+ __host__ __device__
107
+ ForwardIterator stable_partition(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
108
+ ForwardIterator first,
109
+ ForwardIterator last,
110
+ Predicate pred)
111
+ {
112
+ using thrust::system::detail::generic::stable_partition;
113
+ return stable_partition(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
114
+ } // end stable_partition()
115
+
116
+
117
+ __thrust_exec_check_disable__
118
+ template<typename DerivedPolicy,
119
+ typename ForwardIterator,
120
+ typename InputIterator,
121
+ typename Predicate>
122
+ __host__ __device__
123
+ ForwardIterator stable_partition(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
124
+ ForwardIterator first,
125
+ ForwardIterator last,
126
+ InputIterator stencil,
127
+ Predicate pred)
128
+ {
129
+ using thrust::system::detail::generic::stable_partition;
130
+ return stable_partition(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, pred);
131
+ } // end stable_partition()
132
+
133
+
134
+ __thrust_exec_check_disable__
135
+ template<typename DerivedPolicy,
136
+ typename InputIterator,
137
+ typename OutputIterator1,
138
+ typename OutputIterator2,
139
+ typename Predicate>
140
+ __host__ __device__
141
+ thrust::pair<OutputIterator1,OutputIterator2>
142
+ stable_partition_copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
143
+ InputIterator first,
144
+ InputIterator last,
145
+ OutputIterator1 out_true,
146
+ OutputIterator2 out_false,
147
+ Predicate pred)
148
+ {
149
+ using thrust::system::detail::generic::stable_partition_copy;
150
+ return stable_partition_copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, out_true, out_false, pred);
151
+ } // end stable_partition_copy()
152
+
153
+
154
+ __thrust_exec_check_disable__
155
+ template<typename DerivedPolicy,
156
+ typename InputIterator1,
157
+ typename InputIterator2,
158
+ typename OutputIterator1,
159
+ typename OutputIterator2,
160
+ typename Predicate>
161
+ __host__ __device__
162
+ thrust::pair<OutputIterator1,OutputIterator2>
163
+ stable_partition_copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
164
+ InputIterator1 first,
165
+ InputIterator1 last,
166
+ InputIterator2 stencil,
167
+ OutputIterator1 out_true,
168
+ OutputIterator2 out_false,
169
+ Predicate pred)
170
+ {
171
+ using thrust::system::detail::generic::stable_partition_copy;
172
+ return stable_partition_copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, out_true, out_false, pred);
173
+ } // end stable_partition_copy()
174
+
175
+
176
+ __thrust_exec_check_disable__
177
+ template<typename DerivedPolicy, typename ForwardIterator, typename Predicate>
178
+ __host__ __device__
179
+ ForwardIterator partition_point(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
180
+ ForwardIterator first,
181
+ ForwardIterator last,
182
+ Predicate pred)
183
+ {
184
+ using thrust::system::detail::generic::partition_point;
185
+ return partition_point(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
186
+ } // end partition_point()
187
+
188
+
189
+ __thrust_exec_check_disable__
190
+ template<typename DerivedPolicy, typename InputIterator, typename Predicate>
191
+ __host__ __device__
192
+ bool is_partitioned(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
193
+ InputIterator first,
194
+ InputIterator last,
195
+ Predicate pred)
196
+ {
197
+ using thrust::system::detail::generic::is_partitioned;
198
+ return is_partitioned(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
199
+ } // end is_partitioned()
200
+
201
+
202
+ template<typename ForwardIterator,
203
+ typename Predicate>
204
+ ForwardIterator partition(ForwardIterator first,
205
+ ForwardIterator last,
206
+ Predicate pred)
207
+ {
208
+ using thrust::system::detail::generic::select_system;
209
+
210
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
211
+
212
+ System system;
213
+
214
+ return thrust::partition(select_system(system), first, last, pred);
215
+ } // end partition()
216
+
217
+
218
+ template<typename ForwardIterator,
219
+ typename InputIterator,
220
+ typename Predicate>
221
+ ForwardIterator partition(ForwardIterator first,
222
+ ForwardIterator last,
223
+ InputIterator stencil,
224
+ Predicate pred)
225
+ {
226
+ using thrust::system::detail::generic::select_system;
227
+
228
+ typedef typename thrust::iterator_system<ForwardIterator>::type System1;
229
+ typedef typename thrust::iterator_system<InputIterator>::type System2;
230
+
231
+ System1 system1;
232
+ System2 system2;
233
+
234
+ return thrust::partition(select_system(system1,system2), first, last, stencil, pred);
235
+ } // end partition()
236
+
237
+
238
+ template<typename ForwardIterator,
239
+ typename Predicate>
240
+ ForwardIterator stable_partition(ForwardIterator first,
241
+ ForwardIterator last,
242
+ Predicate pred)
243
+ {
244
+ using thrust::system::detail::generic::select_system;
245
+
246
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
247
+
248
+ System system;
249
+
250
+ return thrust::stable_partition(select_system(system), first, last, pred);
251
+ } // end stable_partition()
252
+
253
+
254
+ template<typename ForwardIterator,
255
+ typename InputIterator,
256
+ typename Predicate>
257
+ ForwardIterator stable_partition(ForwardIterator first,
258
+ ForwardIterator last,
259
+ InputIterator stencil,
260
+ Predicate pred)
261
+ {
262
+ using thrust::system::detail::generic::select_system;
263
+
264
+ typedef typename thrust::iterator_system<ForwardIterator>::type System1;
265
+ typedef typename thrust::iterator_system<InputIterator>::type System2;
266
+
267
+ System1 system1;
268
+ System2 system2;
269
+
270
+ return thrust::stable_partition(select_system(system1,system2), first, last, stencil, pred);
271
+ } // end stable_partition()
272
+
273
+
274
+ template<typename InputIterator,
275
+ typename OutputIterator1,
276
+ typename OutputIterator2,
277
+ typename Predicate>
278
+ thrust::pair<OutputIterator1,OutputIterator2>
279
+ partition_copy(InputIterator first,
280
+ InputIterator last,
281
+ OutputIterator1 out_true,
282
+ OutputIterator2 out_false,
283
+ Predicate pred)
284
+ {
285
+ using thrust::system::detail::generic::select_system;
286
+
287
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
288
+ typedef typename thrust::iterator_system<OutputIterator1>::type System2;
289
+ typedef typename thrust::iterator_system<OutputIterator2>::type System3;
290
+
291
+ System1 system1;
292
+ System2 system2;
293
+ System3 system3;
294
+
295
+ return thrust::partition_copy(select_system(system1,system2,system3), first, last, out_true, out_false, pred);
296
+ } // end partition_copy()
297
+
298
+
299
+ template<typename InputIterator1,
300
+ typename InputIterator2,
301
+ typename OutputIterator1,
302
+ typename OutputIterator2,
303
+ typename Predicate>
304
+ thrust::pair<OutputIterator1,OutputIterator2>
305
+ partition_copy(InputIterator1 first,
306
+ InputIterator1 last,
307
+ InputIterator2 stencil,
308
+ OutputIterator1 out_true,
309
+ OutputIterator2 out_false,
310
+ Predicate pred)
311
+ {
312
+ using thrust::system::detail::generic::select_system;
313
+
314
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
315
+ typedef typename thrust::iterator_system<InputIterator1>::type System2;
316
+ typedef typename thrust::iterator_system<OutputIterator1>::type System3;
317
+ typedef typename thrust::iterator_system<OutputIterator2>::type System4;
318
+
319
+ System1 system1;
320
+ System2 system2;
321
+ System3 system3;
322
+ System4 system4;
323
+
324
+ return thrust::partition_copy(select_system(system1,system2,system3,system4), first, last, stencil, out_true, out_false, pred);
325
+ } // end partition_copy()
326
+
327
+
328
+ template<typename InputIterator,
329
+ typename OutputIterator1,
330
+ typename OutputIterator2,
331
+ typename Predicate>
332
+ thrust::pair<OutputIterator1,OutputIterator2>
333
+ stable_partition_copy(InputIterator first,
334
+ InputIterator last,
335
+ OutputIterator1 out_true,
336
+ OutputIterator2 out_false,
337
+ Predicate pred)
338
+ {
339
+ using thrust::system::detail::generic::select_system;
340
+
341
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
342
+ typedef typename thrust::iterator_system<OutputIterator1>::type System2;
343
+ typedef typename thrust::iterator_system<OutputIterator2>::type System3;
344
+
345
+ System1 system1;
346
+ System2 system2;
347
+ System3 system3;
348
+
349
+ return thrust::stable_partition_copy(select_system(system1,system2,system3), first, last, out_true, out_false, pred);
350
+ } // end stable_partition_copy()
351
+
352
+
353
+ template<typename InputIterator1,
354
+ typename InputIterator2,
355
+ typename OutputIterator1,
356
+ typename OutputIterator2,
357
+ typename Predicate>
358
+ thrust::pair<OutputIterator1,OutputIterator2>
359
+ stable_partition_copy(InputIterator1 first,
360
+ InputIterator1 last,
361
+ InputIterator2 stencil,
362
+ OutputIterator1 out_true,
363
+ OutputIterator2 out_false,
364
+ Predicate pred)
365
+ {
366
+ using thrust::system::detail::generic::select_system;
367
+
368
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
369
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
370
+ typedef typename thrust::iterator_system<OutputIterator1>::type System3;
371
+ typedef typename thrust::iterator_system<OutputIterator2>::type System4;
372
+
373
+ System1 system1;
374
+ System2 system2;
375
+ System3 system3;
376
+ System4 system4;
377
+
378
+ return thrust::stable_partition_copy(select_system(system1,system2,system3,system4), first, last, stencil, out_true, out_false, pred);
379
+ } // end stable_partition_copy()
380
+
381
+
382
+ template<typename ForwardIterator, typename Predicate>
383
+ ForwardIterator partition_point(ForwardIterator first,
384
+ ForwardIterator last,
385
+ Predicate pred)
386
+ {
387
+ using thrust::system::detail::generic::select_system;
388
+
389
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
390
+
391
+ System system;
392
+
393
+ return thrust::partition_point(select_system(system), first, last, pred);
394
+ } // end partition_point()
395
+
396
+
397
+ template<typename InputIterator, typename Predicate>
398
+ bool is_partitioned(InputIterator first,
399
+ InputIterator last,
400
+ Predicate pred)
401
+ {
402
+ using thrust::system::detail::generic::select_system;
403
+
404
+ typedef typename thrust::iterator_system<InputIterator>::type System;
405
+
406
+ System system;
407
+
408
+ return thrust::is_partitioned(select_system(system), first, last, pred);
409
+ } // end is_partitioned()
410
+
411
+ THRUST_NAMESPACE_END
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/raw_reference_cast.h ADDED
@@ -0,0 +1,332 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/raw_pointer_cast.h>
21
+ #include <thrust/detail/type_traits/has_nested_type.h>
22
+ #include <thrust/detail/type_traits.h>
23
+ #include <thrust/detail/tuple_transform.h>
24
+ #include <thrust/iterator/detail/tuple_of_iterator_references.h>
25
+
26
+
27
+ // the order of declarations and definitions in this file is totally goofy
28
+ // this header defines raw_reference_cast, which has a few overloads towards the bottom of the file
29
+ // raw_reference_cast depends on metafunctions such as is_unwrappable and raw_reference
30
+ // we need to be sure that these metafunctions are completely defined (including specializations) before they are instantiated by raw_reference_cast
31
+
32
+ THRUST_NAMESPACE_BEGIN
33
+ namespace detail
34
+ {
35
+
36
+
37
+ __THRUST_DEFINE_HAS_NESTED_TYPE(is_wrapped_reference, wrapped_reference_hint)
38
+
39
+
40
+ // wrapped reference-like things which aren't strictly wrapped references
41
+ // (e.g. tuples of wrapped references) are considered unwrappable
42
+ template<typename T>
43
+ struct is_unwrappable
44
+ : is_wrapped_reference<T>
45
+ {};
46
+
47
+
48
+ // specialize is_unwrappable
49
+ // a tuple is_unwrappable if any of its elements is_unwrappable
50
+ template<typename... Ts>
51
+ struct is_unwrappable<
52
+ thrust::tuple<Ts...>
53
+ >
54
+ : or_<
55
+ is_unwrappable<Ts>...
56
+ >
57
+ {};
58
+
59
+
60
+ // specialize is_unwrappable
61
+ // a tuple_of_iterator_references is_unwrappable if any of its elements is_unwrappable
62
+ template<
63
+ typename... Ts
64
+ >
65
+ struct is_unwrappable<
66
+ thrust::detail::tuple_of_iterator_references<Ts...>
67
+ >
68
+ : or_<
69
+ is_unwrappable<Ts>...
70
+ >
71
+ {};
72
+
73
+
74
+ template<typename T, typename Result = void>
75
+ struct enable_if_unwrappable
76
+ : enable_if<
77
+ is_unwrappable<T>::value,
78
+ Result
79
+ >
80
+ {};
81
+
82
+
83
+ namespace raw_reference_detail
84
+ {
85
+
86
+
87
+ template<typename T, typename Enable = void>
88
+ struct raw_reference_impl
89
+ : add_reference<T>
90
+ {};
91
+
92
+
93
+ template<typename T>
94
+ struct raw_reference_impl<
95
+ T,
96
+ typename thrust::detail::enable_if<
97
+ is_wrapped_reference<
98
+ typename remove_cv<T>::type
99
+ >::value
100
+ >::type
101
+ >
102
+ {
103
+ typedef typename add_reference<
104
+ typename pointer_element<typename T::pointer>::type
105
+ >::type type;
106
+ };
107
+
108
+
109
+ } // end raw_reference_detail
110
+
111
+
112
+ template<typename T>
113
+ struct raw_reference :
114
+ raw_reference_detail::raw_reference_impl<T>
115
+ {};
116
+
117
+
118
+ namespace raw_reference_detail
119
+ {
120
+
121
+ // unlike raw_reference,
122
+ // raw_reference_tuple_helper needs to return a value
123
+ // when it encounters one, rather than a reference
124
+ // upon encountering tuple, recurse
125
+ //
126
+ // we want the following behavior:
127
+ // 1. T -> T
128
+ // 2. T& -> T&
129
+ // 3. null_type -> null_type
130
+ // 4. reference<T> -> T&
131
+ // 5. tuple_of_iterator_references<T> -> tuple_of_iterator_references<raw_reference_tuple_helper<T>::type>
132
+
133
+
134
+ // wrapped references are unwrapped using raw_reference, otherwise, return T
135
+ template<typename T>
136
+ struct raw_reference_tuple_helper
137
+ : eval_if<
138
+ is_unwrappable<
139
+ typename remove_cv<T>::type
140
+ >::value,
141
+ raw_reference<T>,
142
+ identity_<T>
143
+ >
144
+ {};
145
+
146
+
147
+ // recurse on tuples
148
+ template <
149
+ typename... Ts
150
+ >
151
+ struct raw_reference_tuple_helper<
152
+ thrust::tuple<Ts...>
153
+ >
154
+ {
155
+ typedef thrust::tuple<
156
+ typename raw_reference_tuple_helper<Ts>::type...
157
+ > type;
158
+ };
159
+
160
+
161
+ template <
162
+ typename... Ts
163
+ >
164
+ struct raw_reference_tuple_helper<
165
+ thrust::detail::tuple_of_iterator_references<Ts...>
166
+ >
167
+ {
168
+ typedef thrust::detail::tuple_of_iterator_references<
169
+ typename raw_reference_tuple_helper<Ts>::type...
170
+ > type;
171
+ };
172
+
173
+
174
+ } // end raw_reference_detail
175
+
176
+
177
+ // a couple of specializations of raw_reference for tuples follow
178
+
179
+
180
+ // if a tuple "tuple_type" is_unwrappable,
181
+ // then the raw_reference of tuple_type is a tuple of its members' raw_references
182
+ // else the raw_reference of tuple_type is tuple_type &
183
+ template <
184
+ typename... Ts
185
+ >
186
+ struct raw_reference<
187
+ thrust::tuple<Ts...>
188
+ >
189
+ {
190
+ private:
191
+ typedef thrust::tuple<Ts...> tuple_type;
192
+
193
+ public:
194
+ typedef typename eval_if<
195
+ is_unwrappable<tuple_type>::value,
196
+ raw_reference_detail::raw_reference_tuple_helper<tuple_type>,
197
+ add_reference<tuple_type>
198
+ >::type type;
199
+ };
200
+
201
+
202
+ template <
203
+ typename... Ts
204
+ >
205
+ struct raw_reference<
206
+ thrust::detail::tuple_of_iterator_references<Ts...>
207
+ >
208
+ {
209
+ private:
210
+ typedef detail::tuple_of_iterator_references<Ts...> tuple_type;
211
+
212
+ public:
213
+ typedef typename raw_reference_detail::raw_reference_tuple_helper<tuple_type>::type type;
214
+
215
+ // XXX figure out why is_unwrappable seems to be broken for tuple_of_iterator_references
216
+ //typedef typename eval_if<
217
+ // is_unwrappable<tuple_type>::value,
218
+ // raw_reference_detail::raw_reference_tuple_helper<tuple_type>,
219
+ // add_reference<tuple_type>
220
+ //>::type type;
221
+ };
222
+
223
+
224
+ } // end detail
225
+
226
+
227
+ // provide declarations of raw_reference_cast's overloads for raw_reference_caster below
228
+ template<typename T>
229
+ __host__ __device__
230
+ typename detail::raw_reference<T>::type
231
+ raw_reference_cast(T &ref);
232
+
233
+
234
+ template<typename T>
235
+ __host__ __device__
236
+ typename detail::raw_reference<const T>::type
237
+ raw_reference_cast(const T &ref);
238
+
239
+
240
+ template<
241
+ typename... Ts
242
+ >
243
+ __host__ __device__
244
+ typename detail::enable_if_unwrappable<
245
+ thrust::detail::tuple_of_iterator_references<Ts...>,
246
+ typename detail::raw_reference<
247
+ thrust::detail::tuple_of_iterator_references<Ts...>
248
+ >::type
249
+ >::type
250
+ raw_reference_cast(thrust::detail::tuple_of_iterator_references<Ts...> t);
251
+
252
+
253
+ namespace detail
254
+ {
255
+
256
+
257
+ struct raw_reference_caster
258
+ {
259
+ template<typename T>
260
+ __host__ __device__
261
+ typename detail::raw_reference<T>::type operator()(T &ref)
262
+ {
263
+ return thrust::raw_reference_cast(ref);
264
+ }
265
+
266
+ template<typename T>
267
+ __host__ __device__
268
+ typename detail::raw_reference<const T>::type operator()(const T &ref)
269
+ {
270
+ return thrust::raw_reference_cast(ref);
271
+ }
272
+
273
+ template<
274
+ typename... Ts
275
+ >
276
+ __host__ __device__
277
+ typename detail::raw_reference<
278
+ thrust::detail::tuple_of_iterator_references<Ts...>
279
+ >::type
280
+ operator()(thrust::detail::tuple_of_iterator_references<Ts...> t,
281
+ typename enable_if<
282
+ is_unwrappable<thrust::detail::tuple_of_iterator_references<Ts...> >::value
283
+ >::type * = 0)
284
+ {
285
+ return thrust::raw_reference_cast(t);
286
+ }
287
+ }; // end raw_reference_caster
288
+
289
+
290
+ } // end detail
291
+
292
+
293
+ template<typename T>
294
+ __host__ __device__
295
+ typename detail::raw_reference<T>::type
296
+ raw_reference_cast(T &ref)
297
+ {
298
+ return *thrust::raw_pointer_cast(&ref);
299
+ } // end raw_reference_cast
300
+
301
+
302
+ template<typename T>
303
+ __host__ __device__
304
+ typename detail::raw_reference<const T>::type
305
+ raw_reference_cast(const T &ref)
306
+ {
307
+ return *thrust::raw_pointer_cast(&ref);
308
+ } // end raw_reference_cast
309
+
310
+
311
+ template<
312
+ typename... Ts
313
+ >
314
+ __host__ __device__
315
+ typename detail::enable_if_unwrappable<
316
+ thrust::detail::tuple_of_iterator_references<Ts...>,
317
+ typename detail::raw_reference<
318
+ thrust::detail::tuple_of_iterator_references<Ts...>
319
+ >::type
320
+ >::type
321
+ raw_reference_cast(thrust::detail::tuple_of_iterator_references<Ts...> t)
322
+ {
323
+ thrust::detail::raw_reference_caster f;
324
+
325
+ // note that we pass raw_reference_tuple_helper, not raw_reference as the unary metafunction
326
+ // the different way that raw_reference_tuple_helper unwraps tuples is important
327
+ return thrust::detail::tuple_host_device_transform<detail::raw_reference_detail::raw_reference_tuple_helper>(t, f);
328
+ } // end raw_reference_cast
329
+
330
+
331
+ THRUST_NAMESPACE_END
332
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/reduce.inl ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/reduce.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/system/detail/generic/reduce.h>
25
+ #include <thrust/system/detail/generic/reduce_by_key.h>
26
+ #include <thrust/system/detail/adl/reduce.h>
27
+ #include <thrust/system/detail/adl/reduce_by_key.h>
28
+
29
+ THRUST_NAMESPACE_BEGIN
30
+
31
+
32
+ __thrust_exec_check_disable__
33
+ template<typename DerivedPolicy, typename InputIterator>
34
+ __host__ __device__
35
+ typename thrust::iterator_traits<InputIterator>::value_type
36
+ reduce(const thrust::detail::execution_policy_base<DerivedPolicy> &exec, InputIterator first, InputIterator last)
37
+ {
38
+ using thrust::system::detail::generic::reduce;
39
+ return reduce(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last);
40
+ } // end reduce()
41
+
42
+
43
+ __thrust_exec_check_disable__
44
+ template<typename DerivedPolicy, typename InputIterator, typename T>
45
+ __host__ __device__
46
+ T reduce(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
47
+ InputIterator first,
48
+ InputIterator last,
49
+ T init)
50
+ {
51
+ using thrust::system::detail::generic::reduce;
52
+ return reduce(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, init);
53
+ } // end reduce()
54
+
55
+
56
+ __thrust_exec_check_disable__
57
+ template<typename DerivedPolicy,
58
+ typename InputIterator,
59
+ typename T,
60
+ typename BinaryFunction>
61
+ __host__ __device__
62
+ T reduce(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
63
+ InputIterator first,
64
+ InputIterator last,
65
+ T init,
66
+ BinaryFunction binary_op)
67
+ {
68
+ using thrust::system::detail::generic::reduce;
69
+ return reduce(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, init, binary_op);
70
+ } // end reduce()
71
+
72
+
73
+ __thrust_exec_check_disable__
74
+ template<typename DerivedPolicy,
75
+ typename InputIterator1,
76
+ typename InputIterator2,
77
+ typename OutputIterator1,
78
+ typename OutputIterator2>
79
+ __host__ __device__
80
+ thrust::pair<OutputIterator1,OutputIterator2>
81
+ reduce_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
82
+ InputIterator1 keys_first,
83
+ InputIterator1 keys_last,
84
+ InputIterator2 values_first,
85
+ OutputIterator1 keys_output,
86
+ OutputIterator2 values_output)
87
+ {
88
+ using thrust::system::detail::generic::reduce_by_key;
89
+ return reduce_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first, keys_output, values_output);
90
+ } // end reduce_by_key()
91
+
92
+
93
+ __thrust_exec_check_disable__
94
+ template<typename DerivedPolicy,
95
+ typename InputIterator1,
96
+ typename InputIterator2,
97
+ typename OutputIterator1,
98
+ typename OutputIterator2,
99
+ typename BinaryPredicate>
100
+ __host__ __device__
101
+ thrust::pair<OutputIterator1,OutputIterator2>
102
+ reduce_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
103
+ InputIterator1 keys_first,
104
+ InputIterator1 keys_last,
105
+ InputIterator2 values_first,
106
+ OutputIterator1 keys_output,
107
+ OutputIterator2 values_output,
108
+ BinaryPredicate binary_pred)
109
+ {
110
+ using thrust::system::detail::generic::reduce_by_key;
111
+ return reduce_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first, keys_output, values_output, binary_pred);
112
+ } // end reduce_by_key()
113
+
114
+
115
+ __thrust_exec_check_disable__
116
+ template<typename DerivedPolicy,
117
+ typename InputIterator1,
118
+ typename InputIterator2,
119
+ typename OutputIterator1,
120
+ typename OutputIterator2,
121
+ typename BinaryPredicate,
122
+ typename BinaryFunction>
123
+ __host__ __device__
124
+ thrust::pair<OutputIterator1,OutputIterator2>
125
+ reduce_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
126
+ InputIterator1 keys_first,
127
+ InputIterator1 keys_last,
128
+ InputIterator2 values_first,
129
+ OutputIterator1 keys_output,
130
+ OutputIterator2 values_output,
131
+ BinaryPredicate binary_pred,
132
+ BinaryFunction binary_op)
133
+ {
134
+ using thrust::system::detail::generic::reduce_by_key;
135
+ return reduce_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first, keys_output, values_output, binary_pred, binary_op);
136
+ } // end reduce_by_key()
137
+
138
+
139
+ template<typename InputIterator>
140
+ typename thrust::iterator_traits<InputIterator>::value_type
141
+ reduce(InputIterator first,
142
+ InputIterator last)
143
+ {
144
+ using thrust::system::detail::generic::select_system;
145
+
146
+ typedef typename thrust::iterator_system<InputIterator>::type System;
147
+
148
+ System system;
149
+
150
+ return thrust::reduce(select_system(system), first, last);
151
+ }
152
+
153
+
154
+ template<typename InputIterator,
155
+ typename T>
156
+ T reduce(InputIterator first,
157
+ InputIterator last,
158
+ T init)
159
+ {
160
+ using thrust::system::detail::generic::select_system;
161
+
162
+ typedef typename thrust::iterator_system<InputIterator>::type System;
163
+
164
+ System system;
165
+
166
+ return thrust::reduce(select_system(system), first, last, init);
167
+ }
168
+
169
+
170
+ template<typename InputIterator,
171
+ typename T,
172
+ typename BinaryFunction>
173
+ T reduce(InputIterator first,
174
+ InputIterator last,
175
+ T init,
176
+ BinaryFunction binary_op)
177
+ {
178
+ using thrust::system::detail::generic::select_system;
179
+
180
+ typedef typename thrust::iterator_system<InputIterator>::type System;
181
+
182
+ System system;
183
+
184
+ return thrust::reduce(select_system(system), first, last, init, binary_op);
185
+ }
186
+
187
+
188
+ template<typename InputIterator1,
189
+ typename InputIterator2,
190
+ typename OutputIterator1,
191
+ typename OutputIterator2>
192
+ thrust::pair<OutputIterator1,OutputIterator2>
193
+ reduce_by_key(InputIterator1 keys_first,
194
+ InputIterator1 keys_last,
195
+ InputIterator2 values_first,
196
+ OutputIterator1 keys_output,
197
+ OutputIterator2 values_output)
198
+ {
199
+ using thrust::system::detail::generic::select_system;
200
+
201
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
202
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
203
+ typedef typename thrust::iterator_system<OutputIterator1>::type System3;
204
+ typedef typename thrust::iterator_system<OutputIterator2>::type System4;
205
+
206
+ System1 system1;
207
+ System2 system2;
208
+ System3 system3;
209
+ System4 system4;
210
+
211
+ return thrust::reduce_by_key(select_system(system1,system2,system3,system4), keys_first, keys_last, values_first, keys_output, values_output);
212
+ }
213
+
214
+
215
+ template<typename InputIterator1,
216
+ typename InputIterator2,
217
+ typename OutputIterator1,
218
+ typename OutputIterator2,
219
+ typename BinaryPredicate>
220
+ thrust::pair<OutputIterator1,OutputIterator2>
221
+ reduce_by_key(InputIterator1 keys_first,
222
+ InputIterator1 keys_last,
223
+ InputIterator2 values_first,
224
+ OutputIterator1 keys_output,
225
+ OutputIterator2 values_output,
226
+ BinaryPredicate binary_pred)
227
+ {
228
+ using thrust::system::detail::generic::select_system;
229
+
230
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
231
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
232
+ typedef typename thrust::iterator_system<OutputIterator1>::type System3;
233
+ typedef typename thrust::iterator_system<OutputIterator2>::type System4;
234
+
235
+ System1 system1;
236
+ System2 system2;
237
+ System3 system3;
238
+ System4 system4;
239
+
240
+ return thrust::reduce_by_key(select_system(system1,system2,system3,system4), keys_first, keys_last, values_first, keys_output, values_output, binary_pred);
241
+ }
242
+
243
+
244
+ template<typename InputIterator1,
245
+ typename InputIterator2,
246
+ typename OutputIterator1,
247
+ typename OutputIterator2,
248
+ typename BinaryPredicate,
249
+ typename BinaryFunction>
250
+ thrust::pair<OutputIterator1,OutputIterator2>
251
+ reduce_by_key(InputIterator1 keys_first,
252
+ InputIterator1 keys_last,
253
+ InputIterator2 values_first,
254
+ OutputIterator1 keys_output,
255
+ OutputIterator2 values_output,
256
+ BinaryPredicate binary_pred,
257
+ BinaryFunction binary_op)
258
+ {
259
+ using thrust::system::detail::generic::select_system;
260
+
261
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
262
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
263
+ typedef typename thrust::iterator_system<OutputIterator1>::type System3;
264
+ typedef typename thrust::iterator_system<OutputIterator2>::type System4;
265
+
266
+ System1 system1;
267
+ System2 system2;
268
+ System3 system3;
269
+ System4 system4;
270
+
271
+ return thrust::reduce_by_key(select_system(system1,system2,system3,system4), keys_first, keys_last, values_first, keys_output, values_output, binary_pred, binary_op);
272
+ }
273
+
274
+
275
+ THRUST_NAMESPACE_END
276
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/remove.inl ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/remove.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/remove.h>
24
+ #include <thrust/system/detail/adl/remove.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy,
31
+ typename ForwardIterator,
32
+ typename T>
33
+ __host__ __device__
34
+ ForwardIterator remove(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
35
+ ForwardIterator first,
36
+ ForwardIterator last,
37
+ const T &value)
38
+ {
39
+ using thrust::system::detail::generic::remove;
40
+ return remove(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, value);
41
+ } // end remove()
42
+
43
+
44
+ __thrust_exec_check_disable__
45
+ template<typename DerivedPolicy,
46
+ typename InputIterator,
47
+ typename OutputIterator,
48
+ typename T>
49
+ __host__ __device__
50
+ OutputIterator remove_copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
51
+ InputIterator first,
52
+ InputIterator last,
53
+ OutputIterator result,
54
+ const T &value)
55
+ {
56
+ using thrust::system::detail::generic::remove_copy;
57
+ return remove_copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, value);
58
+ } // end remove_copy()
59
+
60
+
61
+ __thrust_exec_check_disable__
62
+ template<typename DerivedPolicy,
63
+ typename ForwardIterator,
64
+ typename Predicate>
65
+ __host__ __device__
66
+ ForwardIterator remove_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
67
+ ForwardIterator first,
68
+ ForwardIterator last,
69
+ Predicate pred)
70
+ {
71
+ using thrust::system::detail::generic::remove_if;
72
+ return remove_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred);
73
+ } // end remove_if()
74
+
75
+
76
+ __thrust_exec_check_disable__
77
+ template<typename DerivedPolicy,
78
+ typename InputIterator,
79
+ typename OutputIterator,
80
+ typename Predicate>
81
+ __host__ __device__
82
+ OutputIterator remove_copy_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
83
+ InputIterator first,
84
+ InputIterator last,
85
+ OutputIterator result,
86
+ Predicate pred)
87
+ {
88
+ using thrust::system::detail::generic::remove_copy_if;
89
+ return remove_copy_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, pred);
90
+ } // end remove_copy_if()
91
+
92
+
93
+ __thrust_exec_check_disable__
94
+ template<typename DerivedPolicy,
95
+ typename ForwardIterator,
96
+ typename InputIterator,
97
+ typename Predicate>
98
+ __host__ __device__
99
+ ForwardIterator remove_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
100
+ ForwardIterator first,
101
+ ForwardIterator last,
102
+ InputIterator stencil,
103
+ Predicate pred)
104
+ {
105
+ using thrust::system::detail::generic::remove_if;
106
+ return remove_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, pred);
107
+ } // end remove_if()
108
+
109
+
110
+ __thrust_exec_check_disable__
111
+ template<typename DerivedPolicy,
112
+ typename InputIterator1,
113
+ typename InputIterator2,
114
+ typename OutputIterator,
115
+ typename Predicate>
116
+ __host__ __device__
117
+ OutputIterator remove_copy_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
118
+ InputIterator1 first,
119
+ InputIterator1 last,
120
+ InputIterator2 stencil,
121
+ OutputIterator result,
122
+ Predicate pred)
123
+ {
124
+ using thrust::system::detail::generic::remove_copy_if;
125
+ return remove_copy_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, result, pred);
126
+ } // end remove_copy_if()
127
+
128
+
129
+ template<typename ForwardIterator,
130
+ typename T>
131
+ ForwardIterator remove(ForwardIterator first,
132
+ ForwardIterator last,
133
+ const T &value)
134
+ {
135
+ using thrust::system::detail::generic::select_system;
136
+
137
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
138
+
139
+ System system;
140
+
141
+ return thrust::remove(select_system(system), first, last, value);
142
+ } // end remove()
143
+
144
+
145
+ template<typename InputIterator,
146
+ typename OutputIterator,
147
+ typename T>
148
+ OutputIterator remove_copy(InputIterator first,
149
+ InputIterator last,
150
+ OutputIterator result,
151
+ const T &value)
152
+ {
153
+ using thrust::system::detail::generic::select_system;
154
+
155
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
156
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
157
+
158
+ System1 system1;
159
+ System2 system2;
160
+
161
+ return thrust::remove_copy(select_system(system1,system2), first, last, result, value);
162
+ } // end remove_copy()
163
+
164
+
165
+ template<typename ForwardIterator,
166
+ typename Predicate>
167
+ ForwardIterator remove_if(ForwardIterator first,
168
+ ForwardIterator last,
169
+ Predicate pred)
170
+ {
171
+ using thrust::system::detail::generic::select_system;
172
+
173
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
174
+
175
+ System system;
176
+
177
+ return thrust::remove_if(select_system(system), first, last, pred);
178
+ } // end remove_if()
179
+
180
+
181
+ template<typename ForwardIterator,
182
+ typename InputIterator,
183
+ typename Predicate>
184
+ ForwardIterator remove_if(ForwardIterator first,
185
+ ForwardIterator last,
186
+ InputIterator stencil,
187
+ Predicate pred)
188
+ {
189
+ using thrust::system::detail::generic::select_system;
190
+
191
+ typedef typename thrust::iterator_system<ForwardIterator>::type System1;
192
+ typedef typename thrust::iterator_system<InputIterator>::type System2;
193
+
194
+ System1 system1;
195
+ System2 system2;
196
+
197
+ return thrust::remove_if(select_system(system1,system2), first, last, stencil, pred);
198
+ } // end remove_if()
199
+
200
+
201
+ template<typename InputIterator,
202
+ typename OutputIterator,
203
+ typename Predicate>
204
+ OutputIterator remove_copy_if(InputIterator first,
205
+ InputIterator last,
206
+ OutputIterator result,
207
+ Predicate pred)
208
+ {
209
+ using thrust::system::detail::generic::select_system;
210
+
211
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
212
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
213
+
214
+ System1 system1;
215
+ System2 system2;
216
+
217
+ return thrust::remove_copy_if(select_system(system1,system2), first, last, result, pred);
218
+ } // end remove_copy_if()
219
+
220
+
221
+ template<typename InputIterator1,
222
+ typename InputIterator2,
223
+ typename OutputIterator,
224
+ typename Predicate>
225
+ OutputIterator remove_copy_if(InputIterator1 first,
226
+ InputIterator1 last,
227
+ InputIterator2 stencil,
228
+ OutputIterator result,
229
+ Predicate pred)
230
+ {
231
+ using thrust::system::detail::generic::select_system;
232
+
233
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
234
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
235
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
236
+
237
+ System1 system1;
238
+ System2 system2;
239
+ System3 system3;
240
+
241
+ return thrust::remove_copy_if(select_system(system1,system2,system3), first, last, stencil, result, pred);
242
+ } // end remove_copy_if()
243
+
244
+
245
+ THRUST_NAMESPACE_END
246
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/replace.inl ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/replace.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/replace.h>
24
+ #include <thrust/system/detail/adl/replace.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy, typename ForwardIterator, typename T>
31
+ __host__ __device__
32
+ void replace(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
33
+ ForwardIterator first, ForwardIterator last,
34
+ const T &old_value,
35
+ const T &new_value)
36
+ {
37
+ using thrust::system::detail::generic::replace;
38
+ return replace(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, old_value, new_value);
39
+ } // end replace()
40
+
41
+
42
+ __thrust_exec_check_disable__
43
+ template<typename DerivedPolicy, typename ForwardIterator, typename Predicate, typename T>
44
+ __host__ __device__
45
+ void replace_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
46
+ ForwardIterator first, ForwardIterator last,
47
+ Predicate pred,
48
+ const T &new_value)
49
+ {
50
+ using thrust::system::detail::generic::replace_if;
51
+ return replace_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, pred, new_value);
52
+ } // end replace_if()
53
+
54
+
55
+ __thrust_exec_check_disable__
56
+ template<typename DerivedPolicy, typename ForwardIterator, typename InputIterator, typename Predicate, typename T>
57
+ __host__ __device__
58
+ void replace_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
59
+ ForwardIterator first, ForwardIterator last,
60
+ InputIterator stencil,
61
+ Predicate pred,
62
+ const T &new_value)
63
+ {
64
+ using thrust::system::detail::generic::replace_if;
65
+ return replace_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, pred, new_value);
66
+ } // end replace_if()
67
+
68
+
69
+ __thrust_exec_check_disable__
70
+ template<typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename T>
71
+ __host__ __device__
72
+ OutputIterator replace_copy(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
73
+ InputIterator first, InputIterator last,
74
+ OutputIterator result,
75
+ const T &old_value,
76
+ const T &new_value)
77
+ {
78
+ using thrust::system::detail::generic::replace_copy;
79
+ return replace_copy(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, old_value, new_value);
80
+ } // end replace_copy()
81
+
82
+
83
+ __thrust_exec_check_disable__
84
+ template<typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename Predicate, typename T>
85
+ __host__ __device__
86
+ OutputIterator replace_copy_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
87
+ InputIterator first, InputIterator last,
88
+ OutputIterator result,
89
+ Predicate pred,
90
+ const T &new_value)
91
+ {
92
+ using thrust::system::detail::generic::replace_copy_if;
93
+ return replace_copy_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, pred, new_value);
94
+ } // end replace_copy_if()
95
+
96
+
97
+ __thrust_exec_check_disable__
98
+ template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Predicate, typename T>
99
+ __host__ __device__
100
+ OutputIterator replace_copy_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
101
+ InputIterator1 first, InputIterator1 last,
102
+ InputIterator2 stencil,
103
+ OutputIterator result,
104
+ Predicate pred,
105
+ const T &new_value)
106
+ {
107
+ using thrust::system::detail::generic::replace_copy_if;
108
+ return replace_copy_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, result, pred, new_value);
109
+ } // end replace_copy_if()
110
+
111
+
112
+ template<typename InputIterator, typename OutputIterator, typename Predicate, typename T>
113
+ OutputIterator replace_copy_if(InputIterator first, InputIterator last,
114
+ OutputIterator result,
115
+ Predicate pred,
116
+ const T &new_value)
117
+ {
118
+ using thrust::system::detail::generic::select_system;
119
+
120
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
121
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
122
+
123
+ System1 system1;
124
+ System2 system2;
125
+
126
+ return thrust::replace_copy_if(select_system(system1,system2), first, last, result, pred, new_value);
127
+ } // end replace_copy_if()
128
+
129
+
130
+ template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Predicate, typename T>
131
+ OutputIterator replace_copy_if(InputIterator1 first, InputIterator1 last,
132
+ InputIterator2 stencil,
133
+ OutputIterator result,
134
+ Predicate pred,
135
+ const T &new_value)
136
+ {
137
+ using thrust::system::detail::generic::select_system;
138
+
139
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
140
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
141
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
142
+
143
+ System1 system1;
144
+ System2 system2;
145
+ System3 system3;
146
+
147
+ return thrust::replace_copy_if(select_system(system1,system2,system3), first, last, stencil, result, pred, new_value);
148
+ } // end replace_copy_if()
149
+
150
+
151
+ template<typename InputIterator, typename OutputIterator, typename T>
152
+ OutputIterator replace_copy(InputIterator first, InputIterator last,
153
+ OutputIterator result,
154
+ const T &old_value,
155
+ const T &new_value)
156
+ {
157
+ using thrust::system::detail::generic::select_system;
158
+
159
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
160
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
161
+
162
+ System1 system1;
163
+ System2 system2;
164
+
165
+ return thrust::replace_copy(select_system(system1,system2), first, last, result, old_value, new_value);
166
+ } // end replace_copy()
167
+
168
+
169
+ template<typename ForwardIterator, typename Predicate, typename T>
170
+ void replace_if(ForwardIterator first, ForwardIterator last,
171
+ Predicate pred,
172
+ const T &new_value)
173
+ {
174
+ using thrust::system::detail::generic::select_system;
175
+
176
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
177
+
178
+ System system;
179
+
180
+ return thrust::replace_if(select_system(system), first, last, pred, new_value);
181
+ } // end replace_if()
182
+
183
+
184
+ template<typename ForwardIterator, typename InputIterator, typename Predicate, typename T>
185
+ void replace_if(ForwardIterator first, ForwardIterator last,
186
+ InputIterator stencil,
187
+ Predicate pred,
188
+ const T &new_value)
189
+ {
190
+ using thrust::system::detail::generic::select_system;
191
+
192
+ typedef typename thrust::iterator_system<ForwardIterator>::type System1;
193
+ typedef typename thrust::iterator_system<InputIterator>::type System2;
194
+
195
+ System1 system1;
196
+ System2 system2;
197
+
198
+ return thrust::replace_if(select_system(system1,system2), first, last, stencil, pred, new_value);
199
+ } // end replace_if()
200
+
201
+
202
+ template<typename ForwardIterator, typename T>
203
+ void replace(ForwardIterator first, ForwardIterator last,
204
+ const T &old_value,
205
+ const T &new_value)
206
+ {
207
+ using thrust::system::detail::generic::select_system;
208
+
209
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
210
+
211
+ System system;
212
+
213
+ return thrust::replace(select_system(system), first, last, old_value, new_value);
214
+ } // end replace()
215
+
216
+
217
+ THRUST_NAMESPACE_END
218
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/scan.inl ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/scan.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/scan.h>
24
+ #include <thrust/system/detail/generic/scan_by_key.h>
25
+ #include <thrust/system/detail/adl/scan.h>
26
+ #include <thrust/system/detail/adl/scan_by_key.h>
27
+
28
+ THRUST_NAMESPACE_BEGIN
29
+
30
+
31
+ __thrust_exec_check_disable__
32
+ template<typename DerivedPolicy,
33
+ typename InputIterator,
34
+ typename OutputIterator>
35
+ __host__ __device__
36
+ OutputIterator inclusive_scan(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
37
+ InputIterator first,
38
+ InputIterator last,
39
+ OutputIterator result)
40
+ {
41
+ using thrust::system::detail::generic::inclusive_scan;
42
+ return inclusive_scan(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result);
43
+ } // end inclusive_scan()
44
+
45
+
46
+ __thrust_exec_check_disable__
47
+ template<typename DerivedPolicy,
48
+ typename InputIterator,
49
+ typename OutputIterator,
50
+ typename AssociativeOperator>
51
+ __host__ __device__
52
+ OutputIterator inclusive_scan(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
53
+ InputIterator first,
54
+ InputIterator last,
55
+ OutputIterator result,
56
+ AssociativeOperator binary_op)
57
+ {
58
+ using thrust::system::detail::generic::inclusive_scan;
59
+ return inclusive_scan(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, binary_op);
60
+ } // end inclusive_scan()
61
+
62
+
63
+ __thrust_exec_check_disable__
64
+ template<typename DerivedPolicy,
65
+ typename InputIterator,
66
+ typename OutputIterator>
67
+ __host__ __device__
68
+ OutputIterator exclusive_scan(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
69
+ InputIterator first,
70
+ InputIterator last,
71
+ OutputIterator result)
72
+ {
73
+ using thrust::system::detail::generic::exclusive_scan;
74
+ return exclusive_scan(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result);
75
+ } // end exclusive_scan()
76
+
77
+
78
+ __thrust_exec_check_disable__
79
+ template<typename DerivedPolicy,
80
+ typename InputIterator,
81
+ typename OutputIterator,
82
+ typename T>
83
+ __host__ __device__
84
+ OutputIterator exclusive_scan(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
85
+ InputIterator first,
86
+ InputIterator last,
87
+ OutputIterator result,
88
+ T init)
89
+ {
90
+ using thrust::system::detail::generic::exclusive_scan;
91
+ return exclusive_scan(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, init);
92
+ } // end exclusive_scan()
93
+
94
+
95
+ __thrust_exec_check_disable__
96
+ template<typename DerivedPolicy,
97
+ typename InputIterator,
98
+ typename OutputIterator,
99
+ typename T,
100
+ typename AssociativeOperator>
101
+ __host__ __device__
102
+ OutputIterator exclusive_scan(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
103
+ InputIterator first,
104
+ InputIterator last,
105
+ OutputIterator result,
106
+ T init,
107
+ AssociativeOperator binary_op)
108
+ {
109
+ using thrust::system::detail::generic::exclusive_scan;
110
+ return exclusive_scan(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, init, binary_op);
111
+ } // end exclusive_scan()
112
+
113
+
114
+ __thrust_exec_check_disable__
115
+ template<typename DerivedPolicy,
116
+ typename InputIterator1,
117
+ typename InputIterator2,
118
+ typename OutputIterator>
119
+ __host__ __device__
120
+ OutputIterator inclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
121
+ InputIterator1 first1,
122
+ InputIterator1 last1,
123
+ InputIterator2 first2,
124
+ OutputIterator result)
125
+ {
126
+ using thrust::system::detail::generic::inclusive_scan_by_key;
127
+ return inclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result);
128
+ } // end inclusive_scan_by_key()
129
+
130
+
131
+ __thrust_exec_check_disable__
132
+ template<typename DerivedPolicy,
133
+ typename InputIterator1,
134
+ typename InputIterator2,
135
+ typename OutputIterator,
136
+ typename BinaryPredicate>
137
+ __host__ __device__
138
+ OutputIterator inclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
139
+ InputIterator1 first1,
140
+ InputIterator1 last1,
141
+ InputIterator2 first2,
142
+ OutputIterator result,
143
+ BinaryPredicate binary_pred)
144
+ {
145
+ using thrust::system::detail::generic::inclusive_scan_by_key;
146
+ return inclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result, binary_pred);
147
+ } // end inclusive_scan_by_key()
148
+
149
+
150
+ __thrust_exec_check_disable__
151
+ template<typename DerivedPolicy,
152
+ typename InputIterator1,
153
+ typename InputIterator2,
154
+ typename OutputIterator,
155
+ typename BinaryPredicate,
156
+ typename AssociativeOperator>
157
+ __host__ __device__
158
+ OutputIterator inclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
159
+ InputIterator1 first1,
160
+ InputIterator1 last1,
161
+ InputIterator2 first2,
162
+ OutputIterator result,
163
+ BinaryPredicate binary_pred,
164
+ AssociativeOperator binary_op)
165
+ {
166
+ using thrust::system::detail::generic::inclusive_scan_by_key;
167
+ return inclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result, binary_pred, binary_op);
168
+ } // end inclusive_scan_by_key()
169
+
170
+
171
+ __thrust_exec_check_disable__
172
+ template<typename DerivedPolicy,
173
+ typename InputIterator1,
174
+ typename InputIterator2,
175
+ typename OutputIterator>
176
+ __host__ __device__
177
+ OutputIterator exclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
178
+ InputIterator1 first1,
179
+ InputIterator1 last1,
180
+ InputIterator2 first2,
181
+ OutputIterator result)
182
+ {
183
+ using thrust::system::detail::generic::exclusive_scan_by_key;
184
+ return exclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result);
185
+ } // end exclusive_scan_by_key()
186
+
187
+
188
+ __thrust_exec_check_disable__
189
+ template<typename DerivedPolicy,
190
+ typename InputIterator1,
191
+ typename InputIterator2,
192
+ typename OutputIterator,
193
+ typename T>
194
+ __host__ __device__
195
+ OutputIterator exclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
196
+ InputIterator1 first1,
197
+ InputIterator1 last1,
198
+ InputIterator2 first2,
199
+ OutputIterator result,
200
+ T init)
201
+ {
202
+ using thrust::system::detail::generic::exclusive_scan_by_key;
203
+ return exclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result, init);
204
+ } // end exclusive_scan_by_key()
205
+
206
+
207
+ __thrust_exec_check_disable__
208
+ template<typename DerivedPolicy,
209
+ typename InputIterator1,
210
+ typename InputIterator2,
211
+ typename OutputIterator,
212
+ typename T,
213
+ typename BinaryPredicate>
214
+ __host__ __device__
215
+ OutputIterator exclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
216
+ InputIterator1 first1,
217
+ InputIterator1 last1,
218
+ InputIterator2 first2,
219
+ OutputIterator result,
220
+ T init,
221
+ BinaryPredicate binary_pred)
222
+ {
223
+ using thrust::system::detail::generic::exclusive_scan_by_key;
224
+ return exclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result, init, binary_pred);
225
+ } // end exclusive_scan_by_key()
226
+
227
+
228
+ __thrust_exec_check_disable__
229
+ template<typename DerivedPolicy,
230
+ typename InputIterator1,
231
+ typename InputIterator2,
232
+ typename OutputIterator,
233
+ typename T,
234
+ typename BinaryPredicate,
235
+ typename AssociativeOperator>
236
+ __host__ __device__
237
+ OutputIterator exclusive_scan_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
238
+ InputIterator1 first1,
239
+ InputIterator1 last1,
240
+ InputIterator2 first2,
241
+ OutputIterator result,
242
+ T init,
243
+ BinaryPredicate binary_pred,
244
+ AssociativeOperator binary_op)
245
+ {
246
+ using thrust::system::detail::generic::exclusive_scan_by_key;
247
+ return exclusive_scan_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result, init, binary_pred, binary_op);
248
+ } // end exclusive_scan_by_key()
249
+
250
+
251
+ template<typename InputIterator,
252
+ typename OutputIterator>
253
+ OutputIterator inclusive_scan(InputIterator first,
254
+ InputIterator last,
255
+ OutputIterator result)
256
+ {
257
+ using thrust::system::detail::generic::select_system;
258
+
259
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
260
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
261
+
262
+ System1 system1;
263
+ System2 system2;
264
+
265
+ return thrust::inclusive_scan(select_system(system1,system2), first, last, result);
266
+ } // end inclusive_scan()
267
+
268
+
269
+ template<typename InputIterator,
270
+ typename OutputIterator,
271
+ typename BinaryFunction>
272
+ OutputIterator inclusive_scan(InputIterator first,
273
+ InputIterator last,
274
+ OutputIterator result,
275
+ BinaryFunction binary_op)
276
+ {
277
+ using thrust::system::detail::generic::select_system;
278
+
279
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
280
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
281
+
282
+ System1 system1;
283
+ System2 system2;
284
+
285
+ return thrust::inclusive_scan(select_system(system1,system2), first, last, result, binary_op);
286
+ } // end inclusive_scan()
287
+
288
+
289
+ template<typename InputIterator,
290
+ typename OutputIterator>
291
+ OutputIterator exclusive_scan(InputIterator first,
292
+ InputIterator last,
293
+ OutputIterator result)
294
+ {
295
+ using thrust::system::detail::generic::select_system;
296
+
297
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
298
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
299
+
300
+ System1 system1;
301
+ System2 system2;
302
+
303
+ return thrust::exclusive_scan(select_system(system1,system2), first, last, result);
304
+ } // end exclusive_scan()
305
+
306
+
307
+ template<typename InputIterator,
308
+ typename OutputIterator,
309
+ typename T>
310
+ OutputIterator exclusive_scan(InputIterator first,
311
+ InputIterator last,
312
+ OutputIterator result,
313
+ T init)
314
+ {
315
+ using thrust::system::detail::generic::select_system;
316
+
317
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
318
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
319
+
320
+ System1 system1;
321
+ System2 system2;
322
+
323
+ return thrust::exclusive_scan(select_system(system1,system2), first, last, result, init);
324
+ } // end exclusive_scan()
325
+
326
+
327
+ template<typename InputIterator,
328
+ typename OutputIterator,
329
+ typename T,
330
+ typename BinaryFunction>
331
+ OutputIterator exclusive_scan(InputIterator first,
332
+ InputIterator last,
333
+ OutputIterator result,
334
+ T init,
335
+ BinaryFunction binary_op)
336
+ {
337
+ using thrust::system::detail::generic::select_system;
338
+
339
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
340
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
341
+
342
+ System1 system1;
343
+ System2 system2;
344
+
345
+ return thrust::exclusive_scan(select_system(system1,system2), first, last, result, init, binary_op);
346
+ } // end exclusive_scan()
347
+
348
+
349
+ template<typename InputIterator1,
350
+ typename InputIterator2,
351
+ typename OutputIterator>
352
+ OutputIterator inclusive_scan_by_key(InputIterator1 first1,
353
+ InputIterator1 last1,
354
+ InputIterator2 first2,
355
+ OutputIterator result)
356
+ {
357
+ using thrust::system::detail::generic::select_system;
358
+
359
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
360
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
361
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
362
+
363
+ System1 system1;
364
+ System2 system2;
365
+ System3 system3;
366
+
367
+ return thrust::inclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result);
368
+ }
369
+
370
+
371
+ template<typename InputIterator1,
372
+ typename InputIterator2,
373
+ typename OutputIterator,
374
+ typename BinaryPredicate>
375
+ OutputIterator inclusive_scan_by_key(InputIterator1 first1,
376
+ InputIterator1 last1,
377
+ InputIterator2 first2,
378
+ OutputIterator result,
379
+ BinaryPredicate binary_pred)
380
+ {
381
+ using thrust::system::detail::generic::select_system;
382
+
383
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
384
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
385
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
386
+
387
+ System1 system1;
388
+ System2 system2;
389
+ System3 system3;
390
+
391
+ return thrust::inclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result, binary_pred);
392
+ }
393
+
394
+
395
+ template<typename InputIterator1,
396
+ typename InputIterator2,
397
+ typename OutputIterator,
398
+ typename BinaryPredicate,
399
+ typename AssociativeOperator>
400
+ OutputIterator inclusive_scan_by_key(InputIterator1 first1,
401
+ InputIterator1 last1,
402
+ InputIterator2 first2,
403
+ OutputIterator result,
404
+ BinaryPredicate binary_pred,
405
+ AssociativeOperator binary_op)
406
+ {
407
+ using thrust::system::detail::generic::select_system;
408
+
409
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
410
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
411
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
412
+
413
+ System1 system1;
414
+ System2 system2;
415
+ System3 system3;
416
+
417
+ return thrust::inclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result, binary_pred, binary_op);
418
+ }
419
+
420
+
421
+ template<typename InputIterator1,
422
+ typename InputIterator2,
423
+ typename OutputIterator>
424
+ OutputIterator exclusive_scan_by_key(InputIterator1 first1,
425
+ InputIterator1 last1,
426
+ InputIterator2 first2,
427
+ OutputIterator result)
428
+ {
429
+ using thrust::system::detail::generic::select_system;
430
+
431
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
432
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
433
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
434
+
435
+ System1 system1;
436
+ System2 system2;
437
+ System3 system3;
438
+
439
+ return thrust::exclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result);
440
+ }
441
+
442
+
443
+ template<typename InputIterator1,
444
+ typename InputIterator2,
445
+ typename OutputIterator,
446
+ typename T>
447
+ OutputIterator exclusive_scan_by_key(InputIterator1 first1,
448
+ InputIterator1 last1,
449
+ InputIterator2 first2,
450
+ OutputIterator result,
451
+ T init)
452
+ {
453
+ using thrust::system::detail::generic::select_system;
454
+
455
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
456
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
457
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
458
+
459
+ System1 system1;
460
+ System2 system2;
461
+ System3 system3;
462
+
463
+ return thrust::exclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result, init);
464
+ }
465
+
466
+
467
+ template<typename InputIterator1,
468
+ typename InputIterator2,
469
+ typename OutputIterator,
470
+ typename T,
471
+ typename BinaryPredicate>
472
+ OutputIterator exclusive_scan_by_key(InputIterator1 first1,
473
+ InputIterator1 last1,
474
+ InputIterator2 first2,
475
+ OutputIterator result,
476
+ T init,
477
+ BinaryPredicate binary_pred)
478
+ {
479
+ using thrust::system::detail::generic::select_system;
480
+
481
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
482
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
483
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
484
+
485
+ System1 system1;
486
+ System2 system2;
487
+ System3 system3;
488
+
489
+ return thrust::exclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result, init, binary_pred);
490
+ }
491
+
492
+
493
+ template<typename InputIterator1,
494
+ typename InputIterator2,
495
+ typename OutputIterator,
496
+ typename T,
497
+ typename BinaryPredicate,
498
+ typename AssociativeOperator>
499
+ OutputIterator exclusive_scan_by_key(InputIterator1 first1,
500
+ InputIterator1 last1,
501
+ InputIterator2 first2,
502
+ OutputIterator result,
503
+ T init,
504
+ BinaryPredicate binary_pred,
505
+ AssociativeOperator binary_op)
506
+ {
507
+ using thrust::system::detail::generic::select_system;
508
+
509
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
510
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
511
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
512
+
513
+ System1 system1;
514
+ System2 system2;
515
+ System3 system3;
516
+
517
+ return thrust::exclusive_scan_by_key(select_system(system1,system2,system3), first1, last1, first2, result, init, binary_pred, binary_op);
518
+ }
519
+
520
+
521
+ THRUST_NAMESPACE_END
522
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/scatter.inl ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/scatter.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/system/detail/generic/scatter.h>
25
+ #include <thrust/system/detail/adl/scatter.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+
30
+ __thrust_exec_check_disable__
31
+ template<typename DerivedPolicy,
32
+ typename InputIterator1,
33
+ typename InputIterator2,
34
+ typename RandomAccessIterator>
35
+ __host__ __device__
36
+ void scatter(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
37
+ InputIterator1 first,
38
+ InputIterator1 last,
39
+ InputIterator2 map,
40
+ RandomAccessIterator output)
41
+ {
42
+ using thrust::system::detail::generic::scatter;
43
+ return scatter(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, map, output);
44
+ } // end scatter()
45
+
46
+
47
+ __thrust_exec_check_disable__
48
+ template<typename DerivedPolicy,
49
+ typename InputIterator1,
50
+ typename InputIterator2,
51
+ typename InputIterator3,
52
+ typename RandomAccessIterator>
53
+ __host__ __device__
54
+ void scatter_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
55
+ InputIterator1 first,
56
+ InputIterator1 last,
57
+ InputIterator2 map,
58
+ InputIterator3 stencil,
59
+ RandomAccessIterator output)
60
+ {
61
+ using thrust::system::detail::generic::scatter_if;
62
+ return scatter_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, map, stencil, output);
63
+ } // end scatter_if()
64
+
65
+
66
+ __thrust_exec_check_disable__
67
+ template<typename DerivedPolicy,
68
+ typename InputIterator1,
69
+ typename InputIterator2,
70
+ typename InputIterator3,
71
+ typename RandomAccessIterator,
72
+ typename Predicate>
73
+ __host__ __device__
74
+ void scatter_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
75
+ InputIterator1 first,
76
+ InputIterator1 last,
77
+ InputIterator2 map,
78
+ InputIterator3 stencil,
79
+ RandomAccessIterator output,
80
+ Predicate pred)
81
+ {
82
+ using thrust::system::detail::generic::scatter_if;
83
+ return scatter_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, map, stencil, output, pred);
84
+ } // end scatter_if()
85
+
86
+
87
+ template<typename InputIterator1,
88
+ typename InputIterator2,
89
+ typename RandomAccessIterator>
90
+ void scatter(InputIterator1 first,
91
+ InputIterator1 last,
92
+ InputIterator2 map,
93
+ RandomAccessIterator output)
94
+ {
95
+ using thrust::system::detail::generic::select_system;
96
+
97
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
98
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
99
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System3;
100
+
101
+ System1 system1;
102
+ System2 system2;
103
+ System3 system3;
104
+
105
+ return thrust::scatter(select_system(system1,system2,system3), first, last, map, output);
106
+ } // end scatter()
107
+
108
+
109
+ template<typename InputIterator1,
110
+ typename InputIterator2,
111
+ typename InputIterator3,
112
+ typename RandomAccessIterator>
113
+ void scatter_if(InputIterator1 first,
114
+ InputIterator1 last,
115
+ InputIterator2 map,
116
+ InputIterator3 stencil,
117
+ RandomAccessIterator output)
118
+ {
119
+ using thrust::system::detail::generic::select_system;
120
+
121
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
122
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
123
+ typedef typename thrust::iterator_system<InputIterator3>::type System3;
124
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System4;
125
+
126
+ System1 system1;
127
+ System2 system2;
128
+ System3 system3;
129
+ System4 system4;
130
+
131
+ return thrust::scatter_if(select_system(system1,system2,system3,system4), first, last, map, stencil, output);
132
+ } // end scatter_if()
133
+
134
+
135
+ template<typename InputIterator1,
136
+ typename InputIterator2,
137
+ typename InputIterator3,
138
+ typename RandomAccessIterator,
139
+ typename Predicate>
140
+ void scatter_if(InputIterator1 first,
141
+ InputIterator1 last,
142
+ InputIterator2 map,
143
+ InputIterator3 stencil,
144
+ RandomAccessIterator output,
145
+ Predicate pred)
146
+ {
147
+ using thrust::system::detail::generic::select_system;
148
+
149
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
150
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
151
+ typedef typename thrust::iterator_system<InputIterator3>::type System3;
152
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System4;
153
+
154
+ System1 system1;
155
+ System2 system2;
156
+ System3 system3;
157
+ System4 system4;
158
+
159
+ return thrust::scatter_if(select_system(system1,system2,system3,system4), first, last, map, stencil, output, pred);
160
+ } // end scatter_if()
161
+
162
+ THRUST_NAMESPACE_END
163
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/seq.h ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/allocator_aware_execution_policy.h>
21
+ #include <thrust/system/detail/sequential/execution_policy.h>
22
+
23
+ THRUST_NAMESPACE_BEGIN
24
+ namespace detail
25
+ {
26
+
27
+
28
+ struct seq_t : thrust::system::detail::sequential::execution_policy<seq_t>,
29
+ thrust::detail::allocator_aware_execution_policy<
30
+ thrust::system::detail::sequential::execution_policy>
31
+ {
32
+ __host__ __device__
33
+ constexpr seq_t() : thrust::system::detail::sequential::execution_policy<seq_t>() {}
34
+
35
+ // allow any execution_policy to convert to seq_t
36
+ template<typename DerivedPolicy>
37
+ __host__ __device__
38
+ seq_t(const thrust::execution_policy<DerivedPolicy> &)
39
+ : thrust::system::detail::sequential::execution_policy<seq_t>()
40
+ {}
41
+ };
42
+
43
+
44
+ } // end detail
45
+
46
+
47
+ THRUST_INLINE_CONSTANT detail::seq_t seq;
48
+
49
+
50
+ THRUST_NAMESPACE_END
51
+
52
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/shuffle.inl ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2020 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/detail/cpp11_required.h>
21
+
22
+ #if THRUST_CPP_DIALECT >= 2011
23
+
24
+ #include <thrust/iterator/iterator_traits.h>
25
+ #include <thrust/shuffle.h>
26
+ #include <thrust/system/detail/generic/select_system.h>
27
+ #include <thrust/system/detail/generic/shuffle.h>
28
+
29
+ THRUST_NAMESPACE_BEGIN
30
+
31
+ __thrust_exec_check_disable__
32
+ template <typename DerivedPolicy, typename RandomIterator, typename URBG>
33
+ __host__ __device__ void shuffle(
34
+ const thrust::detail::execution_policy_base<DerivedPolicy>& exec,
35
+ RandomIterator first, RandomIterator last, URBG&& g) {
36
+ using thrust::system::detail::generic::shuffle;
37
+ return shuffle(
38
+ thrust::detail::derived_cast(thrust::detail::strip_const(exec)),
39
+ first, last, g);
40
+ }
41
+
42
+ template <typename RandomIterator, typename URBG>
43
+ __host__ __device__ void shuffle(RandomIterator first, RandomIterator last,
44
+ URBG&& g) {
45
+ using thrust::system::detail::generic::select_system;
46
+
47
+ typedef typename thrust::iterator_system<RandomIterator>::type System;
48
+ System system;
49
+
50
+ return thrust::shuffle(select_system(system), first, last, g);
51
+ }
52
+
53
+ __thrust_exec_check_disable__
54
+ template <typename DerivedPolicy, typename RandomIterator,
55
+ typename OutputIterator, typename URBG>
56
+ __host__ __device__ void shuffle_copy(
57
+ const thrust::detail::execution_policy_base<DerivedPolicy>& exec,
58
+ RandomIterator first, RandomIterator last, OutputIterator result,
59
+ URBG&& g) {
60
+ using thrust::system::detail::generic::shuffle_copy;
61
+ return shuffle_copy(
62
+ thrust::detail::derived_cast(thrust::detail::strip_const(exec)),
63
+ first, last, result, g);
64
+ }
65
+
66
+ template <typename RandomIterator, typename OutputIterator, typename URBG>
67
+ __host__ __device__ void shuffle_copy(RandomIterator first, RandomIterator last,
68
+ OutputIterator result, URBG&& g) {
69
+ using thrust::system::detail::generic::select_system;
70
+
71
+ typedef typename thrust::iterator_system<RandomIterator>::type System1;
72
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
73
+
74
+ System1 system1;
75
+ System2 system2;
76
+
77
+ return thrust::shuffle_copy(select_system(system1, system2), first, last,
78
+ result, g);
79
+ }
80
+
81
+ THRUST_NAMESPACE_END
82
+
83
+ #endif
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/sort.inl ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/sort.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/sort.h>
24
+ #include <thrust/system/detail/adl/sort.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy, typename RandomAccessIterator>
31
+ __host__ __device__
32
+ void sort(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
33
+ RandomAccessIterator first,
34
+ RandomAccessIterator last)
35
+ {
36
+ using thrust::system::detail::generic::sort;
37
+ return sort(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last);
38
+ } // end sort()
39
+
40
+
41
+ __thrust_exec_check_disable__
42
+ template<typename DerivedPolicy,
43
+ typename RandomAccessIterator,
44
+ typename StrictWeakOrdering>
45
+ __host__ __device__
46
+ void sort(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
47
+ RandomAccessIterator first,
48
+ RandomAccessIterator last,
49
+ StrictWeakOrdering comp)
50
+ {
51
+ using thrust::system::detail::generic::sort;
52
+ return sort(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, comp);
53
+ } // end sort()
54
+
55
+
56
+ __thrust_exec_check_disable__
57
+ template<typename DerivedPolicy, typename RandomAccessIterator>
58
+ __host__ __device__
59
+ void stable_sort(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
60
+ RandomAccessIterator first,
61
+ RandomAccessIterator last)
62
+ {
63
+ using thrust::system::detail::generic::stable_sort;
64
+ return stable_sort(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last);
65
+ } // end stable_sort()
66
+
67
+
68
+ __thrust_exec_check_disable__
69
+ template<typename DerivedPolicy,
70
+ typename RandomAccessIterator,
71
+ typename StrictWeakOrdering>
72
+ __host__ __device__
73
+ void stable_sort(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
74
+ RandomAccessIterator first,
75
+ RandomAccessIterator last,
76
+ StrictWeakOrdering comp)
77
+ {
78
+ using thrust::system::detail::generic::stable_sort;
79
+ return stable_sort(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, comp);
80
+ } // end stable_sort()
81
+
82
+
83
+ __thrust_exec_check_disable__
84
+ template<typename DerivedPolicy,
85
+ typename RandomAccessIterator1,
86
+ typename RandomAccessIterator2>
87
+ __host__ __device__
88
+ void sort_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
89
+ RandomAccessIterator1 keys_first,
90
+ RandomAccessIterator1 keys_last,
91
+ RandomAccessIterator2 values_first)
92
+ {
93
+ using thrust::system::detail::generic::sort_by_key;
94
+ return sort_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first);
95
+ } // end sort_by_key()
96
+
97
+
98
+ __thrust_exec_check_disable__
99
+ template<typename DerivedPolicy,
100
+ typename RandomAccessIterator1,
101
+ typename RandomAccessIterator2,
102
+ typename StrictWeakOrdering>
103
+ __host__ __device__
104
+ void sort_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
105
+ RandomAccessIterator1 keys_first,
106
+ RandomAccessIterator1 keys_last,
107
+ RandomAccessIterator2 values_first,
108
+ StrictWeakOrdering comp)
109
+ {
110
+ using thrust::system::detail::generic::sort_by_key;
111
+ return sort_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first, comp);
112
+ } // end sort_by_key()
113
+
114
+
115
+ __thrust_exec_check_disable__
116
+ template<typename DerivedPolicy,
117
+ typename RandomAccessIterator1,
118
+ typename RandomAccessIterator2>
119
+ __host__ __device__
120
+ void stable_sort_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
121
+ RandomAccessIterator1 keys_first,
122
+ RandomAccessIterator1 keys_last,
123
+ RandomAccessIterator2 values_first)
124
+ {
125
+ using thrust::system::detail::generic::stable_sort_by_key;
126
+ return stable_sort_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first);
127
+ } // end stable_sort_by_key()
128
+
129
+
130
+ __thrust_exec_check_disable__
131
+ template<typename DerivedPolicy,
132
+ typename RandomAccessIterator1,
133
+ typename RandomAccessIterator2,
134
+ typename StrictWeakOrdering>
135
+ __host__ __device__
136
+ void stable_sort_by_key(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
137
+ RandomAccessIterator1 keys_first,
138
+ RandomAccessIterator1 keys_last,
139
+ RandomAccessIterator2 values_first,
140
+ StrictWeakOrdering comp)
141
+ {
142
+ using thrust::system::detail::generic::stable_sort_by_key;
143
+ return stable_sort_by_key(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), keys_first, keys_last, values_first, comp);
144
+ } // end stable_sort_by_key()
145
+
146
+
147
+ __thrust_exec_check_disable__
148
+ template<typename DerivedPolicy, typename ForwardIterator>
149
+ __host__ __device__
150
+ bool is_sorted(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
151
+ ForwardIterator first,
152
+ ForwardIterator last)
153
+ {
154
+ using thrust::system::detail::generic::is_sorted;
155
+ return is_sorted(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last);
156
+ } // end is_sorted()
157
+
158
+
159
+ __thrust_exec_check_disable__
160
+ template<typename DerivedPolicy, typename ForwardIterator, typename Compare>
161
+ __host__ __device__
162
+ bool is_sorted(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
163
+ ForwardIterator first,
164
+ ForwardIterator last,
165
+ Compare comp)
166
+ {
167
+ using thrust::system::detail::generic::is_sorted;
168
+ return is_sorted(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, comp);
169
+ } // end is_sorted()
170
+
171
+
172
+ __thrust_exec_check_disable__
173
+ template<typename DerivedPolicy, typename ForwardIterator>
174
+ __host__ __device__
175
+ ForwardIterator is_sorted_until(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
176
+ ForwardIterator first,
177
+ ForwardIterator last)
178
+ {
179
+ using thrust::system::detail::generic::is_sorted_until;
180
+ return is_sorted_until(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last);
181
+ } // end is_sorted_until()
182
+
183
+
184
+ __thrust_exec_check_disable__
185
+ template<typename DerivedPolicy, typename ForwardIterator, typename Compare>
186
+ __host__ __device__
187
+ ForwardIterator is_sorted_until(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
188
+ ForwardIterator first,
189
+ ForwardIterator last,
190
+ Compare comp)
191
+ {
192
+ using thrust::system::detail::generic::is_sorted_until;
193
+ return is_sorted_until(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, comp);
194
+ } // end is_sorted_until()
195
+
196
+
197
+ ///////////////
198
+ // Key Sorts //
199
+ ///////////////
200
+
201
+ template<typename RandomAccessIterator>
202
+ void sort(RandomAccessIterator first,
203
+ RandomAccessIterator last)
204
+ {
205
+ using thrust::system::detail::generic::select_system;
206
+
207
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System;
208
+
209
+ System system;
210
+
211
+ return thrust::sort(select_system(system), first, last);
212
+ } // end sort()
213
+
214
+
215
+ template<typename RandomAccessIterator,
216
+ typename StrictWeakOrdering>
217
+ __host__ __device__
218
+ void sort(RandomAccessIterator first,
219
+ RandomAccessIterator last,
220
+ StrictWeakOrdering comp)
221
+ {
222
+ using thrust::system::detail::generic::select_system;
223
+
224
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System;
225
+
226
+ System system;
227
+
228
+ return thrust::sort(select_system(system), first, last, comp);
229
+ } // end sort()
230
+
231
+
232
+ template<typename RandomAccessIterator>
233
+ void stable_sort(RandomAccessIterator first,
234
+ RandomAccessIterator last)
235
+ {
236
+ using thrust::system::detail::generic::select_system;
237
+
238
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System;
239
+
240
+ System system;
241
+
242
+ return thrust::stable_sort(select_system(system), first, last);
243
+ } // end stable_sort()
244
+
245
+
246
+ template<typename RandomAccessIterator,
247
+ typename StrictWeakOrdering>
248
+ void stable_sort(RandomAccessIterator first,
249
+ RandomAccessIterator last,
250
+ StrictWeakOrdering comp)
251
+ {
252
+ using thrust::system::detail::generic::select_system;
253
+
254
+ typedef typename thrust::iterator_system<RandomAccessIterator>::type System;
255
+
256
+ System system;
257
+
258
+ return thrust::stable_sort(select_system(system), first, last, comp);
259
+ } // end stable_sort()
260
+
261
+
262
+
263
+ /////////////////////
264
+ // Key-Value Sorts //
265
+ /////////////////////
266
+
267
+ template<typename RandomAccessIterator1,
268
+ typename RandomAccessIterator2>
269
+ void sort_by_key(RandomAccessIterator1 keys_first,
270
+ RandomAccessIterator1 keys_last,
271
+ RandomAccessIterator2 values_first)
272
+ {
273
+ using thrust::system::detail::generic::select_system;
274
+
275
+ typedef typename thrust::iterator_system<RandomAccessIterator1>::type System1;
276
+ typedef typename thrust::iterator_system<RandomAccessIterator2>::type System2;
277
+
278
+ System1 system1;
279
+ System2 system2;
280
+
281
+ return thrust::sort_by_key(select_system(system1,system2), keys_first, keys_last, values_first);
282
+ } // end sort_by_key()
283
+
284
+
285
+ template<typename RandomAccessIterator1,
286
+ typename RandomAccessIterator2,
287
+ typename StrictWeakOrdering>
288
+ void sort_by_key(RandomAccessIterator1 keys_first,
289
+ RandomAccessIterator1 keys_last,
290
+ RandomAccessIterator2 values_first,
291
+ StrictWeakOrdering comp)
292
+ {
293
+ using thrust::system::detail::generic::select_system;
294
+
295
+ typedef typename thrust::iterator_system<RandomAccessIterator1>::type System1;
296
+ typedef typename thrust::iterator_system<RandomAccessIterator2>::type System2;
297
+
298
+ System1 system1;
299
+ System2 system2;
300
+
301
+ return thrust::sort_by_key(select_system(system1,system2), keys_first, keys_last, values_first, comp);
302
+ } // end sort_by_key()
303
+
304
+
305
+ template<typename RandomAccessIterator1,
306
+ typename RandomAccessIterator2>
307
+ void stable_sort_by_key(RandomAccessIterator1 keys_first,
308
+ RandomAccessIterator1 keys_last,
309
+ RandomAccessIterator2 values_first)
310
+ {
311
+ using thrust::system::detail::generic::select_system;
312
+
313
+ typedef typename thrust::iterator_system<RandomAccessIterator1>::type System1;
314
+ typedef typename thrust::iterator_system<RandomAccessIterator2>::type System2;
315
+
316
+ System1 system1;
317
+ System2 system2;
318
+
319
+ return thrust::stable_sort_by_key(select_system(system1,system2), keys_first, keys_last, values_first);
320
+ } // end stable_sort_by_key()
321
+
322
+
323
+ template<typename RandomAccessIterator1,
324
+ typename RandomAccessIterator2,
325
+ typename StrictWeakOrdering>
326
+ void stable_sort_by_key(RandomAccessIterator1 keys_first,
327
+ RandomAccessIterator1 keys_last,
328
+ RandomAccessIterator2 values_first,
329
+ StrictWeakOrdering comp)
330
+ {
331
+ using thrust::system::detail::generic::select_system;
332
+
333
+ typedef typename thrust::iterator_system<RandomAccessIterator1>::type System1;
334
+ typedef typename thrust::iterator_system<RandomAccessIterator2>::type System2;
335
+
336
+ System1 system1;
337
+ System2 system2;
338
+
339
+ return thrust::stable_sort_by_key(select_system(system1,system2), keys_first, keys_last, values_first, comp);
340
+ } // end stable_sort_by_key()
341
+
342
+
343
+ template<typename ForwardIterator>
344
+ bool is_sorted(ForwardIterator first,
345
+ ForwardIterator last)
346
+ {
347
+ using thrust::system::detail::generic::select_system;
348
+
349
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
350
+
351
+ System system;
352
+
353
+ return thrust::is_sorted(select_system(system), first, last);
354
+ } // end is_sorted()
355
+
356
+
357
+ template<typename ForwardIterator,
358
+ typename Compare>
359
+ bool is_sorted(ForwardIterator first,
360
+ ForwardIterator last,
361
+ Compare comp)
362
+ {
363
+ using thrust::system::detail::generic::select_system;
364
+
365
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
366
+
367
+ System system;
368
+
369
+ return thrust::is_sorted(select_system(system), first, last, comp);
370
+ } // end is_sorted()
371
+
372
+
373
+ template<typename ForwardIterator>
374
+ ForwardIterator is_sorted_until(ForwardIterator first,
375
+ ForwardIterator last)
376
+ {
377
+ using thrust::system::detail::generic::select_system;
378
+
379
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
380
+
381
+ System system;
382
+
383
+ return thrust::is_sorted_until(select_system(system), first, last);
384
+ } // end is_sorted_until()
385
+
386
+
387
+ template<typename ForwardIterator,
388
+ typename Compare>
389
+ ForwardIterator is_sorted_until(ForwardIterator first,
390
+ ForwardIterator last,
391
+ Compare comp)
392
+ {
393
+ using thrust::system::detail::generic::select_system;
394
+
395
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
396
+
397
+ System system;
398
+
399
+ return thrust::is_sorted_until(select_system(system), first, last, comp);
400
+ } // end is_sorted_until()
401
+
402
+
403
+ THRUST_NAMESPACE_END
404
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/static_assert.h ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2018 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*
18
+ * (C) Copyright John Maddock 2000.
19
+ *
20
+ * Distributed under the Boost Software License, Version 1.0.
21
+ * (See accompanying NOTICE file for the complete license)
22
+ *
23
+ * For more information, see http://www.boost.org
24
+ */
25
+
26
+ #pragma once
27
+
28
+ #include <thrust/detail/config.h>
29
+ #include <thrust/detail/type_traits.h>
30
+ #include <thrust/detail/preprocessor.h>
31
+
32
+ THRUST_NAMESPACE_BEGIN
33
+
34
+ namespace detail
35
+ {
36
+
37
+ template <typename, bool x>
38
+ struct depend_on_instantiation
39
+ {
40
+ THRUST_INLINE_INTEGRAL_MEMBER_CONSTANT bool value = x;
41
+ };
42
+
43
+ #if THRUST_CPP_DIALECT >= 2011
44
+
45
+ # if THRUST_CPP_DIALECT >= 2017
46
+ # define THRUST_STATIC_ASSERT(B) static_assert(B)
47
+ # else
48
+ # define THRUST_STATIC_ASSERT(B) static_assert(B, "static assertion failed")
49
+ # endif
50
+ # define THRUST_STATIC_ASSERT_MSG(B, msg) static_assert(B, msg)
51
+
52
+ #else // Older than C++11.
53
+
54
+ // HP aCC cannot deal with missing names for template value parameters.
55
+ template <bool x> struct STATIC_ASSERTION_FAILURE;
56
+
57
+ template <> struct STATIC_ASSERTION_FAILURE<true> {};
58
+
59
+ // HP aCC cannot deal with missing names for template value parameters.
60
+ template <int x> struct static_assert_test {};
61
+
62
+ #if ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
63
+ && (THRUST_GCC_VERSION >= 40800)) \
64
+ || (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG)
65
+ // Clang and GCC 4.8+ will complain about this typedef being unused unless we
66
+ // annotate it as such.
67
+ # define THRUST_STATIC_ASSERT(B) \
68
+ typedef THRUST_NS_QUALIFIER::detail::static_assert_test< \
69
+ sizeof(THRUST_NS_QUALIFIER::detail::STATIC_ASSERTION_FAILURE<(bool)(B)>)\
70
+ > \
71
+ THRUST_PP_CAT2(thrust_static_assert_typedef_, __LINE__) \
72
+ __attribute__((unused)) \
73
+ /**/
74
+ #else
75
+ # define THRUST_STATIC_ASSERT(B) \
76
+ typedef THRUST_NS_QUALIFIER::detail::static_assert_test< \
77
+ sizeof(THRUST_NS_QUALIFIER::detail::STATIC_ASSERTION_FAILURE<(bool)(B)>)\
78
+ > \
79
+ THRUST_PP_CAT2(thrust_static_assert_typedef_, __LINE__) \
80
+ /**/
81
+ #endif
82
+
83
+ #define THRUST_STATIC_ASSERT_MSG(B, msg) THRUST_STATIC_ASSERT(B)
84
+
85
+ #endif // THRUST_CPP_DIALECT >= 2011
86
+
87
+ } // namespace detail
88
+
89
+ THRUST_NAMESPACE_END
90
+
91
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/static_map.h ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+
20
+ #include <thrust/detail/config.h>
21
+
22
+
23
+ THRUST_NAMESPACE_BEGIN
24
+ namespace detail
25
+ {
26
+ namespace static_map_detail
27
+ {
28
+
29
+
30
+ template<unsigned int k, unsigned int v>
31
+ struct key_value
32
+ {
33
+ static const unsigned int key = k;
34
+ static const unsigned int value = v;
35
+ };
36
+
37
+
38
+ template<typename Head, typename Tail = void>
39
+ struct cons
40
+ {
41
+ template<unsigned int key, unsigned int default_value>
42
+ struct static_get
43
+ {
44
+ static const unsigned int value = (key == Head::key) ? (Head::value) : Tail::template static_get<key,default_value>::value;
45
+ };
46
+
47
+
48
+ template<unsigned int default_value>
49
+ __host__ __device__
50
+ static unsigned int get(unsigned int key)
51
+ {
52
+ return (key == Head::key) ? (Head::value) : Tail::template get<default_value>(key);
53
+ }
54
+ };
55
+
56
+
57
+ template<typename Head>
58
+ struct cons<Head,void>
59
+ {
60
+ template<unsigned int key, unsigned int default_value>
61
+ struct static_get
62
+ {
63
+ static const unsigned int value = (key == Head::key) ? (Head::value) : default_value;
64
+ };
65
+
66
+ template<unsigned int default_value>
67
+ __host__ __device__
68
+ static unsigned int get(unsigned int key)
69
+ {
70
+ return (key == Head::key) ? (Head::value) : default_value;
71
+ }
72
+ };
73
+
74
+
75
+ template<unsigned int default_value,
76
+ unsigned int key0 = 0, unsigned int value0 = default_value,
77
+ unsigned int key1 = 0, unsigned int value1 = default_value,
78
+ unsigned int key2 = 0, unsigned int value2 = default_value,
79
+ unsigned int key3 = 0, unsigned int value3 = default_value,
80
+ unsigned int key4 = 0, unsigned int value4 = default_value,
81
+ unsigned int key5 = 0, unsigned int value5 = default_value,
82
+ unsigned int key6 = 0, unsigned int value6 = default_value,
83
+ unsigned int key7 = 0, unsigned int value7 = default_value>
84
+ struct static_map
85
+ {
86
+ typedef cons<
87
+ key_value<key0,value0>,
88
+ cons<
89
+ key_value<key1,value1>,
90
+ cons<
91
+ key_value<key2,value2>,
92
+ cons<
93
+ key_value<key3,value3>,
94
+ cons<
95
+ key_value<key4,value4>,
96
+ cons<
97
+ key_value<key5,value5>,
98
+ cons<
99
+ key_value<key6,value6>,
100
+ cons<
101
+ key_value<key7,value7>
102
+ >
103
+ >
104
+ >
105
+ >
106
+ >
107
+ >
108
+ >
109
+ > impl;
110
+
111
+ template<unsigned int key>
112
+ struct static_get
113
+ {
114
+ static const unsigned int value = impl::template static_get<key,default_value>::value;
115
+ };
116
+
117
+ __host__ __device__
118
+ static unsigned int get(unsigned int key)
119
+ {
120
+ return impl::template get<default_value>(key);
121
+ }
122
+ };
123
+
124
+
125
+ } // end namespace static_map_detail
126
+
127
+
128
+ template<unsigned int default_value,
129
+ unsigned int key0 = 0, unsigned int value0 = default_value,
130
+ unsigned int key1 = 0, unsigned int value1 = default_value,
131
+ unsigned int key2 = 0, unsigned int value2 = default_value,
132
+ unsigned int key3 = 0, unsigned int value3 = default_value,
133
+ unsigned int key4 = 0, unsigned int value4 = default_value,
134
+ unsigned int key5 = 0, unsigned int value5 = default_value,
135
+ unsigned int key6 = 0, unsigned int value6 = default_value,
136
+ unsigned int key7 = 0, unsigned int value7 = default_value>
137
+ struct static_map
138
+ : static_map_detail::static_map<
139
+ default_value,
140
+ key0, value0,
141
+ key1, value1,
142
+ key2, value2,
143
+ key3, value3,
144
+ key4, value4,
145
+ key5, value5,
146
+ key6, value6,
147
+ key7, value7
148
+ >
149
+ {};
150
+
151
+
152
+ template<unsigned int key, typename StaticMap>
153
+ struct static_lookup
154
+ {
155
+ static const unsigned int value = StaticMap::template static_get<key>::value;
156
+ };
157
+
158
+
159
+ template<typename StaticMap>
160
+ __host__ __device__
161
+ unsigned int lookup(unsigned int key)
162
+ {
163
+ return StaticMap::get(key);
164
+ }
165
+
166
+
167
+ } // end namespace detail
168
+ THRUST_NAMESPACE_END
169
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/tabulate.inl ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+ #include <thrust/tabulate.h>
21
+ #include <thrust/iterator/iterator_traits.h>
22
+ #include <thrust/system/detail/generic/select_system.h>
23
+ #include <thrust/system/detail/generic/tabulate.h>
24
+ #include <thrust/system/detail/adl/tabulate.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+
29
+ __thrust_exec_check_disable__
30
+ template<typename DerivedPolicy, typename ForwardIterator, typename UnaryOperation>
31
+ __host__ __device__
32
+ void tabulate(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
33
+ ForwardIterator first,
34
+ ForwardIterator last,
35
+ UnaryOperation unary_op)
36
+ {
37
+ using thrust::system::detail::generic::tabulate;
38
+ return tabulate(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, unary_op);
39
+ } // end tabulate()
40
+
41
+
42
+ template<typename ForwardIterator, typename UnaryOperation>
43
+ void tabulate(ForwardIterator first,
44
+ ForwardIterator last,
45
+ UnaryOperation unary_op)
46
+ {
47
+ using thrust::system::detail::generic::select_system;
48
+
49
+ typedef typename thrust::iterator_system<ForwardIterator>::type System;
50
+
51
+ System system;
52
+
53
+ return thrust::tabulate(select_system(system), first, last, unary_op);
54
+ } // end tabulate()
55
+
56
+
57
+ THRUST_NAMESPACE_END
58
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/temporary_array.inl ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2021 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/detail/temporary_array.h>
22
+ #include <thrust/distance.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/detail/type_traits.h>
25
+
26
+ THRUST_NAMESPACE_BEGIN
27
+
28
+ namespace detail
29
+ {
30
+ namespace temporary_array_detail
31
+ {
32
+
33
+
34
+ template<typename T> struct avoid_initialization : thrust::detail::has_trivial_copy_constructor<T> {};
35
+
36
+
37
+ template<typename T, typename TemporaryArray, typename Size>
38
+ __host__ __device__
39
+ typename thrust::detail::enable_if<
40
+ avoid_initialization<T>::value
41
+ >::type
42
+ construct_values(TemporaryArray &,
43
+ Size)
44
+ {
45
+ // avoid the overhead of initialization
46
+ } // end construct_values()
47
+
48
+
49
+ template<typename T, typename TemporaryArray, typename Size>
50
+ __host__ __device__
51
+ typename thrust::detail::disable_if<
52
+ avoid_initialization<T>::value
53
+ >::type
54
+ construct_values(TemporaryArray &a,
55
+ Size n)
56
+ {
57
+ a.default_construct_n(a.begin(), n);
58
+ } // end construct_values()
59
+
60
+
61
+ } // end temporary_array_detail
62
+
63
+
64
+ template<typename T, typename System>
65
+ __host__ __device__
66
+ temporary_array<T,System>
67
+ ::temporary_array(thrust::execution_policy<System> &system)
68
+ :super_t(alloc_type(temporary_allocator<T,System>(system)))
69
+ {
70
+ } // end temporary_array::temporary_array()
71
+
72
+
73
+ template<typename T, typename System>
74
+ __host__ __device__
75
+ temporary_array<T,System>
76
+ ::temporary_array(thrust::execution_policy<System> &system, size_type n)
77
+ :super_t(n, alloc_type(temporary_allocator<T,System>(system)))
78
+ {
79
+ temporary_array_detail::construct_values<T>(*this, n);
80
+ } // end temporary_array::temporary_array()
81
+
82
+
83
+ template<typename T, typename System>
84
+ __host__ __device__
85
+ temporary_array<T,System>
86
+ ::temporary_array(int, thrust::execution_policy<System> &system, size_type n)
87
+ :super_t(n, alloc_type(temporary_allocator<T,System>(system)))
88
+ {
89
+ // avoid initialization
90
+ ;
91
+ } // end temporary_array::temporary_array()
92
+
93
+
94
+ template<typename T, typename System>
95
+ template<typename InputIterator>
96
+ __host__ __device__
97
+ temporary_array<T,System>
98
+ ::temporary_array(thrust::execution_policy<System> &system,
99
+ InputIterator first,
100
+ size_type n)
101
+ : super_t(alloc_type(temporary_allocator<T,System>(system)))
102
+ {
103
+ super_t::allocate(n);
104
+
105
+ super_t::uninitialized_copy_n(system, first, n, super_t::begin());
106
+ } // end temporary_array::temporary_array()
107
+
108
+
109
+ template<typename T, typename System>
110
+ template<typename InputIterator, typename InputSystem>
111
+ __host__ __device__
112
+ temporary_array<T,System>
113
+ ::temporary_array(thrust::execution_policy<System> &system,
114
+ thrust::execution_policy<InputSystem> &input_system,
115
+ InputIterator first,
116
+ size_type n)
117
+ : super_t(alloc_type(temporary_allocator<T,System>(system)))
118
+ {
119
+ super_t::allocate(n);
120
+
121
+ super_t::uninitialized_copy_n(input_system, first, n, super_t::begin());
122
+ } // end temporary_array::temporary_array()
123
+
124
+
125
+ template<typename T, typename System>
126
+ template<typename InputIterator>
127
+ __host__ __device__
128
+ temporary_array<T,System>
129
+ ::temporary_array(thrust::execution_policy<System> &system,
130
+ InputIterator first,
131
+ InputIterator last)
132
+ : super_t(alloc_type(temporary_allocator<T,System>(system)))
133
+ {
134
+ super_t::allocate(thrust::distance(first,last));
135
+
136
+ super_t::uninitialized_copy(system, first, last, super_t::begin());
137
+ } // end temporary_array::temporary_array()
138
+
139
+
140
+ template<typename T, typename System>
141
+ template<typename InputSystem, typename InputIterator>
142
+ __host__ __device__
143
+ temporary_array<T,System>
144
+ ::temporary_array(thrust::execution_policy<System> &system,
145
+ thrust::execution_policy<InputSystem> &input_system,
146
+ InputIterator first,
147
+ InputIterator last)
148
+ : super_t(alloc_type(temporary_allocator<T,System>(system)))
149
+ {
150
+ super_t::allocate(thrust::distance(first,last));
151
+
152
+ super_t::uninitialized_copy(input_system, first, last, super_t::begin());
153
+ } // end temporary_array::temporary_array()
154
+
155
+
156
+ template<typename T, typename System>
157
+ __host__ __device__
158
+ temporary_array<T,System>
159
+ ::~temporary_array()
160
+ {
161
+ // note that super_t::destroy will ignore trivial destructors automatically
162
+ super_t::destroy(super_t::begin(), super_t::end());
163
+ } // end temporary_array::~temporary_array()
164
+
165
+ } // end detail
166
+
167
+ THRUST_NAMESPACE_END
168
+
videochat2/lib/python3.10/site-packages/tensorflow/include/external/local_config_cuda/cuda/cuda/include/thrust/detail/transform.inl ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 2008-2013 NVIDIA Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #pragma once
18
+
19
+ #include <thrust/detail/config.h>
20
+
21
+ #include <thrust/transform.h>
22
+ #include <thrust/iterator/iterator_traits.h>
23
+ #include <thrust/system/detail/generic/select_system.h>
24
+ #include <thrust/system/detail/generic/transform.h>
25
+ #include <thrust/system/detail/adl/transform.h>
26
+
27
+ THRUST_NAMESPACE_BEGIN
28
+
29
+
30
+ __thrust_exec_check_disable__
31
+ template<typename DerivedPolicy,
32
+ typename InputIterator,
33
+ typename OutputIterator,
34
+ typename UnaryFunction>
35
+ __host__ __device__
36
+ OutputIterator transform(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
37
+ InputIterator first, InputIterator last,
38
+ OutputIterator result,
39
+ UnaryFunction op)
40
+ {
41
+ using thrust::system::detail::generic::transform;
42
+ return transform(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, op);
43
+ } // end transform()
44
+
45
+
46
+ __thrust_exec_check_disable__
47
+ template<typename DerivedPolicy,
48
+ typename InputIterator1,
49
+ typename InputIterator2,
50
+ typename OutputIterator,
51
+ typename BinaryFunction>
52
+ __host__ __device__
53
+ OutputIterator transform(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
54
+ InputIterator1 first1, InputIterator1 last1,
55
+ InputIterator2 first2,
56
+ OutputIterator result,
57
+ BinaryFunction op)
58
+ {
59
+ using thrust::system::detail::generic::transform;
60
+ return transform(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, result, op);
61
+ } // end transform()
62
+
63
+
64
+ __thrust_exec_check_disable__
65
+ template<typename DerivedPolicy,
66
+ typename InputIterator,
67
+ typename ForwardIterator,
68
+ typename UnaryFunction,
69
+ typename Predicate>
70
+ __host__ __device__
71
+ ForwardIterator transform_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
72
+ InputIterator first, InputIterator last,
73
+ ForwardIterator result,
74
+ UnaryFunction op,
75
+ Predicate pred)
76
+ {
77
+ using thrust::system::detail::generic::transform_if;
78
+ return transform_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, result, op, pred);
79
+ } // end transform_if()
80
+
81
+
82
+ __thrust_exec_check_disable__
83
+ template<typename DerivedPolicy,
84
+ typename InputIterator1,
85
+ typename InputIterator2,
86
+ typename ForwardIterator,
87
+ typename UnaryFunction,
88
+ typename Predicate>
89
+ __host__ __device__
90
+ ForwardIterator transform_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
91
+ InputIterator1 first, InputIterator1 last,
92
+ InputIterator2 stencil,
93
+ ForwardIterator result,
94
+ UnaryFunction op,
95
+ Predicate pred)
96
+ {
97
+ using thrust::system::detail::generic::transform_if;
98
+ return transform_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first, last, stencil, result, op, pred);
99
+ } // end transform_if()
100
+
101
+
102
+ __thrust_exec_check_disable__
103
+ template<typename DerivedPolicy,
104
+ typename InputIterator1,
105
+ typename InputIterator2,
106
+ typename InputIterator3,
107
+ typename ForwardIterator,
108
+ typename BinaryFunction,
109
+ typename Predicate>
110
+ __host__ __device__
111
+ ForwardIterator transform_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
112
+ InputIterator1 first1, InputIterator1 last1,
113
+ InputIterator2 first2,
114
+ InputIterator3 stencil,
115
+ ForwardIterator result,
116
+ BinaryFunction binary_op,
117
+ Predicate pred)
118
+ {
119
+ using thrust::system::detail::generic::transform_if;
120
+ return transform_if(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), first1, last1, first2, stencil, result, binary_op, pred);
121
+ } // end transform_if()
122
+
123
+
124
+ template<typename InputIterator,
125
+ typename OutputIterator,
126
+ typename UnaryFunction>
127
+ OutputIterator transform(InputIterator first,
128
+ InputIterator last,
129
+ OutputIterator result,
130
+ UnaryFunction op)
131
+ {
132
+ using thrust::system::detail::generic::select_system;
133
+
134
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
135
+ typedef typename thrust::iterator_system<OutputIterator>::type System2;
136
+
137
+ System1 system1;
138
+ System2 system2;
139
+
140
+ return thrust::transform(select_system(system1,system2), first, last, result, op);
141
+ } // end transform()
142
+
143
+
144
+ template<typename InputIterator1,
145
+ typename InputIterator2,
146
+ typename OutputIterator,
147
+ typename BinaryFunction>
148
+ OutputIterator transform(InputIterator1 first1,
149
+ InputIterator1 last1,
150
+ InputIterator2 first2,
151
+ OutputIterator result,
152
+ BinaryFunction op)
153
+ {
154
+ using thrust::system::detail::generic::select_system;
155
+
156
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
157
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
158
+ typedef typename thrust::iterator_system<OutputIterator>::type System3;
159
+
160
+ System1 system1;
161
+ System2 system2;
162
+ System3 system3;
163
+
164
+ return thrust::transform(select_system(system1,system2,system3), first1, last1, first2, result, op);
165
+ } // end transform()
166
+
167
+
168
+ template<typename InputIterator,
169
+ typename ForwardIterator,
170
+ typename UnaryFunction,
171
+ typename Predicate>
172
+ ForwardIterator transform_if(InputIterator first,
173
+ InputIterator last,
174
+ ForwardIterator result,
175
+ UnaryFunction unary_op,
176
+ Predicate pred)
177
+ {
178
+ using thrust::system::detail::generic::select_system;
179
+
180
+ typedef typename thrust::iterator_system<InputIterator>::type System1;
181
+ typedef typename thrust::iterator_system<ForwardIterator>::type System2;
182
+
183
+ System1 system1;
184
+ System2 system2;
185
+
186
+ return thrust::transform_if(select_system(system1,system2), first, last, result, unary_op, pred);
187
+ } // end transform_if()
188
+
189
+
190
+ template<typename InputIterator1,
191
+ typename InputIterator2,
192
+ typename ForwardIterator,
193
+ typename UnaryFunction,
194
+ typename Predicate>
195
+ ForwardIterator transform_if(InputIterator1 first,
196
+ InputIterator1 last,
197
+ InputIterator2 stencil,
198
+ ForwardIterator result,
199
+ UnaryFunction unary_op,
200
+ Predicate pred)
201
+ {
202
+ using thrust::system::detail::generic::select_system;
203
+
204
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
205
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
206
+ typedef typename thrust::iterator_system<ForwardIterator>::type System3;
207
+
208
+ System1 system1;
209
+ System2 system2;
210
+ System3 system3;
211
+
212
+ return thrust::transform_if(select_system(system1,system2,system3), first, last, stencil, result, unary_op, pred);
213
+ } // end transform_if()
214
+
215
+
216
+ template<typename InputIterator1,
217
+ typename InputIterator2,
218
+ typename InputIterator3,
219
+ typename ForwardIterator,
220
+ typename BinaryFunction,
221
+ typename Predicate>
222
+ ForwardIterator transform_if(InputIterator1 first1,
223
+ InputIterator1 last1,
224
+ InputIterator2 first2,
225
+ InputIterator3 stencil,
226
+ ForwardIterator result,
227
+ BinaryFunction binary_op,
228
+ Predicate pred)
229
+ {
230
+ using thrust::system::detail::generic::select_system;
231
+
232
+ typedef typename thrust::iterator_system<InputIterator1>::type System1;
233
+ typedef typename thrust::iterator_system<InputIterator2>::type System2;
234
+ typedef typename thrust::iterator_system<InputIterator3>::type System3;
235
+ typedef typename thrust::iterator_system<ForwardIterator>::type System4;
236
+
237
+ System1 system1;
238
+ System2 system2;
239
+ System3 system3;
240
+ System4 system4;
241
+
242
+ return thrust::transform_if(select_system(system1,system2,system3,system4), first1, last1, first2, stencil, result, binary_op, pred);
243
+ } // end transform_if()
244
+
245
+
246
+ THRUST_NAMESPACE_END
247
+