Skip to content

Commit d43f285

Browse files
committed
Remove __device__ from CUDA MR-based device allocators to fix obscure "host
function called from host device function" warning that occurs when you use the new Thrust MR-based allocators. Reviewed-by: Allison Vacanti <alliepiper16@gmail.com> Reviewed-by: Michał 'Griwes' Dominiak <griwes@griwes.info>
1 parent 12fee82 commit d43f285

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

thrust/system/cuda/memory.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ struct allocator
100100

101101
/*! No-argument constructor has no effect.
102102
*/
103-
__host__ __device__
103+
__host__
104104
inline allocator() {}
105105

106106
/*! Copy constructor has no effect.
107107
*/
108108
__host__ __device__
109-
inline allocator(const allocator & other) : base(other) {}
109+
inline allocator(const allocator & other) : base(other) {}
110110

111111
/*! Constructor from other \p allocator has no effect.
112112
*/

0 commit comments

Comments
 (0)