| 85 | |
| 86 | template <typename S> |
| 87 | MGBTensor tensor_to_c(const TensorND<S>& src) { |
| 88 | MGBTensor ret; |
| 89 | ret.data = const_cast<void*>(static_cast<const void*>(src.raw_ptr())); |
| 90 | ret.layout.dtype = dtype_cpp2c(src.dtype()); |
| 91 | ret.layout.shape = ExternCOprRunner::tensor_shape_to_c(src.shape()); |
| 92 | return ret; |
| 93 | } |
| 94 | |
| 95 | struct MGBOprDescV23 { |
| 96 | size_t nr_input, nr_output; |
no test coverage detected