Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit e398841

Browse files
committed
Fix some new and exciting exec_space [subobject] warnings.
1 parent bba7de4 commit e398841

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

thrust/device_allocator.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class device_allocator
115115
};
116116

117117
/*! Default constructor has no effect. */
118-
__host__
118+
__host__ __device__
119119
device_allocator() {}
120120

121121
/*! Copy constructor has no effect. */
@@ -124,15 +124,13 @@ class device_allocator
124124

125125
/*! Constructor from other \p device_allocator has no effect. */
126126
template<typename U>
127-
__host__
127+
__host__ __device__
128128
device_allocator(const device_allocator<U>& other) : base(other) {}
129129

130-
#if THRUST_CPP_DIALECT >= 2011
131130
device_allocator & operator=(const device_allocator &) = default;
132-
#endif
133131

134132
/*! Destructor has no effect. */
135-
__host__
133+
__host__ __device__
136134
~device_allocator() {}
137135
};
138136

thrust/mr/allocator.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class stateless_resource_allocator : public thrust::mr::allocator<T, Upstream>
219219
/*! Default constructor. Uses \p get_global_resource to get the global instance of \p Upstream and initializes the
220220
* \p allocator base subobject with that resource.
221221
*/
222-
__host__
222+
__thrust_exec_check_disable__
223+
__host__ __device__
223224
stateless_resource_allocator() : base(get_global_resource<Upstream>())
224225
{
225226
}

thrust/system/cuda/detail/par.h

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct execute_on_stream_base : execution_policy<Derived>
4848
cudaStream_t stream;
4949

5050
public:
51+
__thrust_exec_check_disable__
5152
__host__ __device__
5253
execute_on_stream_base(cudaStream_t stream_ = default_stream())
5354
: stream(stream_){}

0 commit comments

Comments
 (0)