DeNormMin
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
|
x |
Function Usage
Returns the minimum positive denormalized value of a specified data type.
For the Atlas 350 Accelerator Card, the supported data types are half, bfloat16_t, and float.
Prototype
- Scalar API, which returns a scalar.
constexpr __aicore__ static inline T DeNormMin()
- Vector API, which assigns the minimum positive denormalized value to the first count elements of dstLocal.
__aicore__ static inline void DeNormMin(const LocalTensor<T>& dstLocal, uint32_t count)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
dstLocal |
Output |
Destination operand. Parameter of the LocalTensor type. TPosition can be VECIN, VECCALC, or VECOUT. The start address of LocalTensor must be 32-byte aligned. |
count |
Input |
Number of elements of the input data. |
Returns
The scalar API returns the minimum positive denormalized value of the corresponding data type.
The vector API has no return value.
Restrictions
None
Example
- Scalar API
1float value = AscendC::NumericLimits<float>::DeNormMin();
- Vector API
1AscendC::NumericLimits<float>::DeNormMin(dstLocal, 256); // Return the minimum positive denormalized value for 256 elements of float.