\brief assign the buffer to the tensor_2d \param buf the buffer to assign
| 33 | /// \brief assign the buffer to the tensor_2d |
| 34 | /// \param buf the buffer to assign |
| 35 | void assign(buffer<T> &buf){ |
| 36 | this->buf = &buf; |
| 37 | temp.resize(buf.size() / D); |
| 38 | for (uint32_t i = 0; i < temp.size(); i++){ |
| 39 | temp[i] = buffer<T>(buf.data() + i * D, D); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /// \brief clear the tensor_2d |
| 44 | void clear(){ |
no test coverage detected