Closed qliang88 closed 1 year ago
Hi, you have T (1 - alpha) = T - T alpha = -T alpha + T as integer addition is commutative. With __fmaf_rn() you can compute three instructions in one cycle. __fmaf_rn() represent a b + c that is __fmaf_rn(-T, alpha,T) which also equals __fmaf_rn(T, -alpha,T). Hope this helps!
https://github.com/MrNeRF/gaussian-splatting-cuda/blob/928a1518703b21d4de4a80c60555faaadc3cad28/cuda_rasterizer/forward.cu#L333
float test_T = __fmaf_rn(T, -alpha, T);
is different fromfloat test_T = T * (1 - alpha);
in original implementation.Maybe a typo?