| 34 | namespace fastertransformer { |
| 35 | |
| 36 | Tensor::Tensor(): |
| 37 | // a none tensor. |
| 38 | where(MEMORY_CPU), |
| 39 | type(TYPE_INVALID), |
| 40 | shape({}), |
| 41 | data(nullptr), |
| 42 | offsets({}) // only a record to record offset |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | Tensor::Tensor(const MemoryType _where, const DataType _type, const std::vector<size_t> _shape, const void* _data): |
| 47 | where(_where), type(_type), shape(_shape), data(_data) |
no outgoing calls
no test coverage detected