ZTWHHH commited on
Commit
f0f67f9
·
verified ·
1 Parent(s): cf931d9

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. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/assign_value.h +51 -0
  2. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/copy.h +41 -0
  3. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/for_each.h +41 -0
  4. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/reduce.h +41 -0
  5. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/scan.h +41 -0
  6. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/sort.h +41 -0
  7. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/transform.h +41 -0
  8. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/copy.h +51 -0
  9. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/find.h +51 -0
  10. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/for_each.h +51 -0
  11. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/gather.h +51 -0
  12. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/iter_swap.h +51 -0
  13. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/reduce.h +51 -0
  14. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/set_operations.h +51 -0
  15. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/swap_ranges.h +51 -0
  16. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/temporary_buffer.h +51 -0
  17. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/uninitialized_fill.h +51 -0
  18. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/unique_by_key.h +51 -0
  19. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/adjacent_difference.h +76 -0
  20. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/assign_value.h +48 -0
  21. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/binary_search.h +142 -0
  22. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy.h +55 -0
  23. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy.inl +125 -0
  24. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy_backward.h +55 -0
  25. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy_if.h +77 -0
  26. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/count.h +29 -0
  27. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/equal.h +29 -0
  28. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/execution_policy.h +78 -0
  29. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/extrema.h +116 -0
  30. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/fill.h +29 -0
  31. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/for_each.h +80 -0
  32. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/gather.h +29 -0
  33. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/general_copy.h +121 -0
  34. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/generate.h +29 -0
  35. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/get_value.h +49 -0
  36. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/inner_product.h +29 -0
  37. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/insertion_sort.h +147 -0
  38. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/iter_swap.h +51 -0
  39. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/logical.h +29 -0
  40. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/malloc_and_free.h +56 -0
  41. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/merge.h +81 -0
  42. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/merge.inl +151 -0
  43. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/mismatch.h +29 -0
  44. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/partition.h +309 -0
  45. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/per_device_resource.h +29 -0
  46. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/reduce.h +70 -0
  47. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/reduce_by_key.h +104 -0
  48. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/remove.h +185 -0
  49. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/replace.h +29 -0
  50. vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/reverse.h +29 -0
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/assign_value.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the assign_value.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch assign_value
32
+
33
+ #include <thrust/system/detail/sequential/assign_value.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/assign_value.h>
40
+ # include <thrust/system/cuda/detail/assign_value.h>
41
+ # include <thrust/system/omp/detail/assign_value.h>
42
+ # include <thrust/system/tbb/detail/assign_value.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_ASSIGN_VALUE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/assign_value.h>
46
+ #include __THRUST_HOST_SYSTEM_ASSIGN_VALUE_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_ASSIGN_VALUE_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_ASSIGN_VALUE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/assign_value.h>
50
+ #include __THRUST_DEVICE_SYSTEM_ASSIGN_VALUE_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_ASSIGN_VALUE_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/copy.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // The purpose of this header is to #include the async/copy.h header of the
18
+ // sequential, host, and device systems. It should be #included in any code
19
+ // which uses ADL to dispatch async copy.
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ // #include <thrust/system/detail/sequential/async/copy.h>
34
+
35
+ // #define __THRUST_HOST_SYSTEM_ASYNC_COPY_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/copy.h>
36
+ // #include __THRUST_HOST_SYSTEM_ASYNC_COPY_HEADER
37
+ // #undef __THRUST_HOST_SYSTEM_ASYNC_COPY_HEADER
38
+
39
+ #define __THRUST_DEVICE_SYSTEM_ASYNC_COPY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/async/copy.h>
40
+ #include __THRUST_DEVICE_SYSTEM_ASYNC_COPY_HEADER
41
+ #undef __THRUST_DEVICE_SYSTEM_ASYNC_COPY_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/for_each.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // The purpose of this header is to #include the async/for_each.h header of the
18
+ // sequential, host, and device systems. It should be #included in any code
19
+ // which uses ADL to dispatch async for_each.
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ // #include <thrust/system/detail/sequential/async/for_each.h>
34
+
35
+ // #define __THRUST_HOST_SYSTEM_ASYNC_FOR_EACH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/for_each.h>
36
+ // #include __THRUST_HOST_SYSTEM_ASYNC_FOR_EACH_HEADER
37
+ // #undef __THRUST_HOST_SYSTEM_ASYNC_FOR_EACH_HEADER
38
+
39
+ #define __THRUST_DEVICE_SYSTEM_ASYNC_FOR_EACH_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/async/for_each.h>
40
+ #include __THRUST_DEVICE_SYSTEM_ASYNC_FOR_EACH_HEADER
41
+ #undef __THRUST_DEVICE_SYSTEM_ASYNC_FOR_EACH_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/reduce.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // The purpose of this header is to #include the async/reduce.h header of the
18
+ // sequential, host, and device systems. It should be #included in any code
19
+ // which uses ADL to dispatch async reduce.
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ // #include <thrust/system/detail/sequential/async/reduce.h>
34
+
35
+ // #define __THRUST_HOST_SYSTEM_ASYNC_REDUCE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/reduce.h>
36
+ // #include __THRUST_HOST_SYSTEM_ASYNC_REDUCE_HEADER
37
+ // #undef __THRUST_HOST_SYSTEM_ASYNC_REDUCE_HEADER
38
+
39
+ #define __THRUST_DEVICE_SYSTEM_ASYNC_REDUCE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/async/reduce.h>
40
+ #include __THRUST_DEVICE_SYSTEM_ASYNC_REDUCE_HEADER
41
+ #undef __THRUST_DEVICE_SYSTEM_ASYNC_REDUCE_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/scan.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // The purpose of this header is to #include the async/scan.h header of the
18
+ // sequential, host, and device systems. It should be #included in any code
19
+ // which uses ADL to dispatch async scans.
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ // #include <thrust/system/detail/sequential/async/scan.h>
34
+
35
+ // #define __THRUST_HOST_SYSTEM_ASYNC_SCAN_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/scan.h>
36
+ // #include __THRUST_HOST_SYSTEM_ASYNC_SCAN_HEADER
37
+ // #undef __THRUST_HOST_SYSTEM_ASYNC_SCAN_HEADER
38
+
39
+ #define __THRUST_DEVICE_SYSTEM_ASYNC_SCAN_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/async/scan.h>
40
+ #include __THRUST_DEVICE_SYSTEM_ASYNC_SCAN_HEADER
41
+ #undef __THRUST_DEVICE_SYSTEM_ASYNC_SCAN_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/sort.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // The purpose of this header is to #include the async/sort.h header of the
18
+ // sequential, host, and device systems. It should be #included in any code
19
+ // which uses ADL to dispatch async sort.
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ // #include <thrust/system/detail/sequential/async/sort.h>
34
+
35
+ // #define __THRUST_HOST_SYSTEM_ASYNC_SORT_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/sort.h>
36
+ // #include __THRUST_HOST_SYSTEM_ASYNC_SORT_HEADER
37
+ // #undef __THRUST_HOST_SYSTEM_ASYNC_SORT_HEADER
38
+
39
+ #define __THRUST_DEVICE_SYSTEM_ASYNC_SORT_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/async/sort.h>
40
+ #include __THRUST_DEVICE_SYSTEM_ASYNC_SORT_HEADER
41
+ #undef __THRUST_DEVICE_SYSTEM_ASYNC_SORT_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/async/transform.h ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 transform 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
+ // The purpose of this header is to #include the async/transform.h header of the
18
+ // sequential, host, and device systems. It should be #included in any code
19
+ // which uses ADL to dispatch async transform.
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ // #include <thrust/system/detail/sequential/async/transform.h>
34
+
35
+ // #define __THRUST_HOST_SYSTEM_ASYNC_TRANSFORM_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/async/transform.h>
36
+ // #include __THRUST_HOST_SYSTEM_ASYNC_TRANSFORM_HEADER
37
+ // #undef __THRUST_HOST_SYSTEM_ASYNC_TRANSFORM_HEADER
38
+
39
+ #define __THRUST_DEVICE_SYSTEM_ASYNC_TRANSFORM_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/async/transform.h>
40
+ #include __THRUST_DEVICE_SYSTEM_ASYNC_TRANSFORM_HEADER
41
+ #undef __THRUST_DEVICE_SYSTEM_ASYNC_TRANSFORM_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/copy.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the copy.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch copy
32
+
33
+ #include <thrust/system/detail/sequential/copy.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/copy.h>
40
+ # include <thrust/system/cuda/detail/copy.h>
41
+ # include <thrust/system/omp/detail/copy.h>
42
+ # include <thrust/system/tbb/detail/copy.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_COPY_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/copy.h>
46
+ #include __THRUST_HOST_SYSTEM_COPY_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_COPY_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_COPY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/copy.h>
50
+ #include __THRUST_DEVICE_SYSTEM_COPY_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_COPY_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/find.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 fill 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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the find.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch find
32
+
33
+ #include <thrust/system/detail/sequential/find.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/find.h>
40
+ # include <thrust/system/cuda/detail/find.h>
41
+ # include <thrust/system/omp/detail/find.h>
42
+ # include <thrust/system/tbb/detail/find.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_FIND_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/find.h>
46
+ #include __THRUST_HOST_SYSTEM_FIND_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_FIND_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_FIND_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/find.h>
50
+ #include __THRUST_DEVICE_SYSTEM_FIND_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_FIND_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/for_each.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the for_each.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch for_each
32
+
33
+ #include <thrust/system/detail/sequential/for_each.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/for_each.h>
40
+ # include <thrust/system/cuda/detail/for_each.h>
41
+ # include <thrust/system/omp/detail/for_each.h>
42
+ # include <thrust/system/tbb/detail/for_each.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_FOR_EACH_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/for_each.h>
46
+ #include __THRUST_HOST_SYSTEM_FOR_EACH_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_FOR_EACH_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/for_each.h>
50
+ #include __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_FOR_EACH_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/gather.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 fill 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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the gather.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch gather
32
+
33
+ #include <thrust/system/detail/sequential/gather.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/gather.h>
40
+ # include <thrust/system/cuda/detail/gather.h>
41
+ # include <thrust/system/omp/detail/gather.h>
42
+ # include <thrust/system/tbb/detail/gather.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_GATHER_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/gather.h>
46
+ #include __THRUST_HOST_SYSTEM_GATHER_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_GATHER_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_GATHER_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/gather.h>
50
+ #include __THRUST_DEVICE_SYSTEM_GATHER_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_GATHER_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/iter_swap.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the iter_swap.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch iter_swap
32
+
33
+ #include <thrust/system/detail/sequential/iter_swap.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/iter_swap.h>
40
+ # include <thrust/system/cuda/detail/iter_swap.h>
41
+ # include <thrust/system/omp/detail/iter_swap.h>
42
+ # include <thrust/system/tbb/detail/iter_swap.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_ITER_SWAP_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/iter_swap.h>
46
+ #include __THRUST_HOST_SYSTEM_ITER_SWAP_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_ITER_SWAP_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_ITER_SWAP_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/iter_swap.h>
50
+ #include __THRUST_DEVICE_SYSTEM_ITER_SWAP_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_ITER_SWAP_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/reduce.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the reduce.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch reduce
32
+
33
+ #include <thrust/system/detail/sequential/reduce.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/reduce.h>
40
+ # include <thrust/system/cuda/detail/reduce.h>
41
+ # include <thrust/system/omp/detail/reduce.h>
42
+ # include <thrust/system/tbb/detail/reduce.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_REDUCE_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/reduce.h>
46
+ #include __THRUST_HOST_SYSTEM_REDUCE_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_REDUCE_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_REDUCE_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/reduce.h>
50
+ #include __THRUST_DEVICE_SYSTEM_REDUCE_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_REDUCE_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/set_operations.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 fill 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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the set_operations.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch set_operations
32
+
33
+ #include <thrust/system/detail/sequential/set_operations.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/set_operations.h>
40
+ # include <thrust/system/cuda/detail/set_operations.h>
41
+ # include <thrust/system/omp/detail/set_operations.h>
42
+ # include <thrust/system/tbb/detail/set_operations.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_SET_OPERATIONS_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/set_operations.h>
46
+ #include __THRUST_HOST_SYSTEM_SET_OPERATIONS_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_SET_OPERATIONS_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_SET_OPERATIONS_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/set_operations.h>
50
+ #include __THRUST_DEVICE_SYSTEM_SET_OPERATIONS_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_SET_OPERATIONS_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/swap_ranges.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 fill 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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the swap_ranges.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch swap_ranges
32
+
33
+ #include <thrust/system/detail/sequential/swap_ranges.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/swap_ranges.h>
40
+ # include <thrust/system/cuda/detail/swap_ranges.h>
41
+ # include <thrust/system/omp/detail/swap_ranges.h>
42
+ # include <thrust/system/tbb/detail/swap_ranges.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_SWAP_RANGES_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/swap_ranges.h>
46
+ #include __THRUST_HOST_SYSTEM_SWAP_RANGES_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_SWAP_RANGES_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_SWAP_RANGES_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/swap_ranges.h>
50
+ #include __THRUST_DEVICE_SYSTEM_SWAP_RANGES_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_SWAP_RANGES_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/temporary_buffer.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the temporary_buffer.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch get_temporary_buffer or return_temporary_buffer
32
+
33
+ #include <thrust/system/detail/sequential/temporary_buffer.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/temporary_buffer.h>
40
+ # include <thrust/system/cuda/detail/temporary_buffer.h>
41
+ # include <thrust/system/omp/detail/temporary_buffer.h>
42
+ # include <thrust/system/tbb/detail/temporary_buffer.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_TEMPORARY_BUFFER_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/temporary_buffer.h>
46
+ #include __THRUST_HOST_SYSTEM_TEMPORARY_BUFFER_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_TEMPORARY_BUFFER_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_TEMPORARY_BUFFER_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/temporary_buffer.h>
50
+ #include __THRUST_DEVICE_SYSTEM_TEMPORARY_BUFFER_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_TEMPORARY_BUFFER_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/uninitialized_fill.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 fill 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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the uninitialized_fill.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch uninitialized_fill
32
+
33
+ #include <thrust/system/detail/sequential/uninitialized_fill.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/uninitialized_fill.h>
40
+ # include <thrust/system/cuda/detail/uninitialized_fill.h>
41
+ # include <thrust/system/omp/detail/uninitialized_fill.h>
42
+ # include <thrust/system/tbb/detail/uninitialized_fill.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_UNINITIALIZED_FILL_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/uninitialized_fill.h>
46
+ #include __THRUST_HOST_SYSTEM_UNINITIALIZED_FILL_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_UNINITIALIZED_FILL_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_UNINITIALIZED_FILL_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/uninitialized_fill.h>
50
+ #include __THRUST_DEVICE_SYSTEM_UNINITIALIZED_FILL_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_UNINITIALIZED_FILL_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/adl/unique_by_key.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 fill 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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // the purpose of this header is to #include the unique_by_key.h header
30
+ // of the sequential, host, and device systems. It should be #included in any
31
+ // code which uses adl to dispatch unique_by_key
32
+
33
+ #include <thrust/system/detail/sequential/unique_by_key.h>
34
+
35
+ // SCons can't see through the #defines below to figure out what this header
36
+ // includes, so we fake it out by specifying all possible files we might end up
37
+ // including inside an #if 0.
38
+ #if 0
39
+ # include <thrust/system/cpp/detail/unique_by_key.h>
40
+ # include <thrust/system/cuda/detail/unique_by_key.h>
41
+ # include <thrust/system/omp/detail/unique_by_key.h>
42
+ # include <thrust/system/tbb/detail/unique_by_key.h>
43
+ #endif
44
+
45
+ #define __THRUST_HOST_SYSTEM_UNIQUE_BY_KEY_HEADER <__THRUST_HOST_SYSTEM_ROOT/detail/unique_by_key.h>
46
+ #include __THRUST_HOST_SYSTEM_UNIQUE_BY_KEY_HEADER
47
+ #undef __THRUST_HOST_SYSTEM_UNIQUE_BY_KEY_HEADER
48
+
49
+ #define __THRUST_DEVICE_SYSTEM_UNIQUE_BY_KEY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/detail/unique_by_key.h>
50
+ #include __THRUST_DEVICE_SYSTEM_UNIQUE_BY_KEY_HEADER
51
+ #undef __THRUST_DEVICE_SYSTEM_UNIQUE_BY_KEY_HEADER
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/adjacent_difference.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
+ /*! \file adjacent_difference.h
18
+ * \brief Sequential implementation of adjacent_difference.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/iterator/iterator_traits.h>
33
+ #include <thrust/system/detail/sequential/execution_policy.h>
34
+
35
+ THRUST_NAMESPACE_BEGIN
36
+ namespace system
37
+ {
38
+ namespace detail
39
+ {
40
+ namespace sequential
41
+ {
42
+
43
+ _CCCL_EXEC_CHECK_DISABLE
44
+ template <typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename BinaryFunction>
45
+ _CCCL_HOST_DEVICE OutputIterator adjacent_difference(
46
+ sequential::execution_policy<DerivedPolicy>&,
47
+ InputIterator first,
48
+ InputIterator last,
49
+ OutputIterator result,
50
+ BinaryFunction binary_op)
51
+ {
52
+ using InputType = typename thrust::iterator_traits<InputIterator>::value_type;
53
+
54
+ if (first == last)
55
+ {
56
+ return result;
57
+ }
58
+
59
+ InputType curr = *first;
60
+
61
+ *result = curr;
62
+
63
+ while (++first != last)
64
+ {
65
+ InputType next = *first;
66
+ *(++result) = binary_op(next, curr);
67
+ curr = next;
68
+ }
69
+
70
+ return ++result;
71
+ }
72
+
73
+ } // end namespace sequential
74
+ } // end namespace detail
75
+ } // end namespace system
76
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/assign_value.h ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/raw_pointer_cast.h>
29
+ #include <thrust/system/detail/sequential/execution_policy.h>
30
+
31
+ THRUST_NAMESPACE_BEGIN
32
+ namespace system
33
+ {
34
+ namespace detail
35
+ {
36
+ namespace sequential
37
+ {
38
+
39
+ template <typename DerivedPolicy, typename Pointer1, typename Pointer2>
40
+ _CCCL_HOST_DEVICE void assign_value(sequential::execution_policy<DerivedPolicy>&, Pointer1 dst, Pointer2 src)
41
+ {
42
+ *thrust::raw_pointer_cast(dst) = *thrust::raw_pointer_cast(src);
43
+ } // end assign_value()
44
+
45
+ } // namespace sequential
46
+ } // namespace detail
47
+ } // namespace system
48
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/binary_search.h ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file binary_search.h
18
+ * \brief Sequential implementation of binary search algorithms.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+
33
+ #include <thrust/advance.h>
34
+ #include <thrust/detail/function.h>
35
+ #include <thrust/distance.h>
36
+ #include <thrust/iterator/iterator_traits.h>
37
+
38
+ THRUST_NAMESPACE_BEGIN
39
+ namespace system
40
+ {
41
+ namespace detail
42
+ {
43
+ namespace sequential
44
+ {
45
+
46
+ _CCCL_EXEC_CHECK_DISABLE
47
+ template <typename DerivedPolicy, typename ForwardIterator, typename T, typename StrictWeakOrdering>
48
+ _CCCL_HOST_DEVICE ForwardIterator lower_bound(
49
+ sequential::execution_policy<DerivedPolicy>&,
50
+ ForwardIterator first,
51
+ ForwardIterator last,
52
+ const T& val,
53
+ StrictWeakOrdering comp)
54
+ {
55
+ // wrap comp
56
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
57
+
58
+ using difference_type = typename thrust::iterator_difference<ForwardIterator>::type;
59
+
60
+ difference_type len = thrust::distance(first, last);
61
+
62
+ while (len > 0)
63
+ {
64
+ difference_type half = len >> 1;
65
+ ForwardIterator middle = first;
66
+
67
+ thrust::advance(middle, half);
68
+
69
+ if (wrapped_comp(*middle, val))
70
+ {
71
+ first = middle;
72
+ ++first;
73
+ len = len - half - 1;
74
+ }
75
+ else
76
+ {
77
+ len = half;
78
+ }
79
+ }
80
+
81
+ return first;
82
+ }
83
+
84
+ _CCCL_EXEC_CHECK_DISABLE
85
+ template <typename DerivedPolicy, typename ForwardIterator, typename T, typename StrictWeakOrdering>
86
+ _CCCL_HOST_DEVICE ForwardIterator upper_bound(
87
+ sequential::execution_policy<DerivedPolicy>&,
88
+ ForwardIterator first,
89
+ ForwardIterator last,
90
+ const T& val,
91
+ StrictWeakOrdering comp)
92
+ {
93
+ // wrap comp
94
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
95
+
96
+ using difference_type = typename thrust::iterator_difference<ForwardIterator>::type;
97
+
98
+ difference_type len = thrust::distance(first, last);
99
+
100
+ while (len > 0)
101
+ {
102
+ difference_type half = len >> 1;
103
+ ForwardIterator middle = first;
104
+
105
+ thrust::advance(middle, half);
106
+
107
+ if (wrapped_comp(val, *middle))
108
+ {
109
+ len = half;
110
+ }
111
+ else
112
+ {
113
+ first = middle;
114
+ ++first;
115
+ len = len - half - 1;
116
+ }
117
+ }
118
+
119
+ return first;
120
+ }
121
+
122
+ _CCCL_EXEC_CHECK_DISABLE
123
+ template <typename DerivedPolicy, typename ForwardIterator, typename T, typename StrictWeakOrdering>
124
+ _CCCL_HOST_DEVICE bool binary_search(
125
+ sequential::execution_policy<DerivedPolicy>& exec,
126
+ ForwardIterator first,
127
+ ForwardIterator last,
128
+ const T& val,
129
+ StrictWeakOrdering comp)
130
+ {
131
+ ForwardIterator iter = sequential::lower_bound(exec, first, last, val, comp);
132
+
133
+ // wrap comp
134
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
135
+
136
+ return iter != last && !wrapped_comp(val, *iter);
137
+ }
138
+
139
+ } // end namespace sequential
140
+ } // end namespace detail
141
+ } // end namespace system
142
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy.h ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file copy.h
18
+ * \brief Sequential implementations of copy algorithms.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/system/detail/sequential/execution_policy.h>
33
+
34
+ THRUST_NAMESPACE_BEGIN
35
+ namespace system
36
+ {
37
+ namespace detail
38
+ {
39
+ namespace sequential
40
+ {
41
+
42
+ template <typename DerivedPolicy, typename InputIterator, typename OutputIterator>
43
+ _CCCL_HOST_DEVICE OutputIterator
44
+ copy(sequential::execution_policy<DerivedPolicy>& exec, InputIterator first, InputIterator last, OutputIterator result);
45
+
46
+ template <typename DerivedPolicy, typename InputIterator, typename Size, typename OutputIterator>
47
+ _CCCL_HOST_DEVICE OutputIterator
48
+ copy_n(sequential::execution_policy<DerivedPolicy>& exec, InputIterator first, Size n, OutputIterator result);
49
+
50
+ } // end namespace sequential
51
+ } // end namespace detail
52
+ } // end namespace system
53
+ THRUST_NAMESPACE_END
54
+
55
+ #include <thrust/system/detail/sequential/copy.inl>
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy.inl ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/type_traits.h>
29
+ #include <thrust/detail/type_traits/pointer_traits.h>
30
+ #include <thrust/iterator/iterator_traits.h>
31
+ #include <thrust/system/detail/sequential/copy.h>
32
+ #include <thrust/system/detail/sequential/general_copy.h>
33
+ #include <thrust/system/detail/sequential/trivial_copy.h>
34
+ #include <thrust/type_traits/is_trivially_relocatable.h>
35
+
36
+ THRUST_NAMESPACE_BEGIN
37
+ namespace system
38
+ {
39
+ namespace detail
40
+ {
41
+ namespace sequential
42
+ {
43
+ namespace copy_detail
44
+ {
45
+
46
+ // returns the raw pointer associated with a Pointer-like thing
47
+ template <typename Pointer>
48
+ _CCCL_HOST_DEVICE typename thrust::detail::pointer_traits<Pointer>::raw_pointer get(Pointer ptr)
49
+ {
50
+ return thrust::detail::pointer_traits<Pointer>::get(ptr);
51
+ }
52
+
53
+ _CCCL_EXEC_CHECK_DISABLE
54
+ template <typename InputIterator, typename OutputIterator>
55
+ _CCCL_HOST_DEVICE OutputIterator
56
+ copy(InputIterator first,
57
+ InputIterator last,
58
+ OutputIterator result,
59
+ thrust::detail::true_type) // is_indirectly_trivially_relocatable_to
60
+ {
61
+ using Size = typename thrust::iterator_difference<InputIterator>::type;
62
+
63
+ const Size n = last - first;
64
+ thrust::system::detail::sequential::trivial_copy_n(get(&*first), n, get(&*result));
65
+ return result + n;
66
+ } // end copy()
67
+
68
+ _CCCL_EXEC_CHECK_DISABLE
69
+ template <typename InputIterator, typename OutputIterator>
70
+ _CCCL_HOST_DEVICE OutputIterator
71
+ copy(InputIterator first,
72
+ InputIterator last,
73
+ OutputIterator result,
74
+ thrust::detail::false_type) // is_indirectly_trivially_relocatable_to
75
+ {
76
+ return thrust::system::detail::sequential::general_copy(first, last, result);
77
+ } // end copy()
78
+
79
+ _CCCL_EXEC_CHECK_DISABLE
80
+ template <typename InputIterator, typename Size, typename OutputIterator>
81
+ _CCCL_HOST_DEVICE OutputIterator copy_n(
82
+ InputIterator first,
83
+ Size n,
84
+ OutputIterator result,
85
+ thrust::detail::true_type) // is_indirectly_trivially_relocatable_to
86
+ {
87
+ thrust::system::detail::sequential::trivial_copy_n(get(&*first), n, get(&*result));
88
+ return result + n;
89
+ } // end copy_n()
90
+
91
+ _CCCL_EXEC_CHECK_DISABLE
92
+ template <typename InputIterator, typename Size, typename OutputIterator>
93
+ _CCCL_HOST_DEVICE OutputIterator copy_n(
94
+ InputIterator first,
95
+ Size n,
96
+ OutputIterator result,
97
+ thrust::detail::false_type) // is_indirectly_trivially_relocatable_to
98
+ {
99
+ return thrust::system::detail::sequential::general_copy_n(first, n, result);
100
+ } // end copy_n()
101
+
102
+ } // end namespace copy_detail
103
+
104
+ _CCCL_EXEC_CHECK_DISABLE
105
+ template <typename DerivedPolicy, typename InputIterator, typename OutputIterator>
106
+ _CCCL_HOST_DEVICE OutputIterator
107
+ copy(sequential::execution_policy<DerivedPolicy>&, InputIterator first, InputIterator last, OutputIterator result)
108
+ {
109
+ return thrust::system::detail::sequential::copy_detail::copy(
110
+ first, last, result, typename thrust::is_indirectly_trivially_relocatable_to<InputIterator, OutputIterator>::type());
111
+ } // end copy()
112
+
113
+ _CCCL_EXEC_CHECK_DISABLE
114
+ template <typename DerivedPolicy, typename InputIterator, typename Size, typename OutputIterator>
115
+ _CCCL_HOST_DEVICE OutputIterator
116
+ copy_n(sequential::execution_policy<DerivedPolicy>&, InputIterator first, Size n, OutputIterator result)
117
+ {
118
+ return thrust::system::detail::sequential::copy_detail::copy_n(
119
+ first, n, result, typename thrust::is_indirectly_trivially_relocatable_to<InputIterator, OutputIterator>::type());
120
+ } // end copy_n()
121
+
122
+ } // end namespace sequential
123
+ } // end namespace detail
124
+ } // end namespace system
125
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy_backward.h ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ THRUST_NAMESPACE_BEGIN
30
+ namespace system
31
+ {
32
+ namespace detail
33
+ {
34
+ namespace sequential
35
+ {
36
+
37
+ _CCCL_EXEC_CHECK_DISABLE
38
+ template <typename BidirectionalIterator1, typename BidirectionalIterator2>
39
+ _CCCL_HOST_DEVICE BidirectionalIterator2
40
+ copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result)
41
+ {
42
+ while (first != last)
43
+ {
44
+ --last;
45
+ --result;
46
+ *result = *last;
47
+ }
48
+
49
+ return result;
50
+ }
51
+
52
+ } // end namespace sequential
53
+ } // end namespace detail
54
+ } // end namespace system
55
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/copy_if.h 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
+ /*! \file copy_if.h
18
+ * \brief Sequential implementation of copy_if.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/function.h>
33
+ #include <thrust/system/detail/sequential/execution_policy.h>
34
+
35
+ THRUST_NAMESPACE_BEGIN
36
+ namespace system
37
+ {
38
+ namespace detail
39
+ {
40
+ namespace sequential
41
+ {
42
+
43
+ _CCCL_EXEC_CHECK_DISABLE
44
+ template <typename DerivedPolicy,
45
+ typename InputIterator1,
46
+ typename InputIterator2,
47
+ typename OutputIterator,
48
+ typename Predicate>
49
+ _CCCL_HOST_DEVICE OutputIterator copy_if(
50
+ sequential::execution_policy<DerivedPolicy>&,
51
+ InputIterator1 first,
52
+ InputIterator1 last,
53
+ InputIterator2 stencil,
54
+ OutputIterator result,
55
+ Predicate pred)
56
+ {
57
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
58
+
59
+ while (first != last)
60
+ {
61
+ if (wrapped_pred(*stencil))
62
+ {
63
+ *result = *first;
64
+ ++result;
65
+ } // end if
66
+
67
+ ++first;
68
+ ++stencil;
69
+ } // end while
70
+
71
+ return result;
72
+ } // end copy_if()
73
+
74
+ } // end namespace sequential
75
+ } // end namespace detail
76
+ } // end namespace system
77
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/count.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special count functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/equal.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special equal functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/execution_policy.h ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/execution_policy.h>
29
+
30
+ THRUST_NAMESPACE_BEGIN
31
+ namespace system
32
+ {
33
+ namespace detail
34
+ {
35
+ namespace sequential
36
+ {
37
+
38
+ // this awkward sequence of definitions arises
39
+ // from the desire both for tag to derive
40
+ // from execution_policy and for execution_policy
41
+ // to convert to tag (when execution_policy is not
42
+ // an ancestor of tag)
43
+
44
+ // forward declaration of tag
45
+ struct tag;
46
+
47
+ // forward declaration of execution_policy
48
+ template <typename>
49
+ struct execution_policy;
50
+
51
+ // specialize execution_policy for tag
52
+ template <>
53
+ struct execution_policy<tag> : thrust::execution_policy<tag>
54
+ {};
55
+
56
+ // tag's definition comes before the generic definition of execution_policy
57
+ struct tag : execution_policy<tag>
58
+ {
59
+ _CCCL_HOST_DEVICE constexpr tag() {}
60
+ };
61
+
62
+ // allow conversion to tag when it is not a successor
63
+ template <typename Derived>
64
+ struct execution_policy : thrust::execution_policy<Derived>
65
+ {
66
+ // allow conversion to tag
67
+ inline operator tag() const
68
+ {
69
+ return tag();
70
+ }
71
+ };
72
+
73
+ _CCCL_GLOBAL_CONSTANT tag seq;
74
+
75
+ } // namespace sequential
76
+ } // namespace detail
77
+ } // namespace system
78
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/extrema.h ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file extrema.h
18
+ * \brief Sequential implementations of extrema functions.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/function.h>
33
+ #include <thrust/pair.h>
34
+ #include <thrust/system/detail/sequential/execution_policy.h>
35
+
36
+ THRUST_NAMESPACE_BEGIN
37
+ namespace system
38
+ {
39
+ namespace detail
40
+ {
41
+ namespace sequential
42
+ {
43
+
44
+ _CCCL_EXEC_CHECK_DISABLE
45
+ template <typename DerivedPolicy, typename ForwardIterator, typename BinaryPredicate>
46
+ _CCCL_HOST_DEVICE ForwardIterator min_element(
47
+ sequential::execution_policy<DerivedPolicy>&, ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
48
+ {
49
+ // wrap comp
50
+ thrust::detail::wrapped_function<BinaryPredicate, bool> wrapped_comp{comp};
51
+
52
+ ForwardIterator imin = first;
53
+
54
+ for (; first != last; ++first)
55
+ {
56
+ if (wrapped_comp(*first, *imin))
57
+ {
58
+ imin = first;
59
+ }
60
+ }
61
+
62
+ return imin;
63
+ }
64
+
65
+ _CCCL_EXEC_CHECK_DISABLE
66
+ template <typename DerivedPolicy, typename ForwardIterator, typename BinaryPredicate>
67
+ _CCCL_HOST_DEVICE ForwardIterator max_element(
68
+ sequential::execution_policy<DerivedPolicy>&, ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
69
+ {
70
+ // wrap comp
71
+ thrust::detail::wrapped_function<BinaryPredicate, bool> wrapped_comp{comp};
72
+
73
+ ForwardIterator imax = first;
74
+
75
+ for (; first != last; ++first)
76
+ {
77
+ if (wrapped_comp(*imax, *first))
78
+ {
79
+ imax = first;
80
+ }
81
+ }
82
+
83
+ return imax;
84
+ }
85
+
86
+ _CCCL_EXEC_CHECK_DISABLE
87
+ template <typename DerivedPolicy, typename ForwardIterator, typename BinaryPredicate>
88
+ _CCCL_HOST_DEVICE thrust::pair<ForwardIterator, ForwardIterator> minmax_element(
89
+ sequential::execution_policy<DerivedPolicy>&, ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
90
+ {
91
+ // wrap comp
92
+ thrust::detail::wrapped_function<BinaryPredicate, bool> wrapped_comp{comp};
93
+
94
+ ForwardIterator imin = first;
95
+ ForwardIterator imax = first;
96
+
97
+ for (; first != last; ++first)
98
+ {
99
+ if (wrapped_comp(*first, *imin))
100
+ {
101
+ imin = first;
102
+ }
103
+
104
+ if (wrapped_comp(*imax, *first))
105
+ {
106
+ imax = first;
107
+ }
108
+ }
109
+
110
+ return thrust::make_pair(imin, imax);
111
+ }
112
+
113
+ } // end namespace sequential
114
+ } // end namespace detail
115
+ } // end namespace system
116
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/fill.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special fill functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/for_each.h 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
+ /*! \file for_each.h
18
+ * \brief Sequential implementations of for_each functions.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/function.h>
33
+ #include <thrust/system/detail/sequential/execution_policy.h>
34
+
35
+ THRUST_NAMESPACE_BEGIN
36
+ namespace system
37
+ {
38
+ namespace detail
39
+ {
40
+ namespace sequential
41
+ {
42
+
43
+ _CCCL_EXEC_CHECK_DISABLE
44
+ template <typename DerivedPolicy, typename InputIterator, typename UnaryFunction>
45
+ _CCCL_HOST_DEVICE InputIterator
46
+ for_each(sequential::execution_policy<DerivedPolicy>&, InputIterator first, InputIterator last, UnaryFunction f)
47
+ {
48
+ // wrap f
49
+ thrust::detail::wrapped_function<UnaryFunction, void> wrapped_f{f};
50
+
51
+ for (; first != last; ++first)
52
+ {
53
+ wrapped_f(*first);
54
+ }
55
+
56
+ return first;
57
+ } // end for_each()
58
+
59
+ template <typename DerivedPolicy, typename InputIterator, typename Size, typename UnaryFunction>
60
+ _CCCL_HOST_DEVICE InputIterator
61
+ for_each_n(sequential::execution_policy<DerivedPolicy>&, InputIterator first, Size n, UnaryFunction f)
62
+ {
63
+ // wrap f
64
+ thrust::detail::wrapped_function<UnaryFunction, void> wrapped_f{f};
65
+
66
+ for (Size i = 0; i != n; i++)
67
+ {
68
+ // we can dereference an OutputIterator if f does not
69
+ // try to use the reference for anything besides assignment
70
+ wrapped_f(*first);
71
+ ++first;
72
+ }
73
+
74
+ return first;
75
+ } // end for_each_n()
76
+
77
+ } // end namespace sequential
78
+ } // end namespace detail
79
+ } // end namespace system
80
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/gather.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special gather functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/general_copy.h ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file general_copy.h
18
+ * \brief Sequential copy algorithms for general iterators.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/raw_reference_cast.h>
33
+ #include <thrust/detail/type_traits.h>
34
+
35
+ THRUST_NAMESPACE_BEGIN
36
+ namespace system
37
+ {
38
+ namespace detail
39
+ {
40
+ namespace sequential
41
+ {
42
+ namespace general_copy_detail
43
+ {
44
+
45
+ template <typename T1, typename T2>
46
+ struct lazy_is_assignable : ::cuda::std::is_assignable<typename T1::type, typename T2::type>
47
+ {};
48
+
49
+ // sometimes OutputIterator's reference type is reported as void
50
+ // in that case, just assume that we're able to assign to it OK
51
+ template <typename InputIterator, typename OutputIterator>
52
+ struct reference_is_assignable
53
+ : thrust::detail::eval_if<
54
+ ::cuda::std::is_same<typename thrust::iterator_reference<OutputIterator>::type, void>::value,
55
+ thrust::detail::true_type,
56
+ lazy_is_assignable<thrust::iterator_reference<OutputIterator>, thrust::iterator_reference<InputIterator>>>::type
57
+ {};
58
+
59
+ // introduce an iterator assign helper to deal with assignments from
60
+ // a wrapped reference
61
+
62
+ _CCCL_EXEC_CHECK_DISABLE
63
+ template <typename OutputIterator, typename InputIterator>
64
+ inline _CCCL_HOST_DEVICE ::cuda::std::enable_if_t<reference_is_assignable<InputIterator, OutputIterator>::value>
65
+ iter_assign(OutputIterator dst, InputIterator src)
66
+ {
67
+ *dst = *src;
68
+ }
69
+
70
+ _CCCL_EXEC_CHECK_DISABLE
71
+ template <typename OutputIterator, typename InputIterator>
72
+ inline _CCCL_HOST_DEVICE
73
+ typename thrust::detail::disable_if<reference_is_assignable<InputIterator, OutputIterator>::value>::type
74
+ iter_assign(OutputIterator dst, InputIterator src)
75
+ {
76
+ using value_type = typename thrust::iterator_value<InputIterator>::type;
77
+
78
+ // insert a temporary and hope for the best
79
+ *dst = static_cast<value_type>(*src);
80
+ }
81
+
82
+ } // namespace general_copy_detail
83
+
84
+ _CCCL_EXEC_CHECK_DISABLE
85
+ template <typename InputIterator, typename OutputIterator>
86
+ _CCCL_HOST_DEVICE OutputIterator general_copy(InputIterator first, InputIterator last, OutputIterator result)
87
+ {
88
+ for (; first != last; ++first, (void) ++result)
89
+ {
90
+ // gcc 4.2 crashes while instantiating iter_assign
91
+ #if _CCCL_COMPILER(GCC, <, 4, 3)
92
+ *result = *first;
93
+ #else
94
+ general_copy_detail::iter_assign(result, first);
95
+ #endif
96
+ }
97
+
98
+ return result;
99
+ } // end general_copy()
100
+
101
+ _CCCL_EXEC_CHECK_DISABLE
102
+ template <typename InputIterator, typename Size, typename OutputIterator>
103
+ _CCCL_HOST_DEVICE OutputIterator general_copy_n(InputIterator first, Size n, OutputIterator result)
104
+ {
105
+ for (; n > Size(0); ++first, (void) ++result, (void) --n)
106
+ {
107
+ // gcc 4.2 crashes while instantiating iter_assign
108
+ #if _CCCL_COMPILER(GCC, <, 4, 3)
109
+ *result = *first;
110
+ #else
111
+ general_copy_detail::iter_assign(result, first);
112
+ #endif
113
+ }
114
+
115
+ return result;
116
+ } // end general_copy_n()
117
+
118
+ } // end namespace sequential
119
+ } // end namespace detail
120
+ } // end namespace system
121
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/generate.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special generate functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/get_value.h ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/raw_pointer_cast.h>
29
+ #include <thrust/system/detail/sequential/execution_policy.h>
30
+
31
+ THRUST_NAMESPACE_BEGIN
32
+ namespace system
33
+ {
34
+ namespace detail
35
+ {
36
+ namespace sequential
37
+ {
38
+
39
+ template <typename DerivedPolicy, typename Pointer>
40
+ _CCCL_HOST_DEVICE typename thrust::iterator_value<Pointer>::type
41
+ get_value(sequential::execution_policy<DerivedPolicy>&, Pointer ptr)
42
+ {
43
+ return *thrust::raw_pointer_cast(ptr);
44
+ } // end get_value()
45
+
46
+ } // namespace sequential
47
+ } // namespace detail
48
+ } // namespace system
49
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/inner_product.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special inner_product functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/insertion_sort.h ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ #include <thrust/detail/function.h>
30
+ #include <thrust/iterator/iterator_traits.h>
31
+ #include <thrust/system/detail/sequential/copy_backward.h>
32
+
33
+ THRUST_NAMESPACE_BEGIN
34
+ namespace system
35
+ {
36
+ namespace detail
37
+ {
38
+ namespace sequential
39
+ {
40
+
41
+ _CCCL_EXEC_CHECK_DISABLE
42
+ template <typename RandomAccessIterator, typename StrictWeakOrdering>
43
+ _CCCL_HOST_DEVICE void insertion_sort(RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp)
44
+ {
45
+ using value_type = typename thrust::iterator_value<RandomAccessIterator>::type;
46
+
47
+ if (first == last)
48
+ {
49
+ return;
50
+ }
51
+
52
+ // wrap comp
53
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
54
+
55
+ for (RandomAccessIterator i = first + 1; i != last; ++i)
56
+ {
57
+ value_type tmp = *i;
58
+
59
+ if (wrapped_comp(tmp, *first))
60
+ {
61
+ // tmp is the smallest value encountered so far
62
+ sequential::copy_backward(first, i, i + 1);
63
+
64
+ *first = tmp;
65
+ }
66
+ else
67
+ {
68
+ // tmp is not the smallest value, can avoid checking for j == first
69
+ RandomAccessIterator j = i;
70
+ RandomAccessIterator k = i - 1;
71
+
72
+ while (wrapped_comp(tmp, *k))
73
+ {
74
+ *j = *k;
75
+ j = k;
76
+ --k;
77
+ }
78
+
79
+ *j = tmp;
80
+ }
81
+ }
82
+ }
83
+
84
+ _CCCL_EXEC_CHECK_DISABLE
85
+ template <typename RandomAccessIterator1, typename RandomAccessIterator2, typename StrictWeakOrdering>
86
+ _CCCL_HOST_DEVICE void insertion_sort_by_key(
87
+ RandomAccessIterator1 first1, RandomAccessIterator1 last1, RandomAccessIterator2 first2, StrictWeakOrdering comp)
88
+ {
89
+ using value_type1 = typename thrust::iterator_value<RandomAccessIterator1>::type;
90
+ using value_type2 = typename thrust::iterator_value<RandomAccessIterator2>::type;
91
+
92
+ if (first1 == last1)
93
+ {
94
+ return;
95
+ }
96
+
97
+ // wrap comp
98
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
99
+
100
+ RandomAccessIterator1 i1 = first1 + 1;
101
+ RandomAccessIterator2 i2 = first2 + 1;
102
+
103
+ for (; i1 != last1; ++i1, ++i2)
104
+ {
105
+ value_type1 tmp1 = *i1;
106
+ value_type2 tmp2 = *i2;
107
+
108
+ if (wrapped_comp(tmp1, *first1))
109
+ {
110
+ // tmp is the smallest value encountered so far
111
+ sequential::copy_backward(first1, i1, i1 + 1);
112
+ sequential::copy_backward(first2, i2, i2 + 1);
113
+
114
+ *first1 = tmp1;
115
+ *first2 = tmp2;
116
+ }
117
+ else
118
+ {
119
+ // tmp is not the smallest value, can avoid checking for j == first
120
+ RandomAccessIterator1 j1 = i1;
121
+ RandomAccessIterator1 k1 = i1 - 1;
122
+
123
+ RandomAccessIterator2 j2 = i2;
124
+ RandomAccessIterator2 k2 = i2 - 1;
125
+
126
+ while (wrapped_comp(tmp1, *k1))
127
+ {
128
+ *j1 = *k1;
129
+ *j2 = *k2;
130
+
131
+ j1 = k1;
132
+ j2 = k2;
133
+
134
+ --k1;
135
+ --k2;
136
+ }
137
+
138
+ *j1 = tmp1;
139
+ *j2 = tmp2;
140
+ }
141
+ }
142
+ }
143
+
144
+ } // end namespace sequential
145
+ } // end namespace detail
146
+ } // end namespace system
147
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/iter_swap.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/raw_pointer_cast.h>
29
+ #include <thrust/system/detail/sequential/execution_policy.h>
30
+
31
+ #include <cuda/std/utility>
32
+
33
+ THRUST_NAMESPACE_BEGIN
34
+ namespace system
35
+ {
36
+ namespace detail
37
+ {
38
+ namespace sequential
39
+ {
40
+
41
+ template <typename DerivedPolicy, typename Pointer1, typename Pointer2>
42
+ _CCCL_HOST_DEVICE void iter_swap(sequential::execution_policy<DerivedPolicy>&, Pointer1 a, Pointer2 b)
43
+ {
44
+ using ::cuda::std::swap;
45
+ swap(*thrust::raw_pointer_cast(a), *thrust::raw_pointer_cast(b));
46
+ } // end iter_swap()
47
+
48
+ } // namespace sequential
49
+ } // namespace detail
50
+ } // namespace system
51
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/logical.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special logical functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/malloc_and_free.h 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
+
21
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/raw_pointer_cast.h>
29
+ #include <thrust/system/detail/sequential/execution_policy.h>
30
+
31
+ #include <cstdlib> // for malloc & free
32
+
33
+ THRUST_NAMESPACE_BEGIN
34
+ namespace system
35
+ {
36
+ namespace detail
37
+ {
38
+ namespace sequential
39
+ {
40
+
41
+ template <typename DerivedPolicy>
42
+ inline _CCCL_HOST_DEVICE void* malloc(execution_policy<DerivedPolicy>&, std::size_t n)
43
+ {
44
+ return std::malloc(n);
45
+ } // end mallc()
46
+
47
+ template <typename DerivedPolicy, typename Pointer>
48
+ inline _CCCL_HOST_DEVICE void free(sequential::execution_policy<DerivedPolicy>&, Pointer ptr)
49
+ {
50
+ std::free(thrust::raw_pointer_cast(ptr));
51
+ } // end mallc()
52
+
53
+ } // namespace sequential
54
+ } // namespace detail
55
+ } // namespace system
56
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/merge.h ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file merge.h
18
+ * \brief Sequential implementation of merge algorithms.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/system/detail/sequential/execution_policy.h>
33
+
34
+ THRUST_NAMESPACE_BEGIN
35
+ namespace system
36
+ {
37
+ namespace detail
38
+ {
39
+ namespace sequential
40
+ {
41
+
42
+ template <typename DerivedPolicy,
43
+ typename InputIterator1,
44
+ typename InputIterator2,
45
+ typename OutputIterator,
46
+ typename StrictWeakOrdering>
47
+ _CCCL_HOST_DEVICE OutputIterator merge(
48
+ sequential::execution_policy<DerivedPolicy>& exec,
49
+ InputIterator1 first1,
50
+ InputIterator1 last1,
51
+ InputIterator2 first2,
52
+ InputIterator2 last2,
53
+ OutputIterator result,
54
+ StrictWeakOrdering comp);
55
+
56
+ template <typename DerivedPolicy,
57
+ typename InputIterator1,
58
+ typename InputIterator2,
59
+ typename InputIterator3,
60
+ typename InputIterator4,
61
+ typename OutputIterator1,
62
+ typename OutputIterator2,
63
+ typename StrictWeakOrdering>
64
+ _CCCL_HOST_DEVICE thrust::pair<OutputIterator1, OutputIterator2> merge_by_key(
65
+ sequential::execution_policy<DerivedPolicy>& exec,
66
+ InputIterator1 keys_first1,
67
+ InputIterator1 keys_last1,
68
+ InputIterator2 keys_first2,
69
+ InputIterator2 keys_last2,
70
+ InputIterator3 values_first1,
71
+ InputIterator4 values_first2,
72
+ OutputIterator1 keys_result,
73
+ OutputIterator2 values_result,
74
+ StrictWeakOrdering comp);
75
+
76
+ } // end namespace sequential
77
+ } // end namespace detail
78
+ } // end namespace system
79
+ THRUST_NAMESPACE_END
80
+
81
+ #include <thrust/system/detail/sequential/merge.inl>
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/merge.inl ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/detail/copy.h>
29
+ #include <thrust/detail/function.h>
30
+ #include <thrust/iterator/iterator_traits.h>
31
+ #include <thrust/system/detail/sequential/merge.h>
32
+
33
+ THRUST_NAMESPACE_BEGIN
34
+ namespace system
35
+ {
36
+ namespace detail
37
+ {
38
+ namespace sequential
39
+ {
40
+
41
+ _CCCL_EXEC_CHECK_DISABLE
42
+ template <typename DerivedPolicy,
43
+ typename InputIterator1,
44
+ typename InputIterator2,
45
+ typename OutputIterator,
46
+ typename StrictWeakOrdering>
47
+ _CCCL_HOST_DEVICE OutputIterator merge(
48
+ sequential::execution_policy<DerivedPolicy>& exec,
49
+ InputIterator1 first1,
50
+ InputIterator1 last1,
51
+ InputIterator2 first2,
52
+ InputIterator2 last2,
53
+ OutputIterator result,
54
+ StrictWeakOrdering comp)
55
+ {
56
+ // wrap comp
57
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
58
+
59
+ while (first1 != last1 && first2 != last2)
60
+ {
61
+ if (wrapped_comp(*first2, *first1))
62
+ {
63
+ *result = *first2;
64
+ ++first2;
65
+ } // end if
66
+ else
67
+ {
68
+ *result = *first1;
69
+ ++first1;
70
+ } // end else
71
+
72
+ ++result;
73
+ } // end while
74
+
75
+ return thrust::copy(exec, first2, last2, thrust::copy(exec, first1, last1, result));
76
+ } // end merge()
77
+
78
+ _CCCL_EXEC_CHECK_DISABLE
79
+ template <typename DerivedPolicy,
80
+ typename InputIterator1,
81
+ typename InputIterator2,
82
+ typename InputIterator3,
83
+ typename InputIterator4,
84
+ typename OutputIterator1,
85
+ typename OutputIterator2,
86
+ typename StrictWeakOrdering>
87
+ _CCCL_HOST_DEVICE thrust::pair<OutputIterator1, OutputIterator2> merge_by_key(
88
+ sequential::execution_policy<DerivedPolicy>&,
89
+ InputIterator1 keys_first1,
90
+ InputIterator1 keys_last1,
91
+ InputIterator2 keys_first2,
92
+ InputIterator2 keys_last2,
93
+ InputIterator3 values_first1,
94
+ InputIterator4 values_first2,
95
+ OutputIterator1 keys_result,
96
+ OutputIterator2 values_result,
97
+ StrictWeakOrdering comp)
98
+ {
99
+ // wrap comp
100
+ thrust::detail::wrapped_function<StrictWeakOrdering, bool> wrapped_comp{comp};
101
+
102
+ while (keys_first1 != keys_last1 && keys_first2 != keys_last2)
103
+ {
104
+ if (!wrapped_comp(*keys_first2, *keys_first1))
105
+ {
106
+ // *keys_first1 <= *keys_first2
107
+ *keys_result = *keys_first1;
108
+ *values_result = *values_first1;
109
+ ++keys_first1;
110
+ ++values_first1;
111
+ }
112
+ else
113
+ {
114
+ // *keys_first1 > keys_first2
115
+ *keys_result = *keys_first2;
116
+ *values_result = *values_first2;
117
+ ++keys_first2;
118
+ ++values_first2;
119
+ }
120
+
121
+ ++keys_result;
122
+ ++values_result;
123
+ }
124
+
125
+ while (keys_first1 != keys_last1)
126
+ {
127
+ *keys_result = *keys_first1;
128
+ *values_result = *values_first1;
129
+ ++keys_first1;
130
+ ++values_first1;
131
+ ++keys_result;
132
+ ++values_result;
133
+ }
134
+
135
+ while (keys_first2 != keys_last2)
136
+ {
137
+ *keys_result = *keys_first2;
138
+ *values_result = *values_first2;
139
+ ++keys_first2;
140
+ ++values_first2;
141
+ ++keys_result;
142
+ ++values_result;
143
+ }
144
+
145
+ return thrust::make_pair(keys_result, values_result);
146
+ }
147
+
148
+ } // end namespace sequential
149
+ } // end namespace detail
150
+ } // end namespace system
151
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/mismatch.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special mismatch functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/partition.h ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file partition.h
18
+ * \brief Sequential implementations of partition functions.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/function.h>
33
+ #include <thrust/detail/temporary_array.h>
34
+ #include <thrust/pair.h>
35
+ #include <thrust/system/detail/sequential/execution_policy.h>
36
+
37
+ THRUST_NAMESPACE_BEGIN
38
+ namespace detail
39
+ {
40
+
41
+ // XXX WAR an unfortunate circular #inclusion problem
42
+ template <typename, typename>
43
+ class temporary_array;
44
+
45
+ } // namespace detail
46
+
47
+ namespace system
48
+ {
49
+ namespace detail
50
+ {
51
+ namespace sequential
52
+ {
53
+
54
+ // TODO(bgruber): we should make this an alias of cuda::std::iter_swap
55
+ _CCCL_EXEC_CHECK_DISABLE
56
+ template <typename ForwardIterator1, typename ForwardIterator2>
57
+ _CCCL_HOST_DEVICE void iter_swap(ForwardIterator1 iter1, ForwardIterator2 iter2)
58
+ {
59
+ // note: we cannot use swap(*iter1, *iter2) here, because the reference_type's could be proxy references, for which
60
+ // swap() is not guaranteed to work
61
+ using T = typename thrust::iterator_value<ForwardIterator1>::type;
62
+ T temp = ::cuda::std::move(*iter1);
63
+ *iter1 = ::cuda::std::move(*iter2);
64
+ *iter2 = ::cuda::std::move(temp);
65
+ }
66
+
67
+ _CCCL_EXEC_CHECK_DISABLE
68
+ template <typename DerivedPolicy, typename ForwardIterator, typename Predicate>
69
+ _CCCL_HOST_DEVICE ForwardIterator
70
+ partition(sequential::execution_policy<DerivedPolicy>&, ForwardIterator first, ForwardIterator last, Predicate pred)
71
+ {
72
+ if (first == last)
73
+ {
74
+ return first;
75
+ }
76
+
77
+ // wrap pred
78
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
79
+
80
+ while (wrapped_pred(*first))
81
+ {
82
+ if (++first == last)
83
+ {
84
+ return first;
85
+ }
86
+ }
87
+
88
+ ForwardIterator next = first;
89
+
90
+ while (++next != last)
91
+ {
92
+ if (wrapped_pred(*next))
93
+ {
94
+ // Fully qualify name to disambiguate overloads found via ADL.
95
+ THRUST_NS_QUALIFIER::system::detail::sequential::iter_swap(first, next);
96
+ ++first;
97
+ }
98
+ }
99
+
100
+ return first;
101
+ }
102
+
103
+ _CCCL_EXEC_CHECK_DISABLE
104
+ template <typename DerivedPolicy, typename ForwardIterator, typename InputIterator, typename Predicate>
105
+ _CCCL_HOST_DEVICE ForwardIterator partition(
106
+ sequential::execution_policy<DerivedPolicy>&,
107
+ ForwardIterator first,
108
+ ForwardIterator last,
109
+ InputIterator stencil_first,
110
+ Predicate pred)
111
+ {
112
+ if (first == last)
113
+ {
114
+ return first;
115
+ }
116
+
117
+ // wrap pred
118
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
119
+
120
+ while (wrapped_pred(*stencil_first))
121
+ {
122
+ ++stencil_first;
123
+ if (++first == last)
124
+ {
125
+ return first;
126
+ }
127
+ }
128
+
129
+ ForwardIterator next = first;
130
+
131
+ // advance stencil to next element as well
132
+ ++stencil_first;
133
+
134
+ while (++next != last)
135
+ {
136
+ if (wrapped_pred(*stencil_first))
137
+ {
138
+ // Fully qualify name to disambiguate overloads found via ADL.
139
+ THRUST_NS_QUALIFIER::system::detail::sequential::iter_swap(first, next);
140
+ ++first;
141
+ }
142
+
143
+ ++stencil_first;
144
+ }
145
+
146
+ return first;
147
+ }
148
+
149
+ _CCCL_EXEC_CHECK_DISABLE
150
+ template <typename DerivedPolicy, typename ForwardIterator, typename Predicate>
151
+ _CCCL_HOST_DEVICE ForwardIterator stable_partition(
152
+ sequential::execution_policy<DerivedPolicy>& exec, ForwardIterator first, ForwardIterator last, Predicate pred)
153
+ {
154
+ if (first == last)
155
+ {
156
+ return first;
157
+ }
158
+
159
+ // wrap pred
160
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
161
+
162
+ using T = typename thrust::iterator_value<ForwardIterator>::type;
163
+
164
+ using TempRange = thrust::detail::temporary_array<T, DerivedPolicy>;
165
+ using TempIterator = typename TempRange::iterator;
166
+
167
+ TempRange temp(exec, first, last);
168
+
169
+ for (TempIterator iter = temp.begin(); iter != temp.end(); ++iter)
170
+ {
171
+ if (wrapped_pred(*iter))
172
+ {
173
+ *first = *iter;
174
+ ++first;
175
+ }
176
+ }
177
+
178
+ ForwardIterator middle = first;
179
+
180
+ for (TempIterator iter = temp.begin(); iter != temp.end(); ++iter)
181
+ {
182
+ if (!wrapped_pred(*iter))
183
+ {
184
+ *first = *iter;
185
+ ++first;
186
+ }
187
+ }
188
+
189
+ return middle;
190
+ }
191
+
192
+ _CCCL_EXEC_CHECK_DISABLE
193
+ template <typename DerivedPolicy, typename ForwardIterator, typename InputIterator, typename Predicate>
194
+ _CCCL_HOST_DEVICE ForwardIterator stable_partition(
195
+ sequential::execution_policy<DerivedPolicy>& exec,
196
+ ForwardIterator first,
197
+ ForwardIterator last,
198
+ InputIterator stencil,
199
+ Predicate pred)
200
+ {
201
+ // wrap pred
202
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
203
+
204
+ using T = typename thrust::iterator_value<ForwardIterator>::type;
205
+
206
+ using TempRange = thrust::detail::temporary_array<T, DerivedPolicy>;
207
+ using TempIterator = typename TempRange::iterator;
208
+
209
+ TempRange temp(exec, first, last);
210
+
211
+ InputIterator stencil_iter = stencil;
212
+ for (TempIterator iter = temp.begin(); iter != temp.end(); ++iter, (void) ++stencil_iter)
213
+ {
214
+ if (wrapped_pred(*stencil_iter))
215
+ {
216
+ *first = *iter;
217
+ ++first;
218
+ }
219
+ }
220
+
221
+ ForwardIterator middle = first;
222
+ stencil_iter = stencil;
223
+
224
+ for (TempIterator iter = temp.begin(); iter != temp.end(); ++iter, (void) ++stencil_iter)
225
+ {
226
+ if (!wrapped_pred(*stencil_iter))
227
+ {
228
+ *first = *iter;
229
+ ++first;
230
+ }
231
+ }
232
+
233
+ return middle;
234
+ }
235
+
236
+ _CCCL_EXEC_CHECK_DISABLE
237
+ template <typename DerivedPolicy,
238
+ typename InputIterator,
239
+ typename OutputIterator1,
240
+ typename OutputIterator2,
241
+ typename Predicate>
242
+ _CCCL_HOST_DEVICE thrust::pair<OutputIterator1, OutputIterator2> stable_partition_copy(
243
+ sequential::execution_policy<DerivedPolicy>&,
244
+ InputIterator first,
245
+ InputIterator last,
246
+ OutputIterator1 out_true,
247
+ OutputIterator2 out_false,
248
+ Predicate pred)
249
+ {
250
+ // wrap pred
251
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
252
+
253
+ for (; first != last; ++first)
254
+ {
255
+ if (wrapped_pred(*first))
256
+ {
257
+ *out_true = *first;
258
+ ++out_true;
259
+ } // end if
260
+ else
261
+ {
262
+ *out_false = *first;
263
+ ++out_false;
264
+ } // end else
265
+ }
266
+
267
+ return thrust::make_pair(out_true, out_false);
268
+ }
269
+
270
+ _CCCL_EXEC_CHECK_DISABLE
271
+ template <typename DerivedPolicy,
272
+ typename InputIterator1,
273
+ typename InputIterator2,
274
+ typename OutputIterator1,
275
+ typename OutputIterator2,
276
+ typename Predicate>
277
+ _CCCL_HOST_DEVICE thrust::pair<OutputIterator1, OutputIterator2> stable_partition_copy(
278
+ sequential::execution_policy<DerivedPolicy>&,
279
+ InputIterator1 first,
280
+ InputIterator1 last,
281
+ InputIterator2 stencil,
282
+ OutputIterator1 out_true,
283
+ OutputIterator2 out_false,
284
+ Predicate pred)
285
+ {
286
+ // wrap pred
287
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
288
+
289
+ for (; first != last; ++first, (void) ++stencil)
290
+ {
291
+ if (wrapped_pred(*stencil))
292
+ {
293
+ *out_true = *first;
294
+ ++out_true;
295
+ } // end if
296
+ else
297
+ {
298
+ *out_false = *first;
299
+ ++out_false;
300
+ } // end else
301
+ }
302
+
303
+ return thrust::make_pair(out_true, out_false);
304
+ }
305
+
306
+ } // end namespace sequential
307
+ } // end namespace detail
308
+ } // end namespace system
309
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/per_device_resource.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
21
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special per device resource functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/reduce.h ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file reduce.h
18
+ * \brief Sequential implementation of reduce algorithm.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/function.h>
33
+ #include <thrust/system/detail/sequential/execution_policy.h>
34
+
35
+ THRUST_NAMESPACE_BEGIN
36
+ namespace system
37
+ {
38
+ namespace detail
39
+ {
40
+ namespace sequential
41
+ {
42
+
43
+ _CCCL_EXEC_CHECK_DISABLE
44
+ template <typename DerivedPolicy, typename InputIterator, typename OutputType, typename BinaryFunction>
45
+ _CCCL_HOST_DEVICE OutputType reduce(
46
+ sequential::execution_policy<DerivedPolicy>&,
47
+ InputIterator begin,
48
+ InputIterator end,
49
+ OutputType init,
50
+ BinaryFunction binary_op)
51
+ {
52
+ // wrap binary_op
53
+ thrust::detail::wrapped_function<BinaryFunction, OutputType> wrapped_binary_op{binary_op};
54
+
55
+ // initialize the result
56
+ OutputType result = init;
57
+
58
+ while (begin != end)
59
+ {
60
+ result = wrapped_binary_op(result, *begin);
61
+ ++begin;
62
+ } // end while
63
+
64
+ return result;
65
+ }
66
+
67
+ } // end namespace sequential
68
+ } // end namespace detail
69
+ } // end namespace system
70
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/reduce_by_key.h ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+ #include <thrust/iterator/iterator_traits.h>
29
+ #include <thrust/pair.h>
30
+ #include <thrust/system/detail/sequential/execution_policy.h>
31
+
32
+ THRUST_NAMESPACE_BEGIN
33
+ namespace system
34
+ {
35
+ namespace detail
36
+ {
37
+ namespace sequential
38
+ {
39
+
40
+ _CCCL_EXEC_CHECK_DISABLE
41
+ template <typename DerivedPolicy,
42
+ typename InputIterator1,
43
+ typename InputIterator2,
44
+ typename OutputIterator1,
45
+ typename OutputIterator2,
46
+ typename BinaryPredicate,
47
+ typename BinaryFunction>
48
+ _CCCL_HOST_DEVICE thrust::pair<OutputIterator1, OutputIterator2> reduce_by_key(
49
+ sequential::execution_policy<DerivedPolicy>&,
50
+ InputIterator1 keys_first,
51
+ InputIterator1 keys_last,
52
+ InputIterator2 values_first,
53
+ OutputIterator1 keys_output,
54
+ OutputIterator2 values_output,
55
+ BinaryPredicate binary_pred,
56
+ BinaryFunction binary_op)
57
+ {
58
+ using InputKeyType = typename thrust::iterator_traits<InputIterator1>::value_type;
59
+ using InputValueType = typename thrust::iterator_traits<InputIterator2>::value_type;
60
+
61
+ // Use the input iterator's value type per https://wg21.link/P0571
62
+ using TemporaryType = typename thrust::iterator_value<InputIterator2>::type;
63
+
64
+ if (keys_first != keys_last)
65
+ {
66
+ InputKeyType temp_key = *keys_first;
67
+ TemporaryType temp_value = *values_first;
68
+
69
+ for (++keys_first, ++values_first; keys_first != keys_last; ++keys_first, (void) ++values_first)
70
+ {
71
+ InputKeyType key = *keys_first;
72
+ InputValueType value = *values_first;
73
+
74
+ if (binary_pred(temp_key, key))
75
+ {
76
+ temp_value = binary_op(temp_value, value);
77
+ }
78
+ else
79
+ {
80
+ *keys_output = temp_key;
81
+ *values_output = temp_value;
82
+
83
+ ++keys_output;
84
+ ++values_output;
85
+
86
+ temp_key = key;
87
+ temp_value = value;
88
+ }
89
+ }
90
+
91
+ *keys_output = temp_key;
92
+ *values_output = temp_value;
93
+
94
+ ++keys_output;
95
+ ++values_output;
96
+ }
97
+
98
+ return thrust::make_pair(keys_output, values_output);
99
+ }
100
+
101
+ } // end namespace sequential
102
+ } // end namespace detail
103
+ } // end namespace system
104
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/remove.h ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /*! \file remove.h
18
+ * \brief Sequential implementations of remove functions.
19
+ */
20
+
21
+ #pragma once
22
+
23
+ #include <thrust/detail/config.h>
24
+
25
+ #if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
26
+ # pragma GCC system_header
27
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
28
+ # pragma clang system_header
29
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
30
+ # pragma system_header
31
+ #endif // no system header
32
+ #include <thrust/detail/function.h>
33
+ #include <thrust/system/detail/sequential/execution_policy.h>
34
+
35
+ THRUST_NAMESPACE_BEGIN
36
+ namespace system
37
+ {
38
+ namespace detail
39
+ {
40
+ namespace sequential
41
+ {
42
+
43
+ _CCCL_EXEC_CHECK_DISABLE
44
+ template <typename DerivedPolicy, typename ForwardIterator, typename Predicate>
45
+ _CCCL_HOST_DEVICE ForwardIterator
46
+ remove_if(sequential::execution_policy<DerivedPolicy>&, ForwardIterator first, ForwardIterator last, Predicate pred)
47
+ {
48
+ // wrap pred
49
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
50
+
51
+ // advance iterators until wrapped_pred(*first) is true or we reach the end of input
52
+ while (first != last && !wrapped_pred(*first))
53
+ {
54
+ ++first;
55
+ }
56
+
57
+ if (first == last)
58
+ {
59
+ return first;
60
+ }
61
+
62
+ // result always trails first
63
+ ForwardIterator result = first;
64
+
65
+ ++first;
66
+
67
+ while (first != last)
68
+ {
69
+ if (!wrapped_pred(*first))
70
+ {
71
+ *result = *first;
72
+ ++result;
73
+ }
74
+ ++first;
75
+ }
76
+
77
+ return result;
78
+ }
79
+
80
+ _CCCL_EXEC_CHECK_DISABLE
81
+ template <typename DerivedPolicy, typename ForwardIterator, typename InputIterator, typename Predicate>
82
+ _CCCL_HOST_DEVICE ForwardIterator remove_if(
83
+ sequential::execution_policy<DerivedPolicy>&,
84
+ ForwardIterator first,
85
+ ForwardIterator last,
86
+ InputIterator stencil,
87
+ Predicate pred)
88
+ {
89
+ // wrap pred
90
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
91
+
92
+ // advance iterators until wrapped_pred(*stencil) is true or we reach the end of input
93
+ while (first != last && !wrapped_pred(*stencil))
94
+ {
95
+ ++first;
96
+ ++stencil;
97
+ }
98
+
99
+ if (first == last)
100
+ {
101
+ return first;
102
+ }
103
+
104
+ // result always trails first
105
+ ForwardIterator result = first;
106
+
107
+ ++first;
108
+ ++stencil;
109
+
110
+ while (first != last)
111
+ {
112
+ if (!wrapped_pred(*stencil))
113
+ {
114
+ *result = *first;
115
+ ++result;
116
+ }
117
+ ++first;
118
+ ++stencil;
119
+ }
120
+
121
+ return result;
122
+ }
123
+
124
+ _CCCL_EXEC_CHECK_DISABLE
125
+ template <typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename Predicate>
126
+ _CCCL_HOST_DEVICE OutputIterator remove_copy_if(
127
+ sequential::execution_policy<DerivedPolicy>&,
128
+ InputIterator first,
129
+ InputIterator last,
130
+ OutputIterator result,
131
+ Predicate pred)
132
+ {
133
+ // wrap pred
134
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
135
+
136
+ while (first != last)
137
+ {
138
+ if (!wrapped_pred(*first))
139
+ {
140
+ *result = *first;
141
+ ++result;
142
+ }
143
+
144
+ ++first;
145
+ }
146
+
147
+ return result;
148
+ }
149
+
150
+ _CCCL_EXEC_CHECK_DISABLE
151
+ template <typename DerivedPolicy,
152
+ typename InputIterator1,
153
+ typename InputIterator2,
154
+ typename OutputIterator,
155
+ typename Predicate>
156
+ _CCCL_HOST_DEVICE OutputIterator remove_copy_if(
157
+ sequential::execution_policy<DerivedPolicy>&,
158
+ InputIterator1 first,
159
+ InputIterator1 last,
160
+ InputIterator2 stencil,
161
+ OutputIterator result,
162
+ Predicate pred)
163
+ {
164
+ // wrap pred
165
+ thrust::detail::wrapped_function<Predicate, bool> wrapped_pred{pred};
166
+
167
+ while (first != last)
168
+ {
169
+ if (!wrapped_pred(*stencil))
170
+ {
171
+ *result = *first;
172
+ ++result;
173
+ }
174
+
175
+ ++first;
176
+ ++stencil;
177
+ }
178
+
179
+ return result;
180
+ }
181
+
182
+ } // end namespace sequential
183
+ } // end namespace detail
184
+ } // end namespace system
185
+ THRUST_NAMESPACE_END
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/replace.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special replace functions
vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/system/detail/sequential/reverse.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
22
+ # pragma GCC system_header
23
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
24
+ # pragma clang system_header
25
+ #elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
26
+ # pragma system_header
27
+ #endif // no system header
28
+
29
+ // this system has no special reverse functions