63 else if (a == zero || b == zero || diff < nonzero_floor) {
64 return diff < epsilon * nonzero_floor;
67 return diff < epsilon * (abs_A + abs_B);
CUTLASS_HOST_DEVICE bool relatively_equal< int8_t >(int8_t a, int8_t b, int8_t, int8_t)
Definition: relatively_equal.h:94
CUTLASS_HOST_DEVICE bool relatively_equal< double >(double a, double b, double epsilon, double nonzero_floor)
Definition: relatively_equal.h:157
integer_subbyte< 4, false > uint4b_t
4-bit Unsigned integer type
Definition: integer_subbyte.h:158
Definition: aligned_buffer.h:35
CUTLASS_HOST_DEVICE T abs(complex< T > const &z)
Returns the magnitude of the complex number.
Definition: complex.h:313
integer_subbyte< 1, false > uint1b_t
1-bit Unsigned integer type
Definition: integer_subbyte.h:152
4-bit signed integer type
Definition: integer_subbyte.h:42
CUTLASS_HOST_DEVICE bool relatively_equal(T a, T b, T epsilon, T nonzero_floor)
IEEE half-precision floating-point type.
Definition: half.h:126
CUTLASS_HOST_DEVICE bool relatively_equal< uint8_t >(uint8_t a, uint8_t b, uint8_t, uint8_t)
Definition: relatively_equal.h:100
CUTLASS_HOST_DEVICE bool relatively_equal< int32_t >(int32_t a, int32_t b, int32_t, int32_t)
Definition: relatively_equal.h:118
CUTLASS_HOST_DEVICE bool relatively_equal< uint16_t >(uint16_t a, uint16_t b, uint16_t, uint16_t)
Definition: relatively_equal.h:112
CUTLASS_HOST_DEVICE bool relatively_equal< int4b_t >(int4b_t a, int4b_t b, int4b_t, int4b_t)
Definition: relatively_equal.h:82
CUTLASS_HOST_DEVICE bool relatively_equal< int16_t >(int16_t a, int16_t b, int16_t, int16_t)
Definition: relatively_equal.h:106
#define CUTLASS_HOST_DEVICE
Definition: cutlass.h:89
Top-level include for all CUTLASS numeric types.
CUTLASS_HOST_DEVICE bool relatively_equal_float(T a, T b, T epsilon, T nonzero_floor)
Definition: relatively_equal.h:51
CUTLASS_HOST_DEVICE bool relatively_equal< uint32_t >(uint32_t a, uint32_t b, uint32_t, uint32_t)
Definition: relatively_equal.h:124
CUTLASS_HOST_DEVICE bool relatively_equal< int64_t >(int64_t a, int64_t b, int64_t, int64_t)
Definition: relatively_equal.h:130
CUTLASS_HOST_DEVICE bool relatively_equal< float >(float a, float b, float epsilon, float nonzero_floor)
Definition: relatively_equal.h:150
CUTLASS_HOST_DEVICE bool relatively_equal< uint64_t >(uint64_t a, uint64_t b, uint64_t, uint64_t)
Definition: relatively_equal.h:136
CUTLASS_HOST_DEVICE bool relatively_equal< uint4b_t >(uint4b_t a, uint4b_t b, uint4b_t, uint4b_t)
Definition: relatively_equal.h:88
CUTLASS_HOST_DEVICE bool relatively_equal< uint1b_t >(uint1b_t a, uint1b_t b, uint1b_t, uint1b_t)
Definition: relatively_equal.h:76
integer_subbyte< 4, true > int4b_t
4-bit Integer type
Definition: integer_subbyte.h:155
CUTLASS_HOST_DEVICE bool relatively_equal< half_t >(half_t a, half_t b, half_t epsilon, half_t nonzero_floor)
Definition: relatively_equal.h:144