12#if !defined(__KERNEL_GPU__)
54 const float rescaled =
saturatef((value + 1.0f) / 2.0f);
69#if !defined(__KERNEL_GPU__)
70 memset(packed_spherical_harmonics_rest.coefficients,
72 sizeof(packed_spherical_harmonics_rest.coefficients));
76 packed_spherical_harmonics_rest.coefficients[i] = zero;
89 const int i =
index * 3;
102 const int i =
index * 3;
110template<
int L,
int M>
#define util_assert(statement)
#define ccl_device_forceinline
#define ccl_device_inline
#define ccl_device_template_spec
#define ccl_static_constexpr
#define CCL_NAMESPACE_END
ccl_device_inline float byte_to_float(const uchar val)
ccl_device_inline uchar float_to_byte(const float val)
ccl_static_constexpr int MAX_DEGREES
ccl_static_constexpr int MAX_COEFFICIENTS
uint8_t coefficients[3 *MAX_COEFFICIENTS]
ccl_device_forceinline void spherical_harmonics_rest_fill_zero(ccl_global PackedSphericalHarmonicsRest &packed_spherical_harmonics_rest)
ccl_device_forceinline float3 spherical_harmonics_rest_get_coefficient(const ccl_global PackedSphericalHarmonicsRest &packed_spherical_harmonics_rest, const int index)
ccl_device_forceinline void spherical_harmonics_rest_set_coefficient(ccl_global PackedSphericalHarmonicsRest &packed_spherical_harmonics_rest, const int index, const float3 value)
ccl_device_inline float3 spherical_harmonics_get(const ccl_global PackedSphericalHarmonicsRest &packed_spherical_harmonics_rest)
ccl_device_forceinline uint8_t quantize_spherical_harmonics(const float value)
ccl_device_forceinline float unquantize_spherical_harmonics(const uint8_t value)