Annotate thrust::get_temporary_buffer & thrust::return_temporary_buffer with __host__ __device__.