| 227 | } |
| 228 | |
| 229 | CUTLASS_HOST_DEVICE |
| 230 | int fpclassify(cutlass::tfloat32_t const& h) { |
| 231 | int exp = h.exponent_biased(); |
| 232 | int mantissa = h.mantissa(); |
| 233 | if (exp == 0x0ff) { |
| 234 | if (mantissa) { |
| 235 | return FP_NAN; |
| 236 | } |
| 237 | else { |
| 238 | return FP_INFINITE; |
| 239 | } |
| 240 | } |
| 241 | else if (!exp) { |
| 242 | if (mantissa) { |
| 243 | return FP_SUBNORMAL; |
| 244 | } |
| 245 | else { |
| 246 | return FP_ZERO; |
| 247 | } |
| 248 | } |
| 249 | return FP_NORMAL; |
| 250 | } |
| 251 | |
| 252 | CUTLASS_HOST_DEVICE |
| 253 | cutlass::tfloat32_t sqrt(cutlass::tfloat32_t const& h) { |
nothing calls this directly
no test coverage detected