/* * Copyright 2008-2012 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include #include #include #include namespace thrust { namespace detail { template class tagged_iterator; template struct tagged_iterator_base { typedef thrust::iterator_adaptor< tagged_iterator, Iterator, typename thrust::iterator_value::type, Tag, typename thrust::iterator_traversal::type, typename thrust::iterator_reference::type, typename thrust::iterator_difference::type > type; }; // end tagged_iterator_base template class tagged_iterator : public tagged_iterator_base::type { private: typedef typename tagged_iterator_base::type super_t; public: __host__ __device__ tagged_iterator(void) {} __host__ __device__ explicit tagged_iterator(Iterator x) : super_t(x) {} }; // end tagged_iterator // specialize is_trivial_iterator for tagged_iterator template struct is_trivial_iterator; // tagged_iterator is trivial if its base iterator is template struct is_trivial_iterator > : is_trivial_iterator {}; } // end detail } // end thrust