| 320 | |
| 321 | template<typename scalar_t, typename index_t> |
| 322 | static OF_DEVICE_FUNC void AddValueBounded(scalar_t* data, scalar_t x, scalar_t y, int W, int H, |
| 323 | int sW, int sH, scalar_t delta, |
| 324 | GridSamplerPadding padding_mode, bool align_corners, |
| 325 | const index_t NC_offset, const index_t memory_span) { |
| 326 | x = ComputeCoordinates(x, W, padding_mode, align_corners); |
| 327 | y = ComputeCoordinates(y, H, padding_mode, align_corners); |
| 328 | |
| 329 | int ix = static_cast<int>(x); |
| 330 | int iy = static_cast<int>(y); |
| 331 | |
| 332 | SafeAdd2D(data, iy, ix, sH, sW, H, W, delta, NC_offset, memory_span); |
| 333 | } |
| 334 | |
| 335 | // Calculate the differential of the cubic convolution, i.e. `d coeff / d x` |
| 336 | template<typename scalar_t> |
nothing calls this directly
no test coverage detected