Constructor * * @param[in] shape Shape of the tensor * @param[in] data_type Data type of the tensor */
| 510 | * @param[in] data_type Data type of the tensor |
| 511 | */ |
| 512 | TensorDescriptor(const std::vector<int32_t> &shape, DataType data_type) : _shape(shape), _data_type(data_type) |
| 513 | { |
| 514 | _cdesc.ndims = _shape.size(); |
| 515 | _cdesc.shape = _shape.data(); |
| 516 | _cdesc.data_type = detail::as_cenum<AclDataType>(_data_type); |
| 517 | _cdesc.strides = nullptr; |
| 518 | _cdesc.boffset = 0; |
| 519 | } |
| 520 | /** Constructor |
| 521 | * |
| 522 | * @param[in] desc C-type descriptor |