tensorflow/core/common_runtime/copy_tensor.cc
// The following registrations enable a DT_VARIANT tensor element that contains
// a wrapped `tensorflow::Tensor` to be copied between devices.
The following registrations enable a DT_VARIANT tensor element that contains
a wrapped `tensorflow::Tensor` to be copied between devices.
The following registrations enable a DT_VARIANT tensor element that contains a wrapped ` tensorflow :: Tensor ` to be copied between devices .
static Status WrappedTensorDeviceCopy(
    const Tensor& from, Tensor* to,
    const UnaryVariantOpRegistry::AsyncTensorDeviceCopyFn& copy) {
  if (DMAHelper::CanUseDMA(&from)) {
    TF_RETURN_IF_ERROR(copy(from, to));
  } else {
    *to = from;
  }
  return Status::OK();
}
static Status WrappedTensorDeviceCopy ( const Tensor & from , Tensor * to , const UnaryVariantOpRegistry :: AsyncTensorDeviceCopyFn & copy ) { if ( DMAHelper :: CanUseDMA ( & from ) ) { TF_RETURN_IF_ERROR ( copy ( from , to ) ) ; } else { * to = from ; } return Status :: OK ( ) ; }
The following registrations enable a DT_VARIANT tensor element that contains
a wrapped `tensorflow::Tensor` to be copied between devices.
The following registrations enable a DT_VARIANT tensor element that contains a wrapped ` tensorflow :: Tensor ` to be copied between devices .