HIP: Heterogenous-computing Interface for Portability
Loading...
Searching...
No Matches
Bfloat162 Arithmetic Functions

Functions

__HOST_DEVICE__ __hip_bfloat162 __h2div (const __hip_bfloat162 a, const __hip_bfloat162 b)
 Divides bfloat162 values.
 
__HOST_DEVICE__ __hip_bfloat162 __habs2 (const __hip_bfloat162 a)
 Returns absolute of a bfloat162.
 
__HOST_DEVICE__ __hip_bfloat162 __hadd2 (const __hip_bfloat162 a, const __hip_bfloat162 b)
 Adds two bfloat162 values.
 
__device__ __hip_bfloat162 __hfma2 (const __hip_bfloat162 a, const __hip_bfloat162 b, const __hip_bfloat162 c)
 Performs FMA of given bfloat162 values.
 
__HOST_DEVICE__ __hip_bfloat162 __hmul2 (const __hip_bfloat162 a, const __hip_bfloat162 b)
 Multiplies two bfloat162 values.
 
__HOST_DEVICE__ __hip_bfloat162 __hneg2 (const __hip_bfloat162 a)
 Converts a bfloat162 into negative.
 
__HOST_DEVICE__ __hip_bfloat162 __hsub2 (const __hip_bfloat162 a, const __hip_bfloat162 b)
 Subtracts two bfloat162 values.
 
__HOST_DEVICE__ __hip_bfloat162 operator* (const __hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to multiply two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162operator*= (__hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to multiply-assign two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162 operator+ (const __hip_bfloat162 &l)
 Operator to unary+ on a __hip_bfloat162 number.
 
__HOST_DEVICE__ __hip_bfloat162 operator+ (const __hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to add two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162 operator- (const __hip_bfloat162 &l)
 Operator to negate a __hip_bfloat162 number.
 
__HOST_DEVICE__ __hip_bfloat162 operator- (const __hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to subtract two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162 operator++ (__hip_bfloat162 &l, const int)
 Operator to post increment a __hip_bfloat162 number.
 
__HOST_DEVICE__ __hip_bfloat162operator++ (__hip_bfloat162 &l)
 Operator to pre increment a __hip_bfloat162 number.
 
__HOST_DEVICE__ __hip_bfloat162 operator-- (__hip_bfloat162 &l, const int)
 Operator to post decrement a __hip_bfloat162 number.
 
__HOST_DEVICE__ __hip_bfloat162operator-- (__hip_bfloat162 &l)
 Operator to pre decrement a __hip_bfloat162 number.
 
__HOST_DEVICE__ __hip_bfloat162operator+= (__hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to add-assign two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162operator-= (__hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to subtract-assign two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162 operator/ (const __hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to divide two __hip_bfloat162 numbers.
 
__HOST_DEVICE__ __hip_bfloat162operator/= (__hip_bfloat162 &l, const __hip_bfloat162 &r)
 Operator to divide-assign two __hip_bfloat162 numbers.
 

Detailed Description

To use these functions, include the header file hip_bf16.h in your program.