| 431 | } |
| 432 | |
| 433 | void TensorImplDft::copy_from_mge_tensor(const mgb::DeviceTensorND& dv) { |
| 434 | if (is_host()) { |
| 435 | auto src_cn = dv.comp_node(); |
| 436 | m_host_tensor->comp_node(src_cn, true); |
| 437 | m_host_tensor->copy_from(dv); |
| 438 | } else { |
| 439 | m_dev_tensor->copy_from(dv); |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | void TensorImplDft::set_reset_callback(const std::function<void(TensorImplDft*)>& cb) { |
| 444 | m_reset_callback = cb; |
no test coverage detected