Image processing algorithms, tensor Add algorithm, supporting float16, float32, and uint8 data types. Asynchronous calling is supported.
It is supported by the Atlas inference product and
For the
The following conditions must be met:
ROIs can be reused only by APIs that support inplace. For details about the specified ROIs, see Tensor.
1 | APP_ERROR Add(const Tensor &src1, const Tensor &src2, Tensor &dst, AscendStream &stream = AscendStream::DefaultStream()); |
Parameter |
Input/Output |
Description |
|---|---|---|
src1 |
Input |
Tensor class, addend, input tensor, supporting float16, float32, and uint8 data types. |
src2 |
Input |
Tensor class, addend, input tensor, supporting float16, float32, and uint8 data types. |
dst |
Output |
Tensor class, output tensor, supporting float16, float32, and uint8 data types. An empty tensor can be passed. If dst is not an empty tensor, call Tensor.Malloc() to allocate memory in advance. |
stream |
Input |
AscendStream type. The default value is AscendStream::DefaultStream(). When the parameter value is the default value, the API calling is a synchronous operation. In other cases, the API calling is an asynchronous operation. |
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |