* \brief check overlap of two tensors. throw exception when overlapped */
| 625 | * \brief check overlap of two tensors. throw exception when overlapped |
| 626 | */ |
| 627 | inline void check_overlapped( |
| 628 | const dt_byte* dst_min, const dt_byte* dst_max, const dt_byte* src_min, |
| 629 | const dt_byte* src_max) { |
| 630 | mgb_throw_if( |
| 631 | src_min < dst_max && dst_min < src_max, TensorCopyOverlapError, |
| 632 | "cound not perform copy between overlapped tensors"); |
| 633 | } |
| 634 | } // namespace |
| 635 | |
| 636 | template <class TensorStorage> |