Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- miniCUDA124/include/thrust/system/detail/adl/async/for_each.h +42 -0
- miniCUDA124/include/thrust/system/detail/adl/async/reduce.h +42 -0
- miniCUDA124/include/thrust/system/detail/adl/async/scan.h +42 -0
- miniCUDA124/include/thrust/system/detail/adl/async/sort.h +42 -0
- miniCUDA124/include/thrust/system/detail/adl/async/transform.h +42 -0
- miniCUDA124/include/thrust/system/detail/generic/scalar/binary_search.h +92 -0
- miniCUDA124/include/thrust/system/detail/generic/scalar/binary_search.inl +165 -0
- miniCUDA124/include/thrust/system/omp/detail/adjacent_difference.h +57 -0
- miniCUDA124/include/thrust/system/omp/detail/assign_value.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/binary_search.h +80 -0
- miniCUDA124/include/thrust/system/omp/detail/copy.h +64 -0
- miniCUDA124/include/thrust/system/omp/detail/copy.inl +144 -0
- miniCUDA124/include/thrust/system/omp/detail/copy_if.h +58 -0
- miniCUDA124/include/thrust/system/omp/detail/copy_if.inl +61 -0
- miniCUDA124/include/thrust/system/omp/detail/count.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/default_decomposition.h +52 -0
- miniCUDA124/include/thrust/system/omp/detail/default_decomposition.inl +69 -0
- miniCUDA124/include/thrust/system/omp/detail/equal.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/execution_policy.h +114 -0
- miniCUDA124/include/thrust/system/omp/detail/extrema.h +74 -0
- miniCUDA124/include/thrust/system/omp/detail/fill.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/find.h +58 -0
- miniCUDA124/include/thrust/system/omp/detail/for_each.h +67 -0
- miniCUDA124/include/thrust/system/omp/detail/for_each.inl +100 -0
- miniCUDA124/include/thrust/system/omp/detail/gather.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/generate.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/get_value.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/inner_product.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/iter_swap.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/logical.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/malloc_and_free.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/memory.inl +94 -0
- miniCUDA124/include/thrust/system/omp/detail/merge.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/mismatch.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/par.h +69 -0
- miniCUDA124/include/thrust/system/omp/detail/partition.h +98 -0
- miniCUDA124/include/thrust/system/omp/detail/partition.inl +115 -0
- miniCUDA124/include/thrust/system/omp/detail/per_device_resource.h +30 -0
- miniCUDA124/include/thrust/system/omp/detail/pragma_omp.h +64 -0
- miniCUDA124/include/thrust/system/omp/detail/reduce.h +61 -0
- miniCUDA124/include/thrust/system/omp/detail/reduce.inl +81 -0
- miniCUDA124/include/thrust/system/omp/detail/reduce_by_key.h +68 -0
- miniCUDA124/include/thrust/system/omp/detail/reduce_by_key.inl +66 -0
- miniCUDA124/include/thrust/system/omp/detail/reduce_intervals.h +60 -0
- miniCUDA124/include/thrust/system/omp/detail/reduce_intervals.inl +103 -0
- miniCUDA124/include/thrust/system/omp/detail/remove.h +88 -0
- miniCUDA124/include/thrust/system/omp/detail/remove.inl +101 -0
- miniCUDA124/include/thrust/system/omp/detail/replace.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/reverse.h +31 -0
- miniCUDA124/include/thrust/system/omp/detail/scan.h +31 -0
miniCUDA124/include/thrust/system/detail/adl/async/for_each.h
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 42 |
+
|
miniCUDA124/include/thrust/system/detail/adl/async/reduce.h
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 42 |
+
|
miniCUDA124/include/thrust/system/detail/adl/async/scan.h
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 42 |
+
|
miniCUDA124/include/thrust/system/detail/adl/async/sort.h
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 42 |
+
|
miniCUDA124/include/thrust/system/detail/adl/async/transform.h
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 42 |
+
|
miniCUDA124/include/thrust/system/detail/generic/scalar/binary_search.h
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#pragma once
|
| 18 |
+
|
| 19 |
+
#include <thrust/detail/config.h>
|
| 20 |
+
|
| 21 |
+
#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/pair.h>
|
| 29 |
+
|
| 30 |
+
THRUST_NAMESPACE_BEGIN
|
| 31 |
+
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
|
| 35 |
+
namespace detail
|
| 36 |
+
{
|
| 37 |
+
|
| 38 |
+
namespace generic
|
| 39 |
+
{
|
| 40 |
+
|
| 41 |
+
namespace scalar
|
| 42 |
+
{
|
| 43 |
+
|
| 44 |
+
template<typename RandomAccessIterator, typename Size, typename T, typename BinaryPredicate>
|
| 45 |
+
__host__ __device__
|
| 46 |
+
RandomAccessIterator lower_bound_n(RandomAccessIterator first,
|
| 47 |
+
Size n,
|
| 48 |
+
const T &val,
|
| 49 |
+
BinaryPredicate comp);
|
| 50 |
+
|
| 51 |
+
template<typename RandomAccessIterator, typename T, typename BinaryPredicate>
|
| 52 |
+
__host__ __device__
|
| 53 |
+
RandomAccessIterator lower_bound(RandomAccessIterator first, RandomAccessIterator last,
|
| 54 |
+
const T &val,
|
| 55 |
+
BinaryPredicate comp);
|
| 56 |
+
|
| 57 |
+
template<typename RandomAccessIterator, typename Size, typename T, typename BinaryPredicate>
|
| 58 |
+
__host__ __device__
|
| 59 |
+
RandomAccessIterator upper_bound_n(RandomAccessIterator first,
|
| 60 |
+
Size n,
|
| 61 |
+
const T &val,
|
| 62 |
+
BinaryPredicate comp);
|
| 63 |
+
|
| 64 |
+
template<typename RandomAccessIterator, typename T, typename BinaryPredicate>
|
| 65 |
+
__host__ __device__
|
| 66 |
+
RandomAccessIterator upper_bound(RandomAccessIterator first, RandomAccessIterator last,
|
| 67 |
+
const T &val,
|
| 68 |
+
BinaryPredicate comp);
|
| 69 |
+
|
| 70 |
+
template<typename RandomAccessIterator, typename T, typename BinaryPredicate>
|
| 71 |
+
__host__ __device__
|
| 72 |
+
pair<RandomAccessIterator,RandomAccessIterator>
|
| 73 |
+
equal_range(RandomAccessIterator first, RandomAccessIterator last,
|
| 74 |
+
const T &val,
|
| 75 |
+
BinaryPredicate comp);
|
| 76 |
+
|
| 77 |
+
template<typename RandomAccessIterator, typename T, typename Compare>
|
| 78 |
+
__host__ __device__
|
| 79 |
+
bool binary_search(RandomAccessIterator first, RandomAccessIterator last, const T &value, Compare comp);
|
| 80 |
+
|
| 81 |
+
} // end scalar
|
| 82 |
+
|
| 83 |
+
} // end generic
|
| 84 |
+
|
| 85 |
+
} // end detail
|
| 86 |
+
|
| 87 |
+
} // end system
|
| 88 |
+
|
| 89 |
+
THRUST_NAMESPACE_END
|
| 90 |
+
|
| 91 |
+
#include <thrust/system/detail/generic/scalar/binary_search.inl>
|
| 92 |
+
|
miniCUDA124/include/thrust/system/detail/generic/scalar/binary_search.inl
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/pair.h>
|
| 29 |
+
#include <thrust/detail/function.h>
|
| 30 |
+
#include <thrust/iterator/iterator_traits.h>
|
| 31 |
+
|
| 32 |
+
THRUST_NAMESPACE_BEGIN
|
| 33 |
+
|
| 34 |
+
namespace system
|
| 35 |
+
{
|
| 36 |
+
|
| 37 |
+
namespace detail
|
| 38 |
+
{
|
| 39 |
+
|
| 40 |
+
namespace generic
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
namespace scalar
|
| 44 |
+
{
|
| 45 |
+
|
| 46 |
+
template<typename RandomAccessIterator, typename Size, typename T, typename BinaryPredicate>
|
| 47 |
+
__host__ __device__
|
| 48 |
+
RandomAccessIterator lower_bound_n(RandomAccessIterator first,
|
| 49 |
+
Size n,
|
| 50 |
+
const T &val,
|
| 51 |
+
BinaryPredicate comp)
|
| 52 |
+
{
|
| 53 |
+
// wrap comp
|
| 54 |
+
thrust::detail::wrapped_function<
|
| 55 |
+
BinaryPredicate,
|
| 56 |
+
bool
|
| 57 |
+
> wrapped_comp(comp);
|
| 58 |
+
|
| 59 |
+
Size start = 0, i;
|
| 60 |
+
while(start < n)
|
| 61 |
+
{
|
| 62 |
+
i = start + (n - start) / 2; // Overflow-safe variant of (a+b)/2
|
| 63 |
+
if(wrapped_comp(first[i], val))
|
| 64 |
+
{
|
| 65 |
+
start = i + 1;
|
| 66 |
+
}
|
| 67 |
+
else
|
| 68 |
+
{
|
| 69 |
+
n = i;
|
| 70 |
+
}
|
| 71 |
+
} // end while
|
| 72 |
+
|
| 73 |
+
return first + start;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
// XXX generalize these upon implementation of scalar::distance & scalar::advance
|
| 77 |
+
|
| 78 |
+
template<typename RandomAccessIterator, typename T, typename BinaryPredicate>
|
| 79 |
+
__host__ __device__
|
| 80 |
+
RandomAccessIterator lower_bound(RandomAccessIterator first, RandomAccessIterator last,
|
| 81 |
+
const T &val,
|
| 82 |
+
BinaryPredicate comp)
|
| 83 |
+
{
|
| 84 |
+
typename thrust::iterator_difference<RandomAccessIterator>::type n = last - first;
|
| 85 |
+
return lower_bound_n(first, n, val, comp);
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
template<typename RandomAccessIterator, typename Size, typename T, typename BinaryPredicate>
|
| 89 |
+
__host__ __device__
|
| 90 |
+
RandomAccessIterator upper_bound_n(RandomAccessIterator first,
|
| 91 |
+
Size n,
|
| 92 |
+
const T &val,
|
| 93 |
+
BinaryPredicate comp)
|
| 94 |
+
{
|
| 95 |
+
// wrap comp
|
| 96 |
+
thrust::detail::wrapped_function<
|
| 97 |
+
BinaryPredicate,
|
| 98 |
+
bool
|
| 99 |
+
> wrapped_comp(comp);
|
| 100 |
+
|
| 101 |
+
Size start = 0, i;
|
| 102 |
+
while(start < n)
|
| 103 |
+
{
|
| 104 |
+
i = start + (n - start) / 2; // Overflow-safe variant of (a+b)/2
|
| 105 |
+
if(wrapped_comp(val, first[i]))
|
| 106 |
+
{
|
| 107 |
+
n = i;
|
| 108 |
+
}
|
| 109 |
+
else
|
| 110 |
+
{
|
| 111 |
+
start = i + 1;
|
| 112 |
+
}
|
| 113 |
+
} // end while
|
| 114 |
+
|
| 115 |
+
return first + start;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
template<typename RandomAccessIterator, typename T, typename BinaryPredicate>
|
| 119 |
+
__host__ __device__
|
| 120 |
+
RandomAccessIterator upper_bound(RandomAccessIterator first, RandomAccessIterator last,
|
| 121 |
+
const T &val,
|
| 122 |
+
BinaryPredicate comp)
|
| 123 |
+
{
|
| 124 |
+
typename thrust::iterator_difference<RandomAccessIterator>::type n = last - first;
|
| 125 |
+
return upper_bound_n(first, n, val, comp);
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
template<typename RandomAccessIterator, typename T, typename BinaryPredicate>
|
| 129 |
+
__host__ __device__
|
| 130 |
+
pair<RandomAccessIterator,RandomAccessIterator>
|
| 131 |
+
equal_range(RandomAccessIterator first, RandomAccessIterator last,
|
| 132 |
+
const T &val,
|
| 133 |
+
BinaryPredicate comp)
|
| 134 |
+
{
|
| 135 |
+
RandomAccessIterator lb = thrust::system::detail::generic::scalar::lower_bound(first, last, val, comp);
|
| 136 |
+
return thrust::make_pair(lb, thrust::system::detail::generic::scalar::upper_bound(lb, last, val, comp));
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
template<typename RandomAccessIterator, typename T, typename Compare>
|
| 141 |
+
__host__ __device__
|
| 142 |
+
bool binary_search(RandomAccessIterator first, RandomAccessIterator last, const T &value, Compare comp)
|
| 143 |
+
{
|
| 144 |
+
RandomAccessIterator iter = thrust::system::detail::generic::scalar::lower_bound(first, last, value, comp);
|
| 145 |
+
|
| 146 |
+
// wrap comp
|
| 147 |
+
thrust::detail::wrapped_function<
|
| 148 |
+
Compare,
|
| 149 |
+
bool
|
| 150 |
+
> wrapped_comp(comp);
|
| 151 |
+
|
| 152 |
+
return iter != last && !wrapped_comp(value,*iter);
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
} // end scalar
|
| 156 |
+
|
| 157 |
+
} // end generic
|
| 158 |
+
|
| 159 |
+
} // end detail
|
| 160 |
+
|
| 161 |
+
} // end system
|
| 162 |
+
|
| 163 |
+
THRUST_NAMESPACE_END
|
| 164 |
+
|
| 165 |
+
#include <thrust/system/detail/generic/scalar/binary_search.inl>
|
miniCUDA124/include/thrust/system/omp/detail/adjacent_difference.h
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/execution_policy.h>
|
| 29 |
+
#include <thrust/system/detail/generic/adjacent_difference.h>
|
| 30 |
+
|
| 31 |
+
THRUST_NAMESPACE_BEGIN
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
namespace omp
|
| 35 |
+
{
|
| 36 |
+
namespace detail
|
| 37 |
+
{
|
| 38 |
+
|
| 39 |
+
template<typename DerivedPolicy,
|
| 40 |
+
typename InputIterator,
|
| 41 |
+
typename OutputIterator,
|
| 42 |
+
typename BinaryFunction>
|
| 43 |
+
OutputIterator adjacent_difference(execution_policy<DerivedPolicy> &exec,
|
| 44 |
+
InputIterator first,
|
| 45 |
+
InputIterator last,
|
| 46 |
+
OutputIterator result,
|
| 47 |
+
BinaryFunction binary_op)
|
| 48 |
+
{
|
| 49 |
+
// omp prefers generic::adjacent_difference to cpp::adjacent_difference
|
| 50 |
+
return thrust::system::detail::generic::adjacent_difference(exec, first, last, result, binary_op);
|
| 51 |
+
} // end adjacent_difference()
|
| 52 |
+
|
| 53 |
+
} // end detail
|
| 54 |
+
} // end omp
|
| 55 |
+
} // end system
|
| 56 |
+
THRUST_NAMESPACE_END
|
| 57 |
+
|
miniCUDA124/include/thrust/system/omp/detail/assign_value.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits assign_value
|
| 30 |
+
#include <thrust/system/cpp/detail/assign_value.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/binary_search.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 |
+
#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/system/omp/detail/execution_policy.h>
|
| 29 |
+
#include <thrust/system/detail/generic/binary_search.h>
|
| 30 |
+
|
| 31 |
+
THRUST_NAMESPACE_BEGIN
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
namespace omp
|
| 35 |
+
{
|
| 36 |
+
namespace detail
|
| 37 |
+
{
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
template <typename DerivedPolicy, typename ForwardIterator, typename T, typename StrictWeakOrdering>
|
| 41 |
+
ForwardIterator lower_bound(execution_policy<DerivedPolicy> &exec,
|
| 42 |
+
ForwardIterator begin,
|
| 43 |
+
ForwardIterator end,
|
| 44 |
+
const T& value,
|
| 45 |
+
StrictWeakOrdering comp)
|
| 46 |
+
{
|
| 47 |
+
// omp prefers generic::lower_bound to cpp::lower_bound
|
| 48 |
+
return thrust::system::detail::generic::lower_bound(exec, begin, end, value, comp);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
template <typename DerivedPolicy, typename ForwardIterator, typename T, typename StrictWeakOrdering, typename Backend>
|
| 53 |
+
ForwardIterator upper_bound(execution_policy<DerivedPolicy> &exec,
|
| 54 |
+
ForwardIterator begin,
|
| 55 |
+
ForwardIterator end,
|
| 56 |
+
const T& value,
|
| 57 |
+
StrictWeakOrdering comp)
|
| 58 |
+
{
|
| 59 |
+
// omp prefers generic::upper_bound to cpp::upper_bound
|
| 60 |
+
return thrust::system::detail::generic::upper_bound(exec, begin, end, value, comp);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
template <typename DerivedPolicy, typename ForwardIterator, typename T, typename StrictWeakOrdering>
|
| 65 |
+
bool binary_search(execution_policy<DerivedPolicy> &exec,
|
| 66 |
+
ForwardIterator begin,
|
| 67 |
+
ForwardIterator end,
|
| 68 |
+
const T& value,
|
| 69 |
+
StrictWeakOrdering comp)
|
| 70 |
+
{
|
| 71 |
+
// omp prefers generic::binary_search to cpp::binary_search
|
| 72 |
+
return thrust::system::detail::generic::binary_search(exec, begin, end, value, comp);
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
} // end detail
|
| 77 |
+
} // end omp
|
| 78 |
+
} // end system
|
| 79 |
+
THRUST_NAMESPACE_END
|
| 80 |
+
|
miniCUDA124/include/thrust/system/omp/detail/copy.h
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/execution_policy.h>
|
| 29 |
+
|
| 30 |
+
THRUST_NAMESPACE_BEGIN
|
| 31 |
+
namespace system
|
| 32 |
+
{
|
| 33 |
+
namespace omp
|
| 34 |
+
{
|
| 35 |
+
namespace detail
|
| 36 |
+
{
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
template<typename DerivedPolicy,
|
| 40 |
+
typename InputIterator,
|
| 41 |
+
typename OutputIterator>
|
| 42 |
+
OutputIterator copy(execution_policy<DerivedPolicy> &exec,
|
| 43 |
+
InputIterator first,
|
| 44 |
+
InputIterator last,
|
| 45 |
+
OutputIterator result);
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
template<typename DerivedPolicy,
|
| 49 |
+
typename InputIterator,
|
| 50 |
+
typename Size,
|
| 51 |
+
typename OutputIterator>
|
| 52 |
+
OutputIterator copy_n(execution_policy<DerivedPolicy> &exec,
|
| 53 |
+
InputIterator first,
|
| 54 |
+
Size n,
|
| 55 |
+
OutputIterator result);
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
} // end namespace detail
|
| 59 |
+
} // end namespace omp
|
| 60 |
+
} // end namespace system
|
| 61 |
+
THRUST_NAMESPACE_END
|
| 62 |
+
|
| 63 |
+
#include <thrust/system/omp/detail/copy.inl>
|
| 64 |
+
|
miniCUDA124/include/thrust/system/omp/detail/copy.inl
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/copy.h>
|
| 29 |
+
#include <thrust/system/detail/generic/copy.h>
|
| 30 |
+
#include <thrust/system/detail/sequential/copy.h>
|
| 31 |
+
#include <thrust/detail/type_traits/minimum_type.h>
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
THRUST_NAMESPACE_BEGIN
|
| 35 |
+
namespace system
|
| 36 |
+
{
|
| 37 |
+
namespace omp
|
| 38 |
+
{
|
| 39 |
+
namespace detail
|
| 40 |
+
{
|
| 41 |
+
namespace dispatch
|
| 42 |
+
{
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
template<typename DerivedPolicy,
|
| 46 |
+
typename InputIterator,
|
| 47 |
+
typename OutputIterator>
|
| 48 |
+
OutputIterator copy(execution_policy<DerivedPolicy> &exec,
|
| 49 |
+
InputIterator first,
|
| 50 |
+
InputIterator last,
|
| 51 |
+
OutputIterator result,
|
| 52 |
+
thrust::incrementable_traversal_tag)
|
| 53 |
+
{
|
| 54 |
+
return thrust::system::detail::sequential::copy(exec, first, last, result);
|
| 55 |
+
} // end copy()
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
template<typename DerivedPolicy,
|
| 59 |
+
typename InputIterator,
|
| 60 |
+
typename OutputIterator>
|
| 61 |
+
OutputIterator copy(execution_policy<DerivedPolicy> &exec,
|
| 62 |
+
InputIterator first,
|
| 63 |
+
InputIterator last,
|
| 64 |
+
OutputIterator result,
|
| 65 |
+
thrust::random_access_traversal_tag)
|
| 66 |
+
{
|
| 67 |
+
return thrust::system::detail::generic::copy(exec, first, last, result);
|
| 68 |
+
} // end copy()
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
template<typename DerivedPolicy,
|
| 72 |
+
typename InputIterator,
|
| 73 |
+
typename Size,
|
| 74 |
+
typename OutputIterator>
|
| 75 |
+
OutputIterator copy_n(execution_policy<DerivedPolicy> &exec,
|
| 76 |
+
InputIterator first,
|
| 77 |
+
Size n,
|
| 78 |
+
OutputIterator result,
|
| 79 |
+
thrust::incrementable_traversal_tag)
|
| 80 |
+
{
|
| 81 |
+
return thrust::system::detail::sequential::copy_n(exec, first, n, result);
|
| 82 |
+
} // end copy_n()
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
template<typename DerivedPolicy,
|
| 86 |
+
typename InputIterator,
|
| 87 |
+
typename Size,
|
| 88 |
+
typename OutputIterator>
|
| 89 |
+
OutputIterator copy_n(execution_policy<DerivedPolicy> &exec,
|
| 90 |
+
InputIterator first,
|
| 91 |
+
Size n,
|
| 92 |
+
OutputIterator result,
|
| 93 |
+
thrust::random_access_traversal_tag)
|
| 94 |
+
{
|
| 95 |
+
return thrust::system::detail::generic::copy_n(exec, first, n, result);
|
| 96 |
+
} // end copy_n()
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
} // end dispatch
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
template<typename DerivedPolicy,
|
| 103 |
+
typename InputIterator,
|
| 104 |
+
typename OutputIterator>
|
| 105 |
+
OutputIterator copy(execution_policy<DerivedPolicy> &exec,
|
| 106 |
+
InputIterator first,
|
| 107 |
+
InputIterator last,
|
| 108 |
+
OutputIterator result)
|
| 109 |
+
{
|
| 110 |
+
typedef typename thrust::iterator_traversal<InputIterator>::type traversal1;
|
| 111 |
+
typedef typename thrust::iterator_traversal<OutputIterator>::type traversal2;
|
| 112 |
+
|
| 113 |
+
typedef typename thrust::detail::minimum_type<traversal1,traversal2>::type traversal;
|
| 114 |
+
|
| 115 |
+
// dispatch on minimum traversal
|
| 116 |
+
return thrust::system::omp::detail::dispatch::copy(exec, first, last, result, traversal());
|
| 117 |
+
} // end copy()
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
template<typename DerivedPolicy,
|
| 122 |
+
typename InputIterator,
|
| 123 |
+
typename Size,
|
| 124 |
+
typename OutputIterator>
|
| 125 |
+
OutputIterator copy_n(execution_policy<DerivedPolicy> &exec,
|
| 126 |
+
InputIterator first,
|
| 127 |
+
Size n,
|
| 128 |
+
OutputIterator result)
|
| 129 |
+
{
|
| 130 |
+
typedef typename thrust::iterator_traversal<InputIterator>::type traversal1;
|
| 131 |
+
typedef typename thrust::iterator_traversal<OutputIterator>::type traversal2;
|
| 132 |
+
|
| 133 |
+
typedef typename thrust::detail::minimum_type<traversal1,traversal2>::type traversal;
|
| 134 |
+
|
| 135 |
+
// dispatch on minimum traversal
|
| 136 |
+
return thrust::system::omp::detail::dispatch::copy_n(exec, first, n, result, traversal());
|
| 137 |
+
} // end copy_n()
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
} // end namespace detail
|
| 141 |
+
} // end namespace omp
|
| 142 |
+
} // end namespace system
|
| 143 |
+
THRUST_NAMESPACE_END
|
| 144 |
+
|
miniCUDA124/include/thrust/system/omp/detail/copy_if.h
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#pragma once
|
| 18 |
+
|
| 19 |
+
#include <thrust/detail/config.h>
|
| 20 |
+
|
| 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/system/omp/detail/execution_policy.h>
|
| 29 |
+
|
| 30 |
+
THRUST_NAMESPACE_BEGIN
|
| 31 |
+
namespace system
|
| 32 |
+
{
|
| 33 |
+
namespace omp
|
| 34 |
+
{
|
| 35 |
+
namespace detail
|
| 36 |
+
{
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
template<typename DerivedPolicy,
|
| 40 |
+
typename InputIterator1,
|
| 41 |
+
typename InputIterator2,
|
| 42 |
+
typename OutputIterator,
|
| 43 |
+
typename Predicate>
|
| 44 |
+
OutputIterator copy_if(execution_policy<DerivedPolicy> &exec,
|
| 45 |
+
InputIterator1 first,
|
| 46 |
+
InputIterator1 last,
|
| 47 |
+
InputIterator2 stencil,
|
| 48 |
+
OutputIterator result,
|
| 49 |
+
Predicate pred);
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
} // end detail
|
| 53 |
+
} // end omp
|
| 54 |
+
} // end system
|
| 55 |
+
THRUST_NAMESPACE_END
|
| 56 |
+
|
| 57 |
+
#include <thrust/system/omp/detail/copy_if.inl>
|
| 58 |
+
|
miniCUDA124/include/thrust/system/omp/detail/copy_if.inl
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/copy_if.h>
|
| 29 |
+
#include <thrust/system/detail/generic/copy_if.h>
|
| 30 |
+
|
| 31 |
+
THRUST_NAMESPACE_BEGIN
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
namespace omp
|
| 35 |
+
{
|
| 36 |
+
namespace detail
|
| 37 |
+
{
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
template<typename DerivedPolicy,
|
| 41 |
+
typename InputIterator1,
|
| 42 |
+
typename InputIterator2,
|
| 43 |
+
typename OutputIterator,
|
| 44 |
+
typename Predicate>
|
| 45 |
+
OutputIterator copy_if(execution_policy<DerivedPolicy> &exec,
|
| 46 |
+
InputIterator1 first,
|
| 47 |
+
InputIterator1 last,
|
| 48 |
+
InputIterator2 stencil,
|
| 49 |
+
OutputIterator result,
|
| 50 |
+
Predicate pred)
|
| 51 |
+
{
|
| 52 |
+
// omp prefers generic::copy_if to cpp::copy_if
|
| 53 |
+
return thrust::system::detail::generic::copy_if(exec, first, last, stencil, result, pred);
|
| 54 |
+
} // end copy_if()
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
} // end detail
|
| 58 |
+
} // end omp
|
| 59 |
+
} // end system
|
| 60 |
+
THRUST_NAMESPACE_END
|
| 61 |
+
|
miniCUDA124/include/thrust/system/omp/detail/count.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits count
|
| 30 |
+
#include <thrust/system/cpp/detail/count.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/default_decomposition.h
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file default_decomposition.h
|
| 19 |
+
* \brief Return a decomposition that is appropriate for the OpenMP backend.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/detail/internal/decompose.h>
|
| 34 |
+
|
| 35 |
+
THRUST_NAMESPACE_BEGIN
|
| 36 |
+
namespace system
|
| 37 |
+
{
|
| 38 |
+
namespace omp
|
| 39 |
+
{
|
| 40 |
+
namespace detail
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
template <typename IndexType>
|
| 44 |
+
thrust::system::detail::internal::uniform_decomposition<IndexType> default_decomposition(IndexType n);
|
| 45 |
+
|
| 46 |
+
} // end namespace detail
|
| 47 |
+
} // end namespace omp
|
| 48 |
+
} // end namespace system
|
| 49 |
+
THRUST_NAMESPACE_END
|
| 50 |
+
|
| 51 |
+
#include <thrust/system/omp/detail/default_decomposition.inl>
|
| 52 |
+
|
miniCUDA124/include/thrust/system/omp/detail/default_decomposition.inl
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/default_decomposition.h>
|
| 29 |
+
|
| 30 |
+
// don't attempt to #include this file without omp support
|
| 31 |
+
#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE)
|
| 32 |
+
#include <omp.h>
|
| 33 |
+
#endif // omp support
|
| 34 |
+
|
| 35 |
+
THRUST_NAMESPACE_BEGIN
|
| 36 |
+
namespace system
|
| 37 |
+
{
|
| 38 |
+
namespace omp
|
| 39 |
+
{
|
| 40 |
+
namespace detail
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
template <typename IndexType>
|
| 44 |
+
thrust::system::detail::internal::uniform_decomposition<IndexType> default_decomposition(IndexType n)
|
| 45 |
+
{
|
| 46 |
+
// we're attempting to launch an omp kernel, assert we're compiling with omp support
|
| 47 |
+
// ========================================================================
|
| 48 |
+
// X Note to the user: If you've found this line due to a compiler error, X
|
| 49 |
+
// X you need to OpenMP support in your compiler. X
|
| 50 |
+
// ========================================================================
|
| 51 |
+
THRUST_STATIC_ASSERT_MSG(
|
| 52 |
+
(thrust::detail::depend_on_instantiation<
|
| 53 |
+
IndexType, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE)
|
| 54 |
+
>::value)
|
| 55 |
+
, "OpenMP compiler support is not enabled"
|
| 56 |
+
);
|
| 57 |
+
|
| 58 |
+
#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE)
|
| 59 |
+
return thrust::system::detail::internal::uniform_decomposition<IndexType>(n, 1, omp_get_num_procs());
|
| 60 |
+
#else
|
| 61 |
+
return thrust::system::detail::internal::uniform_decomposition<IndexType>(n, 1, 1);
|
| 62 |
+
#endif
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
} // end namespace detail
|
| 66 |
+
} // end namespace omp
|
| 67 |
+
} // end namespace system
|
| 68 |
+
THRUST_NAMESPACE_END
|
| 69 |
+
|
miniCUDA124/include/thrust/system/omp/detail/equal.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits equal
|
| 30 |
+
#include <thrust/system/cpp/detail/equal.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/execution_policy.h
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/cpp/detail/execution_policy.h>
|
| 29 |
+
#include <thrust/system/tbb/detail/execution_policy.h>
|
| 30 |
+
#include <thrust/iterator/detail/any_system_tag.h>
|
| 31 |
+
#include <thrust/detail/type_traits.h>
|
| 32 |
+
|
| 33 |
+
THRUST_NAMESPACE_BEGIN
|
| 34 |
+
namespace system
|
| 35 |
+
{
|
| 36 |
+
// put the canonical tag in the same ns as the backend's entry points
|
| 37 |
+
namespace omp
|
| 38 |
+
{
|
| 39 |
+
namespace detail
|
| 40 |
+
{
|
| 41 |
+
|
| 42 |
+
// this awkward sequence of definitions arise
|
| 43 |
+
// from the desire both for tag to derive
|
| 44 |
+
// from execution_policy and for execution_policy
|
| 45 |
+
// to convert to tag (when execution_policy is not
|
| 46 |
+
// an ancestor of tag)
|
| 47 |
+
|
| 48 |
+
// forward declaration of tag
|
| 49 |
+
struct tag;
|
| 50 |
+
|
| 51 |
+
// forward declaration of execution_policy
|
| 52 |
+
template<typename> struct execution_policy;
|
| 53 |
+
|
| 54 |
+
// specialize execution_policy for tag
|
| 55 |
+
template<>
|
| 56 |
+
struct execution_policy<tag>
|
| 57 |
+
: thrust::system::cpp::detail::execution_policy<tag>
|
| 58 |
+
{};
|
| 59 |
+
|
| 60 |
+
// tag's definition comes before the
|
| 61 |
+
// generic definition of execution_policy
|
| 62 |
+
struct tag : execution_policy<tag> {};
|
| 63 |
+
|
| 64 |
+
// allow conversion to tag when it is not a successor
|
| 65 |
+
template<typename Derived>
|
| 66 |
+
struct execution_policy
|
| 67 |
+
: thrust::system::cpp::detail::execution_policy<Derived>
|
| 68 |
+
{
|
| 69 |
+
typedef tag tag_type;
|
| 70 |
+
operator tag() const { return tag(); }
|
| 71 |
+
};
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
// overloads of select_system
|
| 75 |
+
|
| 76 |
+
// XXX select_system(tbb, omp) & select_system(omp, tbb) are ambiguous
|
| 77 |
+
// because both convert to cpp without these overloads, which we
|
| 78 |
+
// arbitrarily define in the omp backend
|
| 79 |
+
|
| 80 |
+
template<typename System1, typename System2>
|
| 81 |
+
inline __host__ __device__
|
| 82 |
+
System1 select_system(execution_policy<System1> s, thrust::system::tbb::detail::execution_policy<System2>)
|
| 83 |
+
{
|
| 84 |
+
return thrust::detail::derived_cast(s);
|
| 85 |
+
} // end select_system()
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
template<typename System1, typename System2>
|
| 89 |
+
inline __host__ __device__
|
| 90 |
+
System2 select_system(thrust::system::tbb::detail::execution_policy<System1>, execution_policy<System2> s)
|
| 91 |
+
{
|
| 92 |
+
return thrust::detail::derived_cast(s);
|
| 93 |
+
} // end select_system()
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
} // end detail
|
| 97 |
+
|
| 98 |
+
// alias execution_policy and tag here
|
| 99 |
+
using thrust::system::omp::detail::execution_policy;
|
| 100 |
+
using thrust::system::omp::detail::tag;
|
| 101 |
+
|
| 102 |
+
} // end omp
|
| 103 |
+
} // end system
|
| 104 |
+
|
| 105 |
+
// alias items at top-level
|
| 106 |
+
namespace omp
|
| 107 |
+
{
|
| 108 |
+
|
| 109 |
+
using thrust::system::omp::execution_policy;
|
| 110 |
+
using thrust::system::omp::tag;
|
| 111 |
+
|
| 112 |
+
} // end omp
|
| 113 |
+
THRUST_NAMESPACE_END
|
| 114 |
+
|
miniCUDA124/include/thrust/system/omp/detail/extrema.h
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#pragma once
|
| 18 |
+
|
| 19 |
+
#include <thrust/detail/config.h>
|
| 20 |
+
|
| 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/system/omp/detail/execution_policy.h>
|
| 29 |
+
#include <thrust/system/detail/generic/extrema.h>
|
| 30 |
+
|
| 31 |
+
THRUST_NAMESPACE_BEGIN
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
namespace omp
|
| 35 |
+
{
|
| 36 |
+
namespace detail
|
| 37 |
+
{
|
| 38 |
+
|
| 39 |
+
template <typename DerivedPolicy, typename ForwardIterator, typename BinaryPredicate>
|
| 40 |
+
ForwardIterator max_element(execution_policy<DerivedPolicy> &exec,
|
| 41 |
+
ForwardIterator first,
|
| 42 |
+
ForwardIterator last,
|
| 43 |
+
BinaryPredicate comp)
|
| 44 |
+
{
|
| 45 |
+
// omp prefers generic::max_element to cpp::max_element
|
| 46 |
+
return thrust::system::detail::generic::max_element(exec, first, last, comp);
|
| 47 |
+
} // end max_element()
|
| 48 |
+
|
| 49 |
+
template <typename DerivedPolicy, typename ForwardIterator, typename BinaryPredicate>
|
| 50 |
+
ForwardIterator min_element(execution_policy<DerivedPolicy> &exec,
|
| 51 |
+
ForwardIterator first,
|
| 52 |
+
ForwardIterator last,
|
| 53 |
+
BinaryPredicate comp)
|
| 54 |
+
{
|
| 55 |
+
// omp prefers generic::min_element to cpp::min_element
|
| 56 |
+
return thrust::system::detail::generic::min_element(exec, first, last, comp);
|
| 57 |
+
} // end min_element()
|
| 58 |
+
|
| 59 |
+
template <typename DerivedPolicy, typename ForwardIterator, typename BinaryPredicate>
|
| 60 |
+
thrust::pair<ForwardIterator,ForwardIterator> minmax_element(execution_policy<DerivedPolicy> &exec,
|
| 61 |
+
ForwardIterator first,
|
| 62 |
+
ForwardIterator last,
|
| 63 |
+
BinaryPredicate comp)
|
| 64 |
+
{
|
| 65 |
+
// omp prefers generic::minmax_element to cpp::minmax_element
|
| 66 |
+
return thrust::system::detail::generic::minmax_element(exec, first, last, comp);
|
| 67 |
+
} // end minmax_element()
|
| 68 |
+
|
| 69 |
+
} // end detail
|
| 70 |
+
} // end omp
|
| 71 |
+
} // end system
|
| 72 |
+
THRUST_NAMESPACE_END
|
| 73 |
+
|
| 74 |
+
|
miniCUDA124/include/thrust/system/omp/detail/fill.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits fill
|
| 30 |
+
#include <thrust/system/cpp/detail/fill.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/find.h
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file find.h
|
| 19 |
+
* \brief OpenMP implementation of find_if.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/detail/generic/find.h>
|
| 34 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 35 |
+
|
| 36 |
+
THRUST_NAMESPACE_BEGIN
|
| 37 |
+
namespace system
|
| 38 |
+
{
|
| 39 |
+
namespace omp
|
| 40 |
+
{
|
| 41 |
+
namespace detail
|
| 42 |
+
{
|
| 43 |
+
|
| 44 |
+
template <typename DerivedPolicy, typename InputIterator, typename Predicate>
|
| 45 |
+
InputIterator find_if(execution_policy<DerivedPolicy> &exec,
|
| 46 |
+
InputIterator first,
|
| 47 |
+
InputIterator last,
|
| 48 |
+
Predicate pred)
|
| 49 |
+
{
|
| 50 |
+
// omp prefers generic::find_if to cpp::find_if
|
| 51 |
+
return thrust::system::detail::generic::find_if(exec, first, last, pred);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
} // end namespace detail
|
| 55 |
+
} // end namespace omp
|
| 56 |
+
} // end namespace system
|
| 57 |
+
THRUST_NAMESPACE_END
|
| 58 |
+
|
miniCUDA124/include/thrust/system/omp/detail/for_each.h
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file for_each.h
|
| 19 |
+
* \brief Defines the interface for a function that executes a
|
| 20 |
+
* function or functional for each value in a given range.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
#pragma once
|
| 24 |
+
|
| 25 |
+
#include <thrust/detail/config.h>
|
| 26 |
+
|
| 27 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 28 |
+
# pragma GCC system_header
|
| 29 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 30 |
+
# pragma clang system_header
|
| 31 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 32 |
+
# pragma system_header
|
| 33 |
+
#endif // no system header
|
| 34 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 35 |
+
|
| 36 |
+
THRUST_NAMESPACE_BEGIN
|
| 37 |
+
namespace system
|
| 38 |
+
{
|
| 39 |
+
namespace omp
|
| 40 |
+
{
|
| 41 |
+
namespace detail
|
| 42 |
+
{
|
| 43 |
+
|
| 44 |
+
template<typename DerivedPolicy,
|
| 45 |
+
typename RandomAccessIterator,
|
| 46 |
+
typename UnaryFunction>
|
| 47 |
+
RandomAccessIterator for_each(execution_policy<DerivedPolicy> &exec,
|
| 48 |
+
RandomAccessIterator first,
|
| 49 |
+
RandomAccessIterator last,
|
| 50 |
+
UnaryFunction f);
|
| 51 |
+
|
| 52 |
+
template<typename DerivedPolicy,
|
| 53 |
+
typename RandomAccessIterator,
|
| 54 |
+
typename Size,
|
| 55 |
+
typename UnaryFunction>
|
| 56 |
+
RandomAccessIterator for_each_n(execution_policy<DerivedPolicy> &exec,
|
| 57 |
+
RandomAccessIterator first,
|
| 58 |
+
Size n,
|
| 59 |
+
UnaryFunction f);
|
| 60 |
+
|
| 61 |
+
} // end namespace detail
|
| 62 |
+
} // end namespace omp
|
| 63 |
+
} // end namespace system
|
| 64 |
+
THRUST_NAMESPACE_END
|
| 65 |
+
|
| 66 |
+
#include <thrust/system/omp/detail/for_each.inl>
|
| 67 |
+
|
miniCUDA124/include/thrust/system/omp/detail/for_each.inl
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/function.h>
|
| 29 |
+
#include <thrust/detail/static_assert.h>
|
| 30 |
+
#include <thrust/distance.h>
|
| 31 |
+
#include <thrust/for_each.h>
|
| 32 |
+
#include <thrust/iterator/iterator_traits.h>
|
| 33 |
+
#include <thrust/system/omp/detail/pragma_omp.h>
|
| 34 |
+
|
| 35 |
+
THRUST_NAMESPACE_BEGIN
|
| 36 |
+
namespace system
|
| 37 |
+
{
|
| 38 |
+
namespace omp
|
| 39 |
+
{
|
| 40 |
+
namespace detail
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
template<typename DerivedPolicy,
|
| 44 |
+
typename RandomAccessIterator,
|
| 45 |
+
typename Size,
|
| 46 |
+
typename UnaryFunction>
|
| 47 |
+
RandomAccessIterator for_each_n(execution_policy<DerivedPolicy> &,
|
| 48 |
+
RandomAccessIterator first,
|
| 49 |
+
Size n,
|
| 50 |
+
UnaryFunction f)
|
| 51 |
+
{
|
| 52 |
+
// we're attempting to launch an omp kernel, assert we're compiling with omp support
|
| 53 |
+
// ========================================================================
|
| 54 |
+
// X Note to the user: If you've found this line due to a compiler error, X
|
| 55 |
+
// X you need to enable OpenMP support in your compiler. X
|
| 56 |
+
// ========================================================================
|
| 57 |
+
THRUST_STATIC_ASSERT_MSG(
|
| 58 |
+
(thrust::detail::depend_on_instantiation<
|
| 59 |
+
RandomAccessIterator, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE)
|
| 60 |
+
>::value)
|
| 61 |
+
, "OpenMP compiler support is not enabled"
|
| 62 |
+
);
|
| 63 |
+
|
| 64 |
+
if (n <= 0) return first; //empty range
|
| 65 |
+
|
| 66 |
+
// create a wrapped function for f
|
| 67 |
+
thrust::detail::wrapped_function<UnaryFunction,void> wrapped_f(f);
|
| 68 |
+
|
| 69 |
+
// use a signed type for the iteration variable or suffer the consequences of warnings
|
| 70 |
+
typedef typename thrust::iterator_difference<RandomAccessIterator>::type DifferenceType;
|
| 71 |
+
DifferenceType signed_n = n;
|
| 72 |
+
|
| 73 |
+
THRUST_PRAGMA_OMP(parallel for)
|
| 74 |
+
for(DifferenceType i = 0;
|
| 75 |
+
i < signed_n;
|
| 76 |
+
++i)
|
| 77 |
+
{
|
| 78 |
+
RandomAccessIterator temp = first + i;
|
| 79 |
+
wrapped_f(*temp);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
return first + n;
|
| 83 |
+
} // end for_each_n()
|
| 84 |
+
|
| 85 |
+
template<typename DerivedPolicy,
|
| 86 |
+
typename RandomAccessIterator,
|
| 87 |
+
typename UnaryFunction>
|
| 88 |
+
RandomAccessIterator for_each(execution_policy<DerivedPolicy> &s,
|
| 89 |
+
RandomAccessIterator first,
|
| 90 |
+
RandomAccessIterator last,
|
| 91 |
+
UnaryFunction f)
|
| 92 |
+
{
|
| 93 |
+
return omp::detail::for_each_n(s, first, thrust::distance(first,last), f);
|
| 94 |
+
} // end for_each()
|
| 95 |
+
|
| 96 |
+
} // end namespace detail
|
| 97 |
+
} // end namespace omp
|
| 98 |
+
} // end namespace system
|
| 99 |
+
THRUST_NAMESPACE_END
|
| 100 |
+
|
miniCUDA124/include/thrust/system/omp/detail/gather.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits gather
|
| 30 |
+
#include <thrust/system/cpp/detail/gather.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/generate.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits generate
|
| 30 |
+
#include <thrust/system/cpp/detail/generate.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/get_value.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits get_value
|
| 30 |
+
#include <thrust/system/cpp/detail/get_value.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/inner_product.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits inner_product
|
| 30 |
+
#include <thrust/system/cpp/detail/inner_product.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/iter_swap.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits iter_swap
|
| 30 |
+
#include <thrust/system/cpp/detail/iter_swap.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/logical.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits logical
|
| 30 |
+
#include <thrust/system/cpp/detail/logical.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/malloc_and_free.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits malloc and free
|
| 30 |
+
#include <thrust/system/cpp/detail/malloc_and_free.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/memory.inl
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2018 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#pragma once
|
| 18 |
+
|
| 19 |
+
#include <thrust/detail/config.h>
|
| 20 |
+
|
| 21 |
+
#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/system/cpp/detail/execution_policy.h>
|
| 29 |
+
#include <thrust/system/omp/memory.h>
|
| 30 |
+
#include <thrust/system/cpp/memory.h>
|
| 31 |
+
|
| 32 |
+
#include <limits>
|
| 33 |
+
|
| 34 |
+
THRUST_NAMESPACE_BEGIN
|
| 35 |
+
namespace system
|
| 36 |
+
{
|
| 37 |
+
namespace omp
|
| 38 |
+
{
|
| 39 |
+
namespace detail
|
| 40 |
+
{
|
| 41 |
+
|
| 42 |
+
// XXX circular #inclusion problems cause the compiler to believe that cpp::malloc
|
| 43 |
+
// is not defined
|
| 44 |
+
// WAR the problem by using adl to call cpp::malloc, which requires it to depend
|
| 45 |
+
// on a template parameter
|
| 46 |
+
template<typename Tag>
|
| 47 |
+
pointer<void> malloc_workaround(Tag t, std::size_t n)
|
| 48 |
+
{
|
| 49 |
+
return pointer<void>(malloc(t, n));
|
| 50 |
+
} // end malloc_workaround()
|
| 51 |
+
|
| 52 |
+
// XXX circular #inclusion problems cause the compiler to believe that cpp::free
|
| 53 |
+
// is not defined
|
| 54 |
+
// WAR the problem by using adl to call cpp::free, which requires it to depend
|
| 55 |
+
// on a template parameter
|
| 56 |
+
template<typename Tag>
|
| 57 |
+
void free_workaround(Tag t, pointer<void> ptr)
|
| 58 |
+
{
|
| 59 |
+
free(t, ptr.get());
|
| 60 |
+
} // end free_workaround()
|
| 61 |
+
|
| 62 |
+
} // end detail
|
| 63 |
+
|
| 64 |
+
inline pointer<void> malloc(std::size_t n)
|
| 65 |
+
{
|
| 66 |
+
// XXX this is how we'd like to implement this function,
|
| 67 |
+
// if not for circular #inclusion problems:
|
| 68 |
+
//
|
| 69 |
+
// return pointer<void>(thrust::system::cpp::malloc(n))
|
| 70 |
+
//
|
| 71 |
+
return detail::malloc_workaround(cpp::tag(), n);
|
| 72 |
+
} // end malloc()
|
| 73 |
+
|
| 74 |
+
template<typename T>
|
| 75 |
+
pointer<T> malloc(std::size_t n)
|
| 76 |
+
{
|
| 77 |
+
pointer<void> raw_ptr = thrust::system::omp::malloc(sizeof(T) * n);
|
| 78 |
+
return pointer<T>(reinterpret_cast<T*>(raw_ptr.get()));
|
| 79 |
+
} // end malloc()
|
| 80 |
+
|
| 81 |
+
inline void free(pointer<void> ptr)
|
| 82 |
+
{
|
| 83 |
+
// XXX this is how we'd like to implement this function,
|
| 84 |
+
// if not for circular #inclusion problems:
|
| 85 |
+
//
|
| 86 |
+
// thrust::system::cpp::free(ptr)
|
| 87 |
+
//
|
| 88 |
+
detail::free_workaround(cpp::tag(), ptr);
|
| 89 |
+
} // end free()
|
| 90 |
+
|
| 91 |
+
} // end omp
|
| 92 |
+
} // end system
|
| 93 |
+
THRUST_NAMESPACE_END
|
| 94 |
+
|
miniCUDA124/include/thrust/system/omp/detail/merge.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits merge
|
| 30 |
+
#include <thrust/system/cpp/detail/merge.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/mismatch.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits mismatch
|
| 30 |
+
#include <thrust/system/cpp/detail/mismatch.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/par.h
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2018 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#pragma once
|
| 18 |
+
|
| 19 |
+
#include <thrust/detail/config.h>
|
| 20 |
+
|
| 21 |
+
#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/allocator_aware_execution_policy.h>
|
| 29 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 30 |
+
|
| 31 |
+
THRUST_NAMESPACE_BEGIN
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
namespace omp
|
| 35 |
+
{
|
| 36 |
+
namespace detail
|
| 37 |
+
{
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
struct par_t : thrust::system::omp::detail::execution_policy<par_t>,
|
| 41 |
+
thrust::detail::allocator_aware_execution_policy<
|
| 42 |
+
thrust::system::omp::detail::execution_policy>
|
| 43 |
+
{
|
| 44 |
+
__host__ __device__
|
| 45 |
+
constexpr par_t() : thrust::system::omp::detail::execution_policy<par_t>() {}
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
} // end detail
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
static const detail::par_t par;
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
} // end omp
|
| 56 |
+
} // end system
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
// alias par here
|
| 60 |
+
namespace omp
|
| 61 |
+
{
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
using thrust::system::omp::par;
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
} // end omp
|
| 68 |
+
THRUST_NAMESPACE_END
|
| 69 |
+
|
miniCUDA124/include/thrust/system/omp/detail/partition.h
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file reduce.h
|
| 19 |
+
* \brief OpenMP implementation of reduce algorithms.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 34 |
+
#include <thrust/pair.h>
|
| 35 |
+
|
| 36 |
+
THRUST_NAMESPACE_BEGIN
|
| 37 |
+
namespace system
|
| 38 |
+
{
|
| 39 |
+
namespace omp
|
| 40 |
+
{
|
| 41 |
+
namespace detail
|
| 42 |
+
{
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
template<typename DerivedPolicy,
|
| 46 |
+
typename ForwardIterator,
|
| 47 |
+
typename Predicate>
|
| 48 |
+
ForwardIterator stable_partition(execution_policy<DerivedPolicy> &exec,
|
| 49 |
+
ForwardIterator first,
|
| 50 |
+
ForwardIterator last,
|
| 51 |
+
Predicate pred);
|
| 52 |
+
|
| 53 |
+
template<typename DerivedPolicy,
|
| 54 |
+
typename ForwardIterator,
|
| 55 |
+
typename InputIterator,
|
| 56 |
+
typename Predicate>
|
| 57 |
+
ForwardIterator stable_partition(execution_policy<DerivedPolicy> &exec,
|
| 58 |
+
ForwardIterator first,
|
| 59 |
+
ForwardIterator last,
|
| 60 |
+
InputIterator stencil,
|
| 61 |
+
Predicate pred);
|
| 62 |
+
|
| 63 |
+
template<typename DerivedPolicy,
|
| 64 |
+
typename InputIterator,
|
| 65 |
+
typename OutputIterator1,
|
| 66 |
+
typename OutputIterator2,
|
| 67 |
+
typename Predicate>
|
| 68 |
+
thrust::pair<OutputIterator1,OutputIterator2>
|
| 69 |
+
stable_partition_copy(execution_policy<DerivedPolicy> &exec,
|
| 70 |
+
InputIterator first,
|
| 71 |
+
InputIterator last,
|
| 72 |
+
OutputIterator1 out_true,
|
| 73 |
+
OutputIterator2 out_false,
|
| 74 |
+
Predicate pred);
|
| 75 |
+
|
| 76 |
+
template<typename DerivedPolicy,
|
| 77 |
+
typename InputIterator1,
|
| 78 |
+
typename InputIterator2,
|
| 79 |
+
typename OutputIterator1,
|
| 80 |
+
typename OutputIterator2,
|
| 81 |
+
typename Predicate>
|
| 82 |
+
thrust::pair<OutputIterator1,OutputIterator2>
|
| 83 |
+
stable_partition_copy(execution_policy<DerivedPolicy> &exec,
|
| 84 |
+
InputIterator1 first,
|
| 85 |
+
InputIterator1 last,
|
| 86 |
+
InputIterator2 stencil,
|
| 87 |
+
OutputIterator1 out_true,
|
| 88 |
+
OutputIterator2 out_false,
|
| 89 |
+
Predicate pred);
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
} // end namespace detail
|
| 93 |
+
} // end namespace omp
|
| 94 |
+
} // end namespace system
|
| 95 |
+
THRUST_NAMESPACE_END
|
| 96 |
+
|
| 97 |
+
#include <thrust/system/omp/detail/partition.inl>
|
| 98 |
+
|
miniCUDA124/include/thrust/system/omp/detail/partition.inl
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file reduce.h
|
| 19 |
+
* \brief OpenMP implementation of reduce algorithms.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/omp/detail/partition.h>
|
| 34 |
+
#include <thrust/system/detail/generic/partition.h>
|
| 35 |
+
|
| 36 |
+
THRUST_NAMESPACE_BEGIN
|
| 37 |
+
namespace system
|
| 38 |
+
{
|
| 39 |
+
namespace omp
|
| 40 |
+
{
|
| 41 |
+
namespace detail
|
| 42 |
+
{
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
template<typename DerivedPolicy,
|
| 46 |
+
typename ForwardIterator,
|
| 47 |
+
typename Predicate>
|
| 48 |
+
ForwardIterator stable_partition(execution_policy<DerivedPolicy> &exec,
|
| 49 |
+
ForwardIterator first,
|
| 50 |
+
ForwardIterator last,
|
| 51 |
+
Predicate pred)
|
| 52 |
+
{
|
| 53 |
+
// omp prefers generic::stable_partition to cpp::stable_partition
|
| 54 |
+
return thrust::system::detail::generic::stable_partition(exec, first, last, pred);
|
| 55 |
+
} // end stable_partition()
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
template<typename DerivedPolicy,
|
| 59 |
+
typename ForwardIterator,
|
| 60 |
+
typename InputIterator,
|
| 61 |
+
typename Predicate>
|
| 62 |
+
ForwardIterator stable_partition(execution_policy<DerivedPolicy> &exec,
|
| 63 |
+
ForwardIterator first,
|
| 64 |
+
ForwardIterator last,
|
| 65 |
+
InputIterator stencil,
|
| 66 |
+
Predicate pred)
|
| 67 |
+
{
|
| 68 |
+
// omp prefers generic::stable_partition to cpp::stable_partition
|
| 69 |
+
return thrust::system::detail::generic::stable_partition(exec, first, last, stencil, pred);
|
| 70 |
+
} // end stable_partition()
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
template<typename DerivedPolicy,
|
| 74 |
+
typename InputIterator,
|
| 75 |
+
typename OutputIterator1,
|
| 76 |
+
typename OutputIterator2,
|
| 77 |
+
typename Predicate>
|
| 78 |
+
thrust::pair<OutputIterator1,OutputIterator2>
|
| 79 |
+
stable_partition_copy(execution_policy<DerivedPolicy> &exec,
|
| 80 |
+
InputIterator first,
|
| 81 |
+
InputIterator last,
|
| 82 |
+
OutputIterator1 out_true,
|
| 83 |
+
OutputIterator2 out_false,
|
| 84 |
+
Predicate pred)
|
| 85 |
+
{
|
| 86 |
+
// omp prefers generic::stable_partition_copy to cpp::stable_partition_copy
|
| 87 |
+
return thrust::system::detail::generic::stable_partition_copy(exec, first, last, out_true, out_false, pred);
|
| 88 |
+
} // end stable_partition_copy()
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
template<typename DerivedPolicy,
|
| 92 |
+
typename InputIterator1,
|
| 93 |
+
typename InputIterator2,
|
| 94 |
+
typename OutputIterator1,
|
| 95 |
+
typename OutputIterator2,
|
| 96 |
+
typename Predicate>
|
| 97 |
+
thrust::pair<OutputIterator1,OutputIterator2>
|
| 98 |
+
stable_partition_copy(execution_policy<DerivedPolicy> &exec,
|
| 99 |
+
InputIterator1 first,
|
| 100 |
+
InputIterator1 last,
|
| 101 |
+
InputIterator2 stencil,
|
| 102 |
+
OutputIterator1 out_true,
|
| 103 |
+
OutputIterator2 out_false,
|
| 104 |
+
Predicate pred)
|
| 105 |
+
{
|
| 106 |
+
// omp prefers generic::stable_partition_copy to cpp::stable_partition_copy
|
| 107 |
+
return thrust::system::detail::generic::stable_partition_copy(exec, first, last, stencil, out_true, out_false, pred);
|
| 108 |
+
} // end stable_partition_copy()
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
} // end namespace detail
|
| 112 |
+
} // end namespace omp
|
| 113 |
+
} // end namespace system
|
| 114 |
+
THRUST_NAMESPACE_END
|
| 115 |
+
|
miniCUDA124/include/thrust/system/omp/detail/per_device_resource.h
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 30 |
+
|
miniCUDA124/include/thrust/system/omp/detail/pragma_omp.h
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/******************************************************************************
|
| 2 |
+
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 3 |
+
*
|
| 4 |
+
* Redistribution and use in source and binary forms, with or without
|
| 5 |
+
* modification, are permitted provided that the following conditions are met:
|
| 6 |
+
* * Redistributions of source code must retain the above copyright
|
| 7 |
+
* notice, this list of conditions and the following disclaimer.
|
| 8 |
+
* * Redistributions in binary form must reproduce the above copyright
|
| 9 |
+
* notice, this list of conditions and the following disclaimer in the
|
| 10 |
+
* documentation and/or other materials provided with the distribution.
|
| 11 |
+
* * Neither the name of the NVIDIA CORPORATION nor the
|
| 12 |
+
* names of its contributors may be used to endorse or promote products
|
| 13 |
+
* derived from this software without specific prior written permission.
|
| 14 |
+
*
|
| 15 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 16 |
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 17 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 18 |
+
* ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
|
| 19 |
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 20 |
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 21 |
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
| 22 |
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 23 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| 24 |
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 25 |
+
*
|
| 26 |
+
******************************************************************************/
|
| 27 |
+
|
| 28 |
+
#pragma once
|
| 29 |
+
|
| 30 |
+
#include <thrust/detail/config.h>
|
| 31 |
+
|
| 32 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 33 |
+
# pragma GCC system_header
|
| 34 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 35 |
+
# pragma clang system_header
|
| 36 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 37 |
+
# pragma system_header
|
| 38 |
+
#endif // no system header
|
| 39 |
+
|
| 40 |
+
#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC
|
| 41 |
+
// MSVC ICEs when using the standard C++11 `_Pragma` operator with OpenMP
|
| 42 |
+
// directives.
|
| 43 |
+
// WAR this by using the MSVC-extension `__pragma`. See this link for more info:
|
| 44 |
+
// https://developercommunity.visualstudio.com/t/Using-C11s-_Pragma-with-OpenMP-dire/1590628
|
| 45 |
+
#define THRUST_PRAGMA_OMP_IMPL(directive) __pragma(directive)
|
| 46 |
+
#else // Not MSVC:
|
| 47 |
+
#define THRUST_PRAGMA_OMP_IMPL(directive) _Pragma(#directive)
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
// For internal use only -- THRUST_PRAGMA_OMP is used to switch between
|
| 51 |
+
// different flavors of openmp pragmas. Pragmas are not emitted when OpenMP is
|
| 52 |
+
// not available.
|
| 53 |
+
//
|
| 54 |
+
// Usage:
|
| 55 |
+
// Replace: #pragma omp parallel for
|
| 56 |
+
// With : THRUST_PRAGMA_OMP(parallel for)
|
| 57 |
+
//
|
| 58 |
+
#if defined(_NVHPC_STDPAR_OPENMP) && _NVHPC_STDPAR_OPENMP == 1
|
| 59 |
+
#define THRUST_PRAGMA_OMP(directive) THRUST_PRAGMA_OMP_IMPL(omp_stdpar directive)
|
| 60 |
+
#elif defined(_OPENMP)
|
| 61 |
+
#define THRUST_PRAGMA_OMP(directive) THRUST_PRAGMA_OMP_IMPL(omp directive)
|
| 62 |
+
#else
|
| 63 |
+
#define THRUST_PRAGMA_OMP(directive)
|
| 64 |
+
#endif
|
miniCUDA124/include/thrust/system/omp/detail/reduce.h
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file reduce.h
|
| 19 |
+
* \brief OpenMP implementation of reduce algorithms.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 34 |
+
|
| 35 |
+
THRUST_NAMESPACE_BEGIN
|
| 36 |
+
namespace system
|
| 37 |
+
{
|
| 38 |
+
namespace omp
|
| 39 |
+
{
|
| 40 |
+
namespace detail
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
template<typename DerivedPolicy,
|
| 45 |
+
typename InputIterator,
|
| 46 |
+
typename OutputType,
|
| 47 |
+
typename BinaryFunction>
|
| 48 |
+
OutputType reduce(execution_policy<DerivedPolicy> &exec,
|
| 49 |
+
InputIterator first,
|
| 50 |
+
InputIterator last,
|
| 51 |
+
OutputType init,
|
| 52 |
+
BinaryFunction binary_op);
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
} // end namespace detail
|
| 56 |
+
} // end namespace omp
|
| 57 |
+
} // end namespace system
|
| 58 |
+
THRUST_NAMESPACE_END
|
| 59 |
+
|
| 60 |
+
#include <thrust/system/omp/detail/reduce.inl>
|
| 61 |
+
|
miniCUDA124/include/thrust/system/omp/detail/reduce.inl
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 |
+
#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/system/omp/detail/reduce.h>
|
| 30 |
+
#include <thrust/system/omp/detail/default_decomposition.h>
|
| 31 |
+
#include <thrust/system/omp/detail/reduce_intervals.h>
|
| 32 |
+
|
| 33 |
+
THRUST_NAMESPACE_BEGIN
|
| 34 |
+
namespace system
|
| 35 |
+
{
|
| 36 |
+
namespace omp
|
| 37 |
+
{
|
| 38 |
+
namespace detail
|
| 39 |
+
{
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
template<typename DerivedPolicy,
|
| 43 |
+
typename InputIterator,
|
| 44 |
+
typename OutputType,
|
| 45 |
+
typename BinaryFunction>
|
| 46 |
+
OutputType reduce(execution_policy<DerivedPolicy> &exec,
|
| 47 |
+
InputIterator first,
|
| 48 |
+
InputIterator last,
|
| 49 |
+
OutputType init,
|
| 50 |
+
BinaryFunction binary_op)
|
| 51 |
+
{
|
| 52 |
+
typedef typename thrust::iterator_difference<InputIterator>::type difference_type;
|
| 53 |
+
|
| 54 |
+
const difference_type n = thrust::distance(first,last);
|
| 55 |
+
|
| 56 |
+
// determine first and second level decomposition
|
| 57 |
+
thrust::system::detail::internal::uniform_decomposition<difference_type> decomp1 = thrust::system::omp::detail::default_decomposition(n);
|
| 58 |
+
thrust::system::detail::internal::uniform_decomposition<difference_type> decomp2(decomp1.size() + 1, 1, 1);
|
| 59 |
+
|
| 60 |
+
// allocate storage for the initializer and partial sums
|
| 61 |
+
// XXX use select_system for Tag
|
| 62 |
+
thrust::detail::temporary_array<OutputType,DerivedPolicy> partial_sums(exec, decomp1.size() + 1);
|
| 63 |
+
|
| 64 |
+
// set first element of temp array to init
|
| 65 |
+
partial_sums[0] = init;
|
| 66 |
+
|
| 67 |
+
// accumulate partial sums (first level reduction)
|
| 68 |
+
thrust::system::omp::detail::reduce_intervals(exec, first, partial_sums.begin() + 1, binary_op, decomp1);
|
| 69 |
+
|
| 70 |
+
// reduce partial sums (second level reduction)
|
| 71 |
+
thrust::system::omp::detail::reduce_intervals(exec, partial_sums.begin(), partial_sums.begin(), binary_op, decomp2);
|
| 72 |
+
|
| 73 |
+
return partial_sums[0];
|
| 74 |
+
} // end reduce()
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
} // end detail
|
| 78 |
+
} // end omp
|
| 79 |
+
} // end system
|
| 80 |
+
THRUST_NAMESPACE_END
|
| 81 |
+
|
miniCUDA124/include/thrust/system/omp/detail/reduce_by_key.h
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file reduce.h
|
| 19 |
+
* \brief OpenMP implementation of reduce algorithms.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 34 |
+
|
| 35 |
+
THRUST_NAMESPACE_BEGIN
|
| 36 |
+
namespace system
|
| 37 |
+
{
|
| 38 |
+
namespace omp
|
| 39 |
+
{
|
| 40 |
+
namespace detail
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
template <typename DerivedPolicy,
|
| 45 |
+
typename InputIterator1,
|
| 46 |
+
typename InputIterator2,
|
| 47 |
+
typename OutputIterator1,
|
| 48 |
+
typename OutputIterator2,
|
| 49 |
+
typename BinaryPredicate,
|
| 50 |
+
typename BinaryFunction>
|
| 51 |
+
thrust::pair<OutputIterator1,OutputIterator2>
|
| 52 |
+
reduce_by_key(execution_policy<DerivedPolicy> &exec,
|
| 53 |
+
InputIterator1 keys_first,
|
| 54 |
+
InputIterator1 keys_last,
|
| 55 |
+
InputIterator2 values_first,
|
| 56 |
+
OutputIterator1 keys_output,
|
| 57 |
+
OutputIterator2 values_output,
|
| 58 |
+
BinaryPredicate binary_pred,
|
| 59 |
+
BinaryFunction binary_op);
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
} // end namespace detail
|
| 63 |
+
} // end namespace omp
|
| 64 |
+
} // end namespace system
|
| 65 |
+
THRUST_NAMESPACE_END
|
| 66 |
+
|
| 67 |
+
#include <thrust/system/omp/detail/reduce_by_key.inl>
|
| 68 |
+
|
miniCUDA124/include/thrust/system/omp/detail/reduce_by_key.inl
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/reduce_by_key.h>
|
| 29 |
+
#include <thrust/system/detail/generic/reduce_by_key.h>
|
| 30 |
+
#include <thrust/distance.h>
|
| 31 |
+
|
| 32 |
+
THRUST_NAMESPACE_BEGIN
|
| 33 |
+
namespace system
|
| 34 |
+
{
|
| 35 |
+
namespace omp
|
| 36 |
+
{
|
| 37 |
+
namespace detail
|
| 38 |
+
{
|
| 39 |
+
|
| 40 |
+
template <typename DerivedPolicy,
|
| 41 |
+
typename InputIterator1,
|
| 42 |
+
typename InputIterator2,
|
| 43 |
+
typename OutputIterator1,
|
| 44 |
+
typename OutputIterator2,
|
| 45 |
+
typename BinaryPredicate,
|
| 46 |
+
typename BinaryFunction>
|
| 47 |
+
thrust::pair<OutputIterator1,OutputIterator2>
|
| 48 |
+
reduce_by_key(execution_policy<DerivedPolicy> &exec,
|
| 49 |
+
InputIterator1 keys_first,
|
| 50 |
+
InputIterator1 keys_last,
|
| 51 |
+
InputIterator2 values_first,
|
| 52 |
+
OutputIterator1 keys_output,
|
| 53 |
+
OutputIterator2 values_output,
|
| 54 |
+
BinaryPredicate binary_pred,
|
| 55 |
+
BinaryFunction binary_op)
|
| 56 |
+
{
|
| 57 |
+
// omp prefers generic::reduce_by_key to cpp::reduce_by_key
|
| 58 |
+
return thrust::system::detail::generic::reduce_by_key(exec, keys_first, keys_last, values_first, keys_output, values_output, binary_pred, binary_op);
|
| 59 |
+
} // end reduce_by_key()
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
} // end detail
|
| 63 |
+
} // end omp
|
| 64 |
+
} // end system
|
| 65 |
+
THRUST_NAMESPACE_END
|
| 66 |
+
|
miniCUDA124/include/thrust/system/omp/detail/reduce_intervals.h
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/*! \file reduce_intervals.h
|
| 19 |
+
* \brief OpenMP implementations of reduce_intervals algorithms.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#pragma once
|
| 23 |
+
|
| 24 |
+
#include <thrust/detail/config.h>
|
| 25 |
+
|
| 26 |
+
#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
|
| 27 |
+
# pragma GCC system_header
|
| 28 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
|
| 29 |
+
# pragma clang system_header
|
| 30 |
+
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
|
| 31 |
+
# pragma system_header
|
| 32 |
+
#endif // no system header
|
| 33 |
+
#include <thrust/system/omp/detail/execution_policy.h>
|
| 34 |
+
|
| 35 |
+
THRUST_NAMESPACE_BEGIN
|
| 36 |
+
namespace system
|
| 37 |
+
{
|
| 38 |
+
namespace omp
|
| 39 |
+
{
|
| 40 |
+
namespace detail
|
| 41 |
+
{
|
| 42 |
+
|
| 43 |
+
template <typename DerivedPolicy,
|
| 44 |
+
typename InputIterator,
|
| 45 |
+
typename OutputIterator,
|
| 46 |
+
typename BinaryFunction,
|
| 47 |
+
typename Decomposition>
|
| 48 |
+
void reduce_intervals(execution_policy<DerivedPolicy> &exec,
|
| 49 |
+
InputIterator input,
|
| 50 |
+
OutputIterator output,
|
| 51 |
+
BinaryFunction binary_op,
|
| 52 |
+
Decomposition decomp);
|
| 53 |
+
|
| 54 |
+
} // end namespace detail
|
| 55 |
+
} // end namespace omp
|
| 56 |
+
} // end namespace system
|
| 57 |
+
THRUST_NAMESPACE_END
|
| 58 |
+
|
| 59 |
+
#include <thrust/system/omp/detail/reduce_intervals.inl>
|
| 60 |
+
|
miniCUDA124/include/thrust/system/omp/detail/reduce_intervals.inl
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/reduce_intervals.h>
|
| 29 |
+
#include <thrust/iterator/iterator_traits.h>
|
| 30 |
+
#include <thrust/detail/function.h>
|
| 31 |
+
#include <thrust/detail/cstdint.h>
|
| 32 |
+
|
| 33 |
+
THRUST_NAMESPACE_BEGIN
|
| 34 |
+
namespace system
|
| 35 |
+
{
|
| 36 |
+
namespace omp
|
| 37 |
+
{
|
| 38 |
+
namespace detail
|
| 39 |
+
{
|
| 40 |
+
|
| 41 |
+
template <typename DerivedPolicy,
|
| 42 |
+
typename InputIterator,
|
| 43 |
+
typename OutputIterator,
|
| 44 |
+
typename BinaryFunction,
|
| 45 |
+
typename Decomposition>
|
| 46 |
+
void reduce_intervals(execution_policy<DerivedPolicy> &,
|
| 47 |
+
InputIterator input,
|
| 48 |
+
OutputIterator output,
|
| 49 |
+
BinaryFunction binary_op,
|
| 50 |
+
Decomposition decomp)
|
| 51 |
+
{
|
| 52 |
+
// we're attempting to launch an omp kernel, assert we're compiling with omp support
|
| 53 |
+
// ========================================================================
|
| 54 |
+
// X Note to the user: If you've found this line due to a compiler error, X
|
| 55 |
+
// X you need to enable OpenMP support in your compiler. X
|
| 56 |
+
// ========================================================================
|
| 57 |
+
THRUST_STATIC_ASSERT_MSG(
|
| 58 |
+
(thrust::detail::depend_on_instantiation<
|
| 59 |
+
InputIterator, (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE)
|
| 60 |
+
>::value)
|
| 61 |
+
, "OpenMP compiler support is not enabled"
|
| 62 |
+
);
|
| 63 |
+
|
| 64 |
+
#if (THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE == THRUST_TRUE)
|
| 65 |
+
typedef typename thrust::iterator_value<OutputIterator>::type OutputType;
|
| 66 |
+
|
| 67 |
+
// wrap binary_op
|
| 68 |
+
thrust::detail::wrapped_function<BinaryFunction,OutputType> wrapped_binary_op(binary_op);
|
| 69 |
+
|
| 70 |
+
typedef thrust::detail::intptr_t index_type;
|
| 71 |
+
|
| 72 |
+
index_type n = static_cast<index_type>(decomp.size());
|
| 73 |
+
|
| 74 |
+
THRUST_PRAGMA_OMP(parallel for)
|
| 75 |
+
for(index_type i = 0; i < n; i++)
|
| 76 |
+
{
|
| 77 |
+
InputIterator begin = input + decomp[i].begin();
|
| 78 |
+
InputIterator end = input + decomp[i].end();
|
| 79 |
+
|
| 80 |
+
if (begin != end)
|
| 81 |
+
{
|
| 82 |
+
OutputType sum = thrust::raw_reference_cast(*begin);
|
| 83 |
+
|
| 84 |
+
++begin;
|
| 85 |
+
|
| 86 |
+
while (begin != end)
|
| 87 |
+
{
|
| 88 |
+
sum = wrapped_binary_op(sum, *begin);
|
| 89 |
+
++begin;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
OutputIterator tmp = output + i;
|
| 93 |
+
*tmp = sum;
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
#endif // THRUST_DEVICE_COMPILER_IS_OMP_CAPABLE
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
} // end namespace detail
|
| 100 |
+
} // end namespace omp
|
| 101 |
+
} // end namespace system
|
| 102 |
+
THRUST_NAMESPACE_END
|
| 103 |
+
|
miniCUDA124/include/thrust/system/omp/detail/remove.h
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/system/omp/detail/execution_policy.h>
|
| 29 |
+
|
| 30 |
+
THRUST_NAMESPACE_BEGIN
|
| 31 |
+
namespace system
|
| 32 |
+
{
|
| 33 |
+
namespace omp
|
| 34 |
+
{
|
| 35 |
+
namespace detail
|
| 36 |
+
{
|
| 37 |
+
|
| 38 |
+
template<typename DerivedPolicy,
|
| 39 |
+
typename ForwardIterator,
|
| 40 |
+
typename Predicate>
|
| 41 |
+
ForwardIterator remove_if(execution_policy<DerivedPolicy> &exec,
|
| 42 |
+
ForwardIterator first,
|
| 43 |
+
ForwardIterator last,
|
| 44 |
+
Predicate pred);
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
template<typename DerivedPolicy,
|
| 48 |
+
typename ForwardIterator,
|
| 49 |
+
typename InputIterator,
|
| 50 |
+
typename Predicate>
|
| 51 |
+
ForwardIterator remove_if(execution_policy<DerivedPolicy> &exec,
|
| 52 |
+
ForwardIterator first,
|
| 53 |
+
ForwardIterator last,
|
| 54 |
+
InputIterator stencil,
|
| 55 |
+
Predicate pred);
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
template<typename DerivedPolicy,
|
| 59 |
+
typename InputIterator,
|
| 60 |
+
typename OutputIterator,
|
| 61 |
+
typename Predicate>
|
| 62 |
+
OutputIterator remove_copy_if(execution_policy<DerivedPolicy> &exec,
|
| 63 |
+
InputIterator first,
|
| 64 |
+
InputIterator last,
|
| 65 |
+
OutputIterator result,
|
| 66 |
+
Predicate pred);
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
template<typename DerivedPolicy,
|
| 70 |
+
typename InputIterator1,
|
| 71 |
+
typename InputIterator2,
|
| 72 |
+
typename OutputIterator,
|
| 73 |
+
typename Predicate>
|
| 74 |
+
OutputIterator remove_copy_if(execution_policy<DerivedPolicy> &exec,
|
| 75 |
+
InputIterator1 first,
|
| 76 |
+
InputIterator1 last,
|
| 77 |
+
InputIterator2 stencil,
|
| 78 |
+
OutputIterator result,
|
| 79 |
+
Predicate pred);
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
} // end namespace detail
|
| 83 |
+
} // end namespace omp
|
| 84 |
+
} // end namespace system
|
| 85 |
+
THRUST_NAMESPACE_END
|
| 86 |
+
|
| 87 |
+
#include <thrust/system/omp/detail/remove.inl>
|
| 88 |
+
|
miniCUDA124/include/thrust/system/omp/detail/remove.inl
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2008-2013 NVIDIA Corporation
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#pragma once
|
| 18 |
+
|
| 19 |
+
#include <thrust/detail/config.h>
|
| 20 |
+
|
| 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/system/omp/detail/remove.h>
|
| 29 |
+
#include <thrust/system/detail/generic/remove.h>
|
| 30 |
+
|
| 31 |
+
THRUST_NAMESPACE_BEGIN
|
| 32 |
+
namespace system
|
| 33 |
+
{
|
| 34 |
+
namespace omp
|
| 35 |
+
{
|
| 36 |
+
namespace detail
|
| 37 |
+
{
|
| 38 |
+
|
| 39 |
+
template<typename DerivedPolicy,
|
| 40 |
+
typename ForwardIterator,
|
| 41 |
+
typename Predicate>
|
| 42 |
+
ForwardIterator remove_if(execution_policy<DerivedPolicy> &exec,
|
| 43 |
+
ForwardIterator first,
|
| 44 |
+
ForwardIterator last,
|
| 45 |
+
Predicate pred)
|
| 46 |
+
{
|
| 47 |
+
// omp prefers generic::remove_if to cpp::remove_if
|
| 48 |
+
return thrust::system::detail::generic::remove_if(exec, first, last, pred);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
template<typename DerivedPolicy,
|
| 53 |
+
typename ForwardIterator,
|
| 54 |
+
typename InputIterator,
|
| 55 |
+
typename Predicate>
|
| 56 |
+
ForwardIterator remove_if(execution_policy<DerivedPolicy> &exec,
|
| 57 |
+
ForwardIterator first,
|
| 58 |
+
ForwardIterator last,
|
| 59 |
+
InputIterator stencil,
|
| 60 |
+
Predicate pred)
|
| 61 |
+
{
|
| 62 |
+
// omp prefers generic::remove_if to cpp::remove_if
|
| 63 |
+
return thrust::system::detail::generic::remove_if(exec, first, last, stencil, pred);
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
template<typename DerivedPolicy,
|
| 68 |
+
typename InputIterator,
|
| 69 |
+
typename OutputIterator,
|
| 70 |
+
typename Predicate>
|
| 71 |
+
OutputIterator remove_copy_if(execution_policy<DerivedPolicy> &exec,
|
| 72 |
+
InputIterator first,
|
| 73 |
+
InputIterator last,
|
| 74 |
+
OutputIterator result,
|
| 75 |
+
Predicate pred)
|
| 76 |
+
{
|
| 77 |
+
// omp prefers generic::remove_copy_if to cpp::remove_copy_if
|
| 78 |
+
return thrust::system::detail::generic::remove_copy_if(exec, first, last, result, pred);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
template<typename DerivedPolicy,
|
| 82 |
+
typename InputIterator1,
|
| 83 |
+
typename InputIterator2,
|
| 84 |
+
typename OutputIterator,
|
| 85 |
+
typename Predicate>
|
| 86 |
+
OutputIterator remove_copy_if(execution_policy<DerivedPolicy> &exec,
|
| 87 |
+
InputIterator1 first,
|
| 88 |
+
InputIterator1 last,
|
| 89 |
+
InputIterator2 stencil,
|
| 90 |
+
OutputIterator result,
|
| 91 |
+
Predicate pred)
|
| 92 |
+
{
|
| 93 |
+
// omp prefers generic::remove_copy_if to cpp::remove_copy_if
|
| 94 |
+
return thrust::system::detail::generic::remove_copy_if(exec, first, last, stencil, result, pred);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
} // end namespace detail
|
| 98 |
+
} // end namespace omp
|
| 99 |
+
} // end namespace system
|
| 100 |
+
THRUST_NAMESPACE_END
|
| 101 |
+
|
miniCUDA124/include/thrust/system/omp/detail/replace.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits this algorithm
|
| 30 |
+
#include <thrust/system/cpp/detail/scatter.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/reverse.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits reverse
|
| 30 |
+
#include <thrust/system/cpp/detail/reverse.h>
|
| 31 |
+
|
miniCUDA124/include/thrust/system/omp/detail/scan.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 inherits scan
|
| 30 |
+
#include <thrust/system/cpp/detail/scan.h>
|
| 31 |
+
|