Generates rationals in [0, 1)
| 72 | |
| 73 | // Generates rationals in [0, 1) |
| 74 | arrayfire::common::half getHalf01(uint *val, uint index) { |
| 75 | float v = val[index >> 1U] >> (16U * (index & 1U)) & 0x0000ffff; |
| 76 | return static_cast<arrayfire::common::half>( |
| 77 | fmaf(v, unsigned_half_factor, unsigned_half_half_factor)); |
| 78 | } |
| 79 | |
| 80 | // Generates rationals in (-1, 1] |
| 81 | static arrayfire::common::half getHalfNegative11(uint *val, uint index) { |
no outgoing calls
no test coverage detected