Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_math_float3.h
| Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| #ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| return float3(_mm_sqrt_ps(a)); | return float3(_mm_sqrt_ps(a)); | ||||
| #else | #else | ||||
| return make_float3(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z)); | return make_float3(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z)); | ||||
| #endif | #endif | ||||
| } | } | ||||
| ccl_device_inline float3 pow3(const float3& a, float e) | |||||
| { | |||||
| return make_float3(powf(a.x, e), powf(a.y, e), powf(a.z, e)); | |||||
| } | |||||
| ccl_device_inline float3 mix(const float3& a, const float3& b, float t) | ccl_device_inline float3 mix(const float3& a, const float3& b, float t) | ||||
| { | { | ||||
| return a + t*(b - a); | return a + t*(b - a); | ||||
| } | } | ||||
| ccl_device_inline float3 rcp(const float3& a) | ccl_device_inline float3 rcp(const float3& a) | ||||
| { | { | ||||
| #ifdef __KERNEL_SSE__ | #ifdef __KERNEL_SSE__ | ||||
| ▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines | |||||