| 736 | } |
| 737 | |
| 738 | const HostTensorND* Tensor::try_get_value() { |
| 739 | MGB_LOCK_GUARD(m_value_mtx); |
| 740 | if (!m_value.empty() && (!m_value_ready || m_value_ready->finished())) { |
| 741 | return &m_value; |
| 742 | } |
| 743 | return nullptr; |
| 744 | } |
| 745 | |
| 746 | TensorPtr Tensor::make_scalar(DTypeScalar value, CompNode cn) { |
| 747 | HostTensorND hv{cn, value.dtype()}; |
no test coverage detected