MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DoCopy

Function DoCopy

tensorflow/core/kernels/inplace_ops.cc:421–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419
420template <>
421Status DoCopy(const CPUDevice& device, const Tensor& x, Tensor* y) {
422 CHECK_EQ(x.dtype(), y->dtype());
423 switch (x.dtype()) {
424#define CASE(type) \
425 case DataTypeToEnum<type>::value: \
426 y->flat<type>().device(device) = x.flat<type>(); \
427 break;
428
429 TF_CALL_NUMBER_TYPES(CASE);
430 TF_CALL_bool(CASE);
431 TF_CALL_tstring(CASE);
432#undef CASE
433 default:
434 return errors::InvalidArgument("Unsupported data type: ",
435 DataTypeString(x.dtype()));
436 }
437 return Status::OK();
438}
439
440} // end namespace functor
441

Callers 3

DoComputeMethod · 0.70
ComputeMethod · 0.70
ComputeMethod · 0.70

Calls 3

InvalidArgumentFunction · 0.85
DataTypeStringFunction · 0.50
dtypeMethod · 0.45

Tested by

no test coverage detected