Use temporary_array instead of device_vector in these implementations.