@@ -68,29 +68,25 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
6868
6969 /* ! This constructor creates an empty \p device_vector.
7070 */
71- __host__
7271 device_vector (void )
7372 :Parent() {}
7473
7574 /* ! This constructor creates an empty \p device_vector.
7675 * \param alloc The allocator to use by this device_vector.
7776 */
78- __host__
7977 device_vector (const Alloc &alloc)
8078 :Parent(alloc) {}
8179
8280 /* ! The destructor erases the elements.
8381 */
8482 // Define an empty destructor to explicitly specify
8583 // its execution space qualifier, as a workaround for nvcc warning
86- __host__
8784 ~device_vector (void ) {}
8885
8986 /* ! This constructor creates a \p device_vector with the given
9087 * size.
9188 * \param n The number of elements to initially create.
9289 */
93- __host__
9490 explicit device_vector (size_type n)
9591 :Parent(n) {}
9692
@@ -99,7 +95,6 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
9995 * \param n The number of elements to initially create.
10096 * \param alloc The allocator to use by this device_vector.
10197 */
102- __host__
10398 explicit device_vector (size_type n, const Alloc &alloc)
10499 :Parent(n,alloc) {}
105100
@@ -108,7 +103,6 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
108103 * \param n The number of elements to initially create.
109104 * \param value An element to copy.
110105 */
111- __host__
112106 explicit device_vector (size_type n, const value_type &value)
113107 :Parent(n,value) {}
114108
@@ -118,54 +112,47 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
118112 * \param value An element to copy.
119113 * \param alloc The allocator to use by this device_vector.
120114 */
121- __host__
122115 explicit device_vector (size_type n, const value_type &value, const Alloc &alloc)
123116 :Parent(n,value,alloc) {}
124117
125118 /* ! Copy constructor copies from an exemplar \p device_vector.
126119 * \param v The \p device_vector to copy.
127120 */
128- __host__
129121 device_vector (const device_vector &v)
130122 :Parent(v) {}
131123
132124 /* ! Copy constructor copies from an exemplar \p device_vector.
133125 * \param v The \p device_vector to copy.
134126 * \param alloc The allocator to use by this device_vector.
135127 */
136- __host__
137128 device_vector (const device_vector &v, const Alloc &alloc)
138129 :Parent(v,alloc) {}
139130
140131 #if THRUST_CPP_DIALECT >= 2011
141132 /* ! Move constructor moves from another \p device_vector.
142133 * \param v The device_vector to move.
143134 */
144- __host__
145135 device_vector (device_vector &&v)
146136 :Parent(std::move(v)) {}
147137
148138 /* ! Move constructor moves from another \p device_vector.
149139 * \param v The device_vector to move.
150140 * \param alloc The allocator to use by this device_vector.
151141 */
152- __host__
153142 device_vector (device_vector &&v, const Alloc &alloc)
154143 :Parent(std::move(v), alloc) {}
155144 #endif // THRUST_CPP_DIALECT >= 2011
156145
157146 /* ! Copy assign operator copies another \p device_vector with the same type.
158147 * \param v The \p device_vector to copy.
159148 */
160- __host__
161149 device_vector &operator =(const device_vector &v)
162150 { Parent::operator =(v); return *this ; }
163151
164152 #if THRUST_CPP_DIALECT >= 2011
165153 /* ! Move assign operator moves from another \p device_vector.
166154 * \param v The device_vector to move.
167155 */
168- __host__
169156 device_vector &operator =(device_vector &&v)
170157 { Parent::operator =(std::move (v)); return *this ; }
171158 #endif // THRUST_CPP_DIALECT >= 2011
@@ -174,47 +161,40 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
174161 * \param v The \p device_vector to copy.
175162 */
176163 template <typename OtherT, typename OtherAlloc>
177- __host__ explicit
178- __device__
179- device_vector (const device_vector<OtherT,OtherAlloc> &v)
164+ explicit device_vector (const device_vector<OtherT,OtherAlloc> &v)
180165 :Parent(v) {}
181166
182167 /* ! Assign operator copies from an exemplar \p device_vector with different type.
183168 * \param v The \p device_vector to copy.
184169 */
185170 template <typename OtherT, typename OtherAlloc>
186- __host__
187171 device_vector &operator =(const device_vector<OtherT,OtherAlloc> &v)
188172 { Parent::operator =(v); return *this ; }
189173
190174 /* ! Copy constructor copies from an exemplar \c std::vector.
191175 * \param v The <tt>std::vector</tt> to copy.
192176 */
193177 template <typename OtherT, typename OtherAlloc>
194- __host__
195178 device_vector (const std::vector<OtherT,OtherAlloc> &v)
196179 :Parent(v) {}
197180
198181 /* ! Assign operator copies from an exemplar <tt>std::vector</tt>.
199182 * \param v The <tt>std::vector</tt> to copy.
200183 */
201184 template <typename OtherT, typename OtherAlloc>
202- __host__
203185 device_vector &operator =(const std::vector<OtherT,OtherAlloc> &v)
204186 { Parent::operator =(v); return *this ;}
205187
206188 /* ! Copy constructor copies from an exemplar \p host_vector with possibly different type.
207189 * \param v The \p host_vector to copy.
208190 */
209191 template <typename OtherT, typename OtherAlloc>
210- __host__
211192 device_vector (const host_vector<OtherT,OtherAlloc> &v);
212193
213194 /* ! Assign operator copies from an examplar \p host_vector.
214195 * \param v The \p host_vector to copy.
215196 */
216197 template <typename OtherT, typename OtherAlloc>
217- __host__
218198 device_vector &operator =(const host_vector<OtherT,OtherAlloc> &v)
219199 { Parent::operator =(v); return *this ; }
220200
@@ -223,7 +203,6 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
223203 * \param last The end of the range.
224204 */
225205 template <typename InputIterator>
226- __host__
227206 device_vector (InputIterator first, InputIterator last)
228207 :Parent(first,last) {}
229208
@@ -233,7 +212,6 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
233212 * \param alloc The allocator to use by this device_vector.
234213 */
235214 template <typename InputIterator>
236- __host__
237215 device_vector (InputIterator first, InputIterator last, const Alloc &alloc)
238216 :Parent(first,last,alloc) {}
239217
0 commit comments