1 /* 2 * Copyright 2008-2013 NVIDIA Corporation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 #include <thrust/detail/config.h> 20 #include <thrust/system/omp/detail/execution_policy.h> 21 #include <thrust/pair.h> 22 23 namespace thrust 24 { 25 namespace system 26 { 27 namespace omp 28 { 29 namespace detail 30 { 31 32 33 template<typename DerivedPolicy, 34 typename ForwardIterator1, 35 typename ForwardIterator2, 36 typename BinaryPredicate> 37 thrust::pair<ForwardIterator1,ForwardIterator2> 38 unique_by_key(execution_policy<DerivedPolicy> &exec, 39 ForwardIterator1 keys_first, 40 ForwardIterator1 keys_last, 41 ForwardIterator2 values_first, 42 BinaryPredicate binary_pred); 43 44 45 template<typename DerivedPolicy, 46 typename InputIterator1, 47 typename InputIterator2, 48 typename OutputIterator1, 49 typename OutputIterator2, 50 typename BinaryPredicate> 51 thrust::pair<OutputIterator1,OutputIterator2> 52 unique_by_key_copy(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 60 61 } // end namespace detail 62 } // end namespace omp 63 } // end namespace system 64 } // end namespace thrust 65 66 #include <thrust/system/omp/detail/unique_by_key.inl> 67 68