| 33 | { |
| 34 | template <typename T> |
| 35 | SimpleTensor<T> flatten_layer(const SimpleTensor<T> &src, const TensorShape &shape_flatten) |
| 36 | { |
| 37 | SimpleTensor<T> dst(shape_flatten, src.data_type(), 1); |
| 38 | |
| 39 | // Note: Since the reference implementation does not use padding bytes, we can copy directly the content of the source tensor |
| 40 | std::copy(src.data(), src.data() + src.num_elements(), dst.data()); |
| 41 | |
| 42 | return dst; |
| 43 | } |
| 44 | |
| 45 | template SimpleTensor<float> flatten_layer(const SimpleTensor<float> &src, const TensorShape &shape_flatten); |
| 46 | template SimpleTensor<half> flatten_layer(const SimpleTensor<half> &src, const TensorShape &shape_flatten); |
nothing calls this directly
no test coverage detected