safe_add_3d Class — pytorch Architecture
Architecture documentation for the safe_add_3d class in GridSampler.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/GridSampler.h lines 245–253
template<typename scalar_t>
static inline void safe_add_3d(scalar_t *data, int64_t d, int64_t h, int64_t w,
int64_t sD, int64_t sH, int64_t sW,
int64_t D, int64_t H, int64_t W,
scalar_t delta) {
if (within_bounds_3d(d, h, w, D, H, W)) {
data[d * sD + h * sH + w * sW] += delta;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free