| 187 | const src_ctype scale; |
| 188 | |
| 189 | MEGDNN_HOST MEGDNN_DEVICE wtype read(uint32_t idx) { |
| 190 | size_t x = idx / B; |
| 191 | size_t y = idx % B; |
| 192 | if (y < srcs_total_nr_elems[x]) { |
| 193 | #if defined(__CUDA_ARCH__) |
| 194 | wtype val = isfinite(srcs[x][y]); |
| 195 | #else |
| 196 | wtype val = std::isfinite(srcs[x][y]); |
| 197 | #endif |
| 198 | if (val) |
| 199 | srcs[x][y] *= scale; |
| 200 | return !val; |
| 201 | } |
| 202 | return 0; |
| 203 | } |
| 204 | MEGDNN_HOST MEGDNN_DEVICE void write(uint32_t idx, wtype val) { dst[idx] = val; } |
| 205 | static MEGDNN_HOST MEGDNN_DEVICE wtype apply(wtype lhs, wtype rhs) { |
| 206 | return lhs | rhs; |
nothing calls this directly
no test coverage detected