This patch adds more math functions for float4 to make them on par with float3 ones. It makes it possible to change the types of float3 variables to float4 without additional work.
Tested on CPU and CUDA.
Differential D15318
Cycles: add more math functions for float4 Authored by Andrii Symkin (pembem22) on Jun 29 2022, 11:38 AM.
Details
This patch adds more math functions for float4 to make them on par with float3 ones. It makes it possible to change the types of float3 variables to float4 without additional work. Tested on CPU and CUDA.
Diff Detail
Event TimelineComment Actions For the Metal errors, you can pass by value instead of by reference, makes no difference as this is inlined anyway. And for extracing a float from _m128 , you can use _mm_cvtss_f32(a) instead of a.x. |