---
title: 公共定义
description: "```"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0007.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0007.html
indexId: f21e6b2fa7d1608899b787648cd14ec4a140d656a22c7188f07427de151551c364
---
# 公共定义

#### 定义

```
using Status = int32_t;
using ReshapeFunc = std::function< void(const Dims &oldShape, Dims &newShape)>;
using InferShapeFunc = std::function< Status(const SVector< TensorDesc > &inTensorDescs, SVector< TensorDesc > &outTensorDescs)>;
constexpr uint32_t MAX_DIM = 8;
```


#### 参数列表

| 常量名称 | 描述 |
| --- | --- |
| Status | 类型定义，用一系列状态值表示加速库中的返回值。 |
| ReshapeFunc | 类型定义，Reshape功能，改变Tensor的shape。 |
| InferShapeFunc | 类型定义，根据输入tensor信息推导输出tensor信息。 |
| MAX\_DIM | 变量，数据最大维度定义。 |
