---
title: acltdtSendTensor
description: "发送预处理好的数据。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1614.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1614.html
indexId: d95ebdccb9dbaefcbc7a8fd5f0797ed2db3e89834b9f6ecbc7a9c613feb30a78105
---
# acltdtSendTensor

#### 函数功能

发送预处理好的数据。

Atlas 200/500 A2推理产品，不支持该接口。


#### 函数原型

aclError acltdtSendTensor(const acltdtChannelHandle *handle,

const acltdtDataset *dataset,

int32_t timeout)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| handle | 输入 | 指定通道。 需提前调用acltdtCreateChannel接口或acltdtCreateChannelWithCapacity接口创建acltdtChannelHandle类型的数据。 |
| dataset | 输入 | 向Device发送的数据的指针。 |
| timeout | 输入 | 等待超时时间。 该参数取值范围如下： \-1：阻塞方式，一直等待直到数据发送完成。 0：非阻塞方式，当通道满时，直接返回通道满这个错误，这时由用户自行设定重试间隔。 >0：配置具体的超时时间，单位为毫秒。通道满时，等待达到超时时间后返回报错。超时时间受操作系统影响，一般偏差在操作系统的一个时间片内，例如，操作系统的一个时间片为4ms，用户设置的超时时间为1ms，则实际的超时时间在1ms到5ms范围内。在CPU负载高场景下，超时时间仍可能存在波动。 |


#### 返回值说明

返回0表示成功，返回其它值表示失败。
