|
Blender V5.3
|
#include "util/defines.h"#include "util/types_base.h"#include <cfloat>#include <cmath>#include <bit>Go to the source code of this file.
Classes | |
| struct | Interval< T > |
| struct | Extrema< T > |
Macros | |
| #define | M_PI_F (3.1415926535897932f) |
| #define | M_PI_2_F (1.5707963267948966f) |
| #define | M_PI_4_F (0.7853981633974830f) |
| #define | M_1_PI_F (0.3183098861837067f) |
| #define | M_2_PI_F (0.6366197723675813f) |
| #define | M_1_2PI_F (0.1591549430918953f) |
| #define | M_1_4PI_F (0.0795774715459476f) |
| #define | M_SQRT_PI_8_F (0.6266570686577501f) |
| #define | M_LN_2PI_F (1.8378770664093454f) |
| #define | M_2PI_F (6.2831853071795864f) |
| #define | M_4PI_F (12.566370614359172f) |
| #define | M_PI_4F 0.78539816339744830962f |
| #define | M_SQRT2_F (1.4142135623730950f) |
| #define | M_CBRT2_F 1.2599210498948732f |
| #define | M_SQRT1_2F 0.70710678118654752440f |
| #define | M_SQRT3_F (1.7320508075688772f) |
| #define | M_LN2_F (0.6931471805599453f) |
| #define | M_LN10_F (2.3025850929940457f) |
| #define | __has_builtin(v) |
| #define __has_builtin | ( | v | ) |
Definition at line 844 of file device/cpu/globals.h.
| #define M_1_2PI_F (0.1591549430918953f) |
Definition at line 49 of file device/cpu/globals.h.
| #define M_1_4PI_F (0.0795774715459476f) |
Definition at line 52 of file device/cpu/globals.h.
| #define M_1_PI_F (0.3183098861837067f) |
Definition at line 43 of file device/cpu/globals.h.
| #define M_2_PI_F (0.6366197723675813f) |
Definition at line 46 of file device/cpu/globals.h.
| #define M_2PI_F (6.2831853071795864f) |
Definition at line 63 of file device/cpu/globals.h.
| #define M_4PI_F (12.566370614359172f) |
Definition at line 66 of file device/cpu/globals.h.
| #define M_CBRT2_F 1.2599210498948732f |
Definition at line 77 of file device/cpu/globals.h.
| #define M_LN10_F (2.3025850929940457f) |
Definition at line 89 of file device/cpu/globals.h.
| #define M_LN2_F (0.6931471805599453f) |
Definition at line 86 of file device/cpu/globals.h.
| #define M_LN_2PI_F (1.8378770664093454f) |
Definition at line 58 of file device/cpu/globals.h.
| #define M_PI_2_F (1.5707963267948966f) |
Definition at line 37 of file device/cpu/globals.h.
| #define M_PI_4_F (0.7853981633974830f) |
Definition at line 40 of file device/cpu/globals.h.
| #define M_PI_4F 0.78539816339744830962f |
Definition at line 69 of file device/cpu/globals.h.
| #define M_PI_F (3.1415926535897932f) |
Definition at line 34 of file device/cpu/globals.h.
| #define M_SQRT1_2F 0.70710678118654752440f |
Definition at line 80 of file device/cpu/globals.h.
| #define M_SQRT2_F (1.4142135623730950f) |
Definition at line 74 of file device/cpu/globals.h.
| #define M_SQRT3_F (1.7320508075688772f) |
Definition at line 83 of file device/cpu/globals.h.
| #define M_SQRT_PI_8_F (0.6266570686577501f) |
Definition at line 55 of file device/cpu/globals.h.
| ccl_device_inline int __float_as_int | ( | const float | f | ) |
Definition at line 271 of file math_base.h.
References __float_as_int, and ccl_device_inline.
| ccl_device_inline uint __float_as_uint | ( | const float | f | ) |
Definition at line 291 of file math_base.h.
References __float_as_uint, and ccl_device_inline.
| ccl_device_inline float __int_as_float | ( | const int | i | ) |
Definition at line 281 of file math_base.h.
References __int_as_float, and ccl_device_inline.
| ccl_device_inline float __uint_as_float | ( | const uint | i | ) |
Definition at line 301 of file math_base.h.
References __uint_as_float, and ccl_device_inline.
| ccl_device_inline int abs | ( | const int | x | ) |
Definition at line 129 of file math_base.h.
References abs, ccl_device_inline, and x.
| ccl_device_inline int as_int | ( | const uint | i | ) |
Definition at line 240 of file math_base.h.
References as_int(), and ccl_device_inline.
Referenced by blender::ANIM_channel_debug_print_info(), as_int(), and blender::BM_mesh_intersect_edges().
| ccl_device_inline uint as_uint | ( | const float | f | ) |
Definition at line 260 of file math_base.h.
References as_uint(), and ccl_device_inline.
| ccl_device_inline uint as_uint | ( | const int | i | ) |
Definition at line 250 of file math_base.h.
References as_uint(), and ccl_device_inline.
| ccl_device_inline float beta | ( | const float | x, |
| const float | y ) |
Definition at line 708 of file math_base.h.
References beta(), ccl_device_inline, expf, lgammaf, x, and y.
Referenced by Freestyle::OGF::NormalCycle::accumulate_dihedral_angle(), beta(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::Eigen::internal::constrained_conjugate_gradient(), blender::bke::mesh::corner_fan_space_define(), blender::bke::mesh::corner_space_custom_data_to_normal(), blender::bke::mesh::corner_space_custom_normal_to_data(), blender::cubic_subdiv(), dBoxBox2(), dLineClosestApproach(), KDL::Frame::Frame(), KDL::Rotation::GetEulerZYZ(), Freestyle::SilhouetteGeomEngine::ImageToWorldParameter(), KDL::LinComb(), KDL::LinComb(), KDL::LinComb(), KDL::LinCombR(), KDL::LinCombR(), KDL::LinCombR(), libmv::Dogleg< Function, Jacobian, Solver >::minimize(), mnee_newton_solver(), blender::geometry::p_abf_matrix_invert(), posrandom(), random(), blender::rotateDifferentialCoordinates(), btConjugateGradient< MatrixX >::solve(), btConjugateResidual< MatrixX >::solve(), btDeformableBodySolver::solveDeformableConstraints(), libmv::Dogleg< Function, Jacobian, Solver >::SolveDoglegDirection(), solveSingleIteration(), blender::ed::sculpt_paint::smooth::surface_smooth_displace_step(), blender::volume_preservation(), and blender::volume_preservation().
| ccl_device float bits_to_01 | ( | const uint | bits | ) |
Definition at line 723 of file math_base.h.
References bits_to_01(), ccl_device, and float.
Referenced by bits_to_01().
| ccl_device_inline float byte_to_float | ( | const uchar | val | ) |
Definition at line 1008 of file math_base.h.
References byte_to_float(), and ccl_device_inline.
Referenced by byte_to_float(), AttributeConverter< blender::ColorGeometry4b >::convert(), and unquantize_spherical_harmonics().
| ccl_device_inline int ceil_to_int | ( | const float | f | ) |
Definition at line 471 of file math_base.h.
References ccl_device_inline, ceil_to_int(), ceilf, and float_to_int().
Referenced by RenderScheduler::calculate_resolution_divider_for_time(), and ceil_to_int().
| ccl_device_inline float clamp | ( | const float | a, |
| const float | mn, | ||
| const float | mx ) |
Definition at line 385 of file math_base.h.
References ccl_device_inline, clamp(), max, and min.
| ccl_device_inline int clamp | ( | const int | a, |
| const int | mn, | ||
| const int | mx ) |
Definition at line 380 of file math_base.h.
References ccl_device_inline, clamp(), max, and min.
| ccl_device_inline bool compare_floats | ( | const float | a, |
| const float | b, | ||
| float | abs_diff, | ||
| const int | ulp_diff ) |
Definition at line 815 of file math_base.h.
References __float_as_int, abs, b, ccl_device_inline, compare_floats(), and fabsf.
Referenced by compare_floats().
| ccl_device_inline float compatible_atan2 | ( | const float | y, |
| const float | x ) |
Definition at line 518 of file math_base.h.
References atan2f, ccl_device_inline, compatible_atan2(), x, and y.
Referenced by compatible_atan2(), and svm_math().
| ccl_device float compatible_powf | ( | const float | x, |
| const float | y ) |
Definition at line 595 of file math_base.h.
References ccl_device, compatible_powf(), fmodf, powf, x, and y.
Referenced by compatible_powf(), and safe_powf().
| ccl_device_inline float compatible_signf | ( | const float | f | ) |
Definition at line 524 of file math_base.h.
References ccl_device_inline, compatible_signf(), and signf().
Referenced by compatible_sign(), compatible_signf(), and svm_math().
| ccl_device_inline float cos_from_sin | ( | const float | s | ) |
Definition at line 661 of file math_base.h.
References ccl_device_inline, cos_from_sin(), safe_sqrtf(), and sqr.
| ccl_device_inline uint count_leading_zeros | ( | const uint | x | ) |
Definition at line 753 of file math_base.h.
References assert, ccl_device_inline, count_leading_zeros(), and x.
Referenced by count_leading_zeros(), find_first_set(), hash_shuffle_uint(), next_power_of_two(), prev_power_of_two(), and sobol_burley().
| ccl_device_inline uint count_trailing_zeros | ( | const uint | x | ) |
Definition at line 773 of file math_base.h.
References assert, ccl_device_inline, count_trailing_zeros(), and x.
Referenced by count_trailing_zeros().
| ccl_device_inline float cubic_interp | ( | const float | a, |
| const float | b, | ||
| float | c, | ||
| const float | d, | ||
| float | x ) |
Definition at line 560 of file math_base.h.
References b, ccl_device_inline, cubic_interp(), and x.
Referenced by cubic_interp(), interpolate_ies_vertical(), and kernel_ies_interp().
| ccl_device_inline T1 endvalue_preserving_mix | ( | const T1 | a, |
| const T1 | b, | ||
| const T2 | t ) |
Definition at line 427 of file math_base.h.
References b, ccl_device_inline, endvalue_preserving_mix(), T1, and T2.
| ccl_device_inline float ensure_finite | ( | const float | v | ) |
Definition at line 370 of file math_base.h.
References ccl_device_inline, ensure_finite(), and isfinite_safe().
Referenced by ensure_finite(), ensure_finite(), ensure_finite(), ensure_finite(), film_clamp_light(), kernel_background_evaluate(), kernel_displace_evaluate(), and read_shader_output().
| ccl_device_inline uint find_first_set | ( | const uint | x | ) |
Definition at line 793 of file math_base.h.
References ccl_device_inline, count_leading_zeros(), find_first_set(), and x.
Referenced by find_first_set().
| ccl_device_inline uchar float_to_byte | ( | const float | val | ) |
Definition at line 999 of file math_base.h.
References ccl_device_inline, and float_to_byte().
Referenced by color_float4_to_uchar4(), color_float_to_byte(), float_to_byte(), and quantize_spherical_harmonics().
| ccl_device_inline int float_to_int | ( | const float | f | ) |
Definition at line 454 of file math_base.h.
References ccl_device_inline, and float_to_int().
Referenced by background_map_pdf(), ceil_to_int(), fast_rint(), float_ramp_lookup(), float_ramp_lookup(), float_to_int(), floor_to_int(), floorfrac(), CCL_NAMESPACE_BEGIN::ImageInterpolator< TexT, OutT >::frac(), frac(), lookup_table_read(), lookup_table_read_2D(), lookup_table_read_3D(), noise_fbm(), noise_fbm(), noise_fbm(), noise_fbm(), noise_hetero_terrain(), noise_hetero_terrain(), noise_hetero_terrain(), noise_hetero_terrain(), noise_hybrid_multi_fractal(), noise_hybrid_multi_fractal(), noise_hybrid_multi_fractal(), noise_hybrid_multi_fractal(), noise_multi_fractal(), noise_multi_fractal(), noise_multi_fractal(), noise_multi_fractal(), noise_ridged_multi_fractal(), noise_ridged_multi_fractal(), noise_ridged_multi_fractal(), noise_ridged_multi_fractal(), rgb_ramp_lookup(), rgb_ramp_lookup(), safe_powf(), svm_checker(), svm_math_wavelength_color_xyz(), and svm_node_convert().
| ccl_device_inline int floor_to_int | ( | const float | f | ) |
Definition at line 459 of file math_base.h.
References ccl_device_inline, float_to_int(), floor_to_int(), and floorf.
Referenced by floor_to_int(), HdCyclesDelegate::GetRenderStats(), and svm_brick().
| ccl_device_inline float floorfrac | ( | const float | x, |
| ccl_private int * | i ) |
Definition at line 464 of file math_base.h.
References ccl_device_inline, ccl_private, float_to_int(), floorf, floorfrac(), and x.
Referenced by floorfrac(), floorfrac(), interppixel_NDC(), perlin_1d(), perlin_2d(), perlin_3d(), and perlin_4d().
| ccl_device_inline float fractf | ( | const float | x | ) |
Definition at line 476 of file math_base.h.
References ccl_device_inline, floorf, fractf, and x.
| ccl_device_inline float interp | ( | const float | a, |
| const float | b, | ||
| const float | t ) |
Definition at line 549 of file math_base.h.
References b, ccl_device_inline, and interp().
Referenced by as_data(), as_data(), as_data(), as_data(), camera_sample_perspective(), ClipSegmentToLine(), CurvesNode::constant_fold(), InvertNode::constant_fold(), blender::CustomData_data_transfer(), blender::data_transfer_layersmapping_add_item(), blender::data_transfer_layersmapping_add_item(), blender::data_transfer_layersmapping_add_item_cd(), LinearQuadPatch::eval(), film_apply_pass_pixel_overlays_rgba(), builtin::nodelink::frag(), eevee::geom_curves(), eevee::geom_gsplat(), eevee::geom_mesh(), eevee::geom_pointcloud(), eevee::geom_volume(), eevee::geom_world(), SkyTextureNode::get_sun_average_radiance(), blender::io::usd::import_mesh_skel_bindings(), eevee::init_globals(), eevee::init_globals_curves(), eevee::init_globals_mesh(), eevee::init_interface(), interp(), interp(), interp(), interp(), CCL_NAMESPACE_BEGIN::kernel_image_interp_3d(), SubPatch::map_uv(), blender::meshcache_read_mdd_range(), blender::meshcache_read_pc2_range(), blender::MOD_meshcache_calc_range(), blender::MOD_meshcache_read_mdd_frame(), blender::MOD_meshcache_read_mdd_times(), blender::MOD_meshcache_read_pc2_frame(), blender::MOD_meshcache_read_pc2_times(), blender::draw::particle_key_weight(), blender::project_paint_PickColor(), eevee::fast_gi::resolve(), UtilityTexture::sample_bsdf_lut(), blender::ed::sculpt_paint::sample_texture_paint_color(), SubdAttributeInterpolation::setup_attribute_corner_linear(), SubdAttributeInterpolation::setup_attribute_vertex_linear(), SKY_arhosekskymodel_radiance(), eevee::surf_capture(), eevee::surf_deferred(), eevee::surf_depth(), eevee::surf_forward(), eevee::surf_hybrid(), eevee::surf_occupancy(), eevee::surf_shadow(), eevee::surf_volume(), eevee::surf_world(), svm_math_wavelength_color_xyz(), svm_mix_color(), svm_mix_dark(), svm_mix_diff(), svm_mix_exclusion(), svm_mix_hue(), svm_mix_light(), eevee::shadow::usage::tag_usage_frag(), blender::gpu::to_string(), blender::to_string(), and builtin::nodelink::vert().
| ccl_device_inline Interval< T > intervals_intersection | ( | const ccl_private Interval< T > & | first, |
| const ccl_private Interval< T > & | second ) |
Definition at line 947 of file math_base.h.
References ccl_device_inline, ccl_private, intervals_intersection(), max, and min.
Referenced by bsdf_hair_huang_eval(), intervals_intersection(), ray_cone_intersect(), and ray_infinite_cylinder_intersect().
| ccl_device_inline float inverse_lerp | ( | const float | a, |
| const float | b, | ||
| const float | x ) |
Definition at line 554 of file math_base.h.
References b, ccl_device_inline, inverse_lerp(), and x.
Referenced by background_map_sample(), bsdf_microfacet_setup_fresnel_generalized_schlick(), direction_to_central_cylindrical(), generalized_schlick_fresnel(), interpolate_fresnel_color(), inverse_lerp(), and kernel_ies_interp().
| ccl_device_inline float inversesqrtf | ( | const float | f | ) |
Definition at line 576 of file math_base.h.
References ccl_device_inline, inversesqrtf(), and sqrtf.
Referenced by acos(), bsdf_lambda_from_sqr_alpha_tan_n(), compute_v(), SpotLight::copy_to_kernel(), inversesqrt(), inversesqrtf(), microfacet_ggx_sample_vndf(), ray_cone_intersect(), safe_acos(), slab_color_at_angle(), sphg_dir(), svm_math(), and LightTreeMeasure::transform().
| ccl_device_inline bool is_zero | ( | const float | a | ) |
Definition at line 728 of file math_base.h.
References ccl_device_inline, and is_zero().
| ccl_device_inline bool isfinite_safe | ( | const float | f | ) |
Definition at line 362 of file math_base.h.
References __float_as_uint, ccl_device_inline, isfinite_safe(), and x.
Referenced by bsdf_hair_chiang_eval(), bsdf_hair_chiang_sample(), bsdf_hair_huang_eval_residual(), closure_sample_weight(), ensure_finite(), ensure_finite(), ensure_finite(), film_clamp_light(), BoundBox::grow_safe(), SVMCompiler::input_float(), SVMCompiler::input_float3(), intersection_ray_valid(), intersection_t_offset(), isfinite_safe(), isfinite_safe(), isfinite_safe(), isfinite_safe(), kernel_background_evaluate(), kernel_displace_evaluate(), longitudinal_scattering(), svm_node_normal_map(), transform_decomposed_isfinite_safe(), transform_isfinite_safe(), and Mesh::Triangle::valid().
| ccl_device_inline bool isnan_safe | ( | const float | f | ) |
Definition at line 356 of file math_base.h.
References __float_as_uint, ccl_device_inline, isnan_safe(), and x.
Referenced by bsdf_hair_huang_eval(), fresnel_dielectric_polarized(), and isnan_safe().
| ccl_device_template_spec float make_zero | ( | ) |
Definition at line 232 of file math_base.h.
References ccl_device_template_spec, and make_zero().
| ccl_device_template_spec dual< Quaternion > make_zero | ( | ) |
Definition at line 20 of file math_dual.h.
References ccl_device_template_spec, and make_zero().
Referenced by direction_to_equirectangular_range(), make_zero(), map_to_sphere(), map_to_tube(), primitive_surface_attribute(), primitive_tangent(), safe_divide(), safe_divide(), safe_floored_fmod(), safe_normalize(), svm_node_get_vector_component(), svm_node_tex_coord_eval(), svm_node_vector_math(), and triangle_attribute().
| ccl_device_inline double max | ( | const double | a, |
| const double | b ) |
Definition at line 193 of file math_base.h.
References b, ccl_device_inline, and max.
| ccl_device_inline float max | ( | const float | a, |
| const float | b ) |
Definition at line 183 of file math_base.h.
References b, ccl_device_inline, and max.
| ccl_device_inline int max | ( | const int | a, |
| const int | b ) |
Definition at line 134 of file math_base.h.
References b, ccl_device_inline, and max.
| ccl_device_inline uint32_t max | ( | const uint32_t | a, |
| const uint32_t | b ) |
Definition at line 144 of file math_base.h.
References b, ccl_device_inline, and max.
| ccl_device_inline uint64_t max | ( | const uint64_t | a, |
| const uint64_t | b ) |
Definition at line 154 of file math_base.h.
References b, ccl_device_inline, and max.
|
constexpr |
Definition at line 172 of file math_base.h.
References b, ccl_device_inline, max, and T.
Definition at line 225 of file math_base.h.
References b, ccl_device_inline, max, and max4().
| ccl_device_inline T max4 | ( | const T & | a, |
| const T & | b, | ||
| const T & | c, | ||
| const T & | d ) |
Definition at line 214 of file math_base.h.
References b, ccl_device_inline, max, max4(), and T.
Referenced by bvh_aligned_node_intersect(), bvh_unaligned_node_intersect_child(), blender::math::float_to_half_clamp_array(), max4(), and max4().
| ccl_device_inline Extrema< T > merge | ( | const ccl_private Extrema< T > & | a, |
| const ccl_private Extrema< T > & | b ) |
Definition at line 987 of file math_base.h.
References b, ccl_device_inline, ccl_private, max, merge(), and min.
| ccl_device_inline Extrema< T > merge | ( | const ccl_private Extrema< T > & | a, |
| const ccl_private T & | v ) |
Definition at line 994 of file math_base.h.
References ccl_device_inline, ccl_private, max, merge(), min, and T.
| ccl_device_inline double min | ( | const double | a, |
| const double | b ) |
Definition at line 198 of file math_base.h.
References b, ccl_device_inline, and min.
| ccl_device_inline float min | ( | const float | a, |
| const float | b ) |
Definition at line 188 of file math_base.h.
References b, ccl_device_inline, and min.
| ccl_device_inline int min | ( | const int | a, |
| const int | b ) |
Definition at line 139 of file math_base.h.
References b, ccl_device_inline, and min.
| ccl_device_inline uint32_t min | ( | const uint32_t | a, |
| const uint32_t | b ) |
Definition at line 149 of file math_base.h.
References b, ccl_device_inline, and min.
| ccl_device_inline uint64_t min | ( | const uint64_t | a, |
| const uint64_t | b ) |
Definition at line 159 of file math_base.h.
References b, ccl_device_inline, and min.
|
constexpr |
Definition at line 178 of file math_base.h.
References b, ccl_device_inline, min, and T.
Definition at line 220 of file math_base.h.
References b, ccl_device_inline, min, and min4().
| ccl_device_inline T min4 | ( | const T & | a, |
| const T & | b, | ||
| const T & | c, | ||
| const T & | d ) |
Definition at line 209 of file math_base.h.
References b, ccl_device_inline, min, min4(), and T.
Referenced by bvh_aligned_node_intersect(), bvh_unaligned_node_intersect_child(), blender::math::float_to_half_clamp_array(), min4(), and min4().
Definition at line 417 of file math_base.h.
References b, ccl_device_inline, mix, T1, and T2.
| ccl_device_inline int mod | ( | const int | x, |
| const int | m ) |
Definition at line 544 of file math_base.h.
References ccl_device_inline, mod, and x.
| ccl_device_inline uint next_power_of_two | ( | const uint | x | ) |
Definition at line 832 of file math_base.h.
References ccl_device_inline, count_leading_zeros(), next_power_of_two(), and x.
Referenced by ImageMetaData::detect_tiles(), Integrator::device_update(), next_power_of_two(), PathTrace::render_pipeline(), round_num_samples_to_power_of_2(), round_up_to_power_of_two(), and TEST().
| ccl_device_inline float nonzerof | ( | const float | f, |
| const float | eps ) |
Definition at line 507 of file math_base.h.
References ccl_device_inline, eps, fabsf, nonzerof(), and signf().
Referenced by nonzerof().
| ccl_device_inline float one_minus_cos | ( | const float | angle | ) |
Definition at line 672 of file math_base.h.
References angle(), ccl_device_inline, cosf, one_minus_cos(), and sqr.
Referenced by background_sun_sample(), bsdf_diffuse_toon_eval(), bsdf_diffuse_toon_sample(), bsdf_glossy_toon_eval(), bsdf_glossy_toon_sample(), one_minus_cos(), pdf_uniform_cone(), and point_light_sample().
Definition at line 967 of file math_base.h.
References b, ccl_device_inline, Extrema< T >::max, Extrema< T >::min, operator*(), and T.
Referenced by operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), operator*(), and operator*().
| ccl_device_inline Extrema< T > operator+ | ( | const ccl_private Extrema< T > & | a, |
| const ccl_private Extrema< T > & | b ) |
Definition at line 973 of file math_base.h.
References b, ccl_device_inline, ccl_private, and operator+().
| ccl_device_inline Extrema< T > operator+= | ( | ccl_private Extrema< T > & | a, |
| const ccl_private Extrema< T > & | b ) |
Definition at line 980 of file math_base.h.
References b, ccl_device_inline, ccl_private, and operator+=().
Referenced by operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), and operator+=().
| ccl_device_inline Interval< T1 > operator/= | ( | ccl_private Interval< T1 > & | interval, |
| const T2 | f ) |
Definition at line 938 of file math_base.h.
References ccl_device_inline, ccl_private, operator/=(), and T2.
Referenced by operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), operator/=(), and operator/=().
| ccl_device_inline float or_mask | ( | const float | x, |
| const uint | y ) |
Definition at line 718 of file math_base.h.
References __float_as_uint, __uint_as_float, ccl_device_inline, or_mask(), x, and y.
Referenced by or_mask(), and rgbe_to_rgb().
| ccl_device_inline float pingpongf | ( | const float | a, |
| const float | b ) |
Definition at line 488 of file math_base.h.
References b, ccl_device_inline, fabsf, fractf, and pingpongf().
Referenced by pingpongf(), and svm_math().
| ccl_device_inline uint pointer_pack_to_uint_0 | ( | T * | ptr | ) |
Definition at line 325 of file math_base.h.
References ccl_device_inline, pointer_pack_to_uint_0(), and T.
Referenced by pointer_pack_to_uint_0(), scene_intersect(), and scene_intersect_shadow().
| ccl_device_inline uint pointer_pack_to_uint_1 | ( | T * | ptr | ) |
Definition at line 330 of file math_base.h.
References ccl_device_inline, pointer_pack_to_uint_1(), and T.
Referenced by pointer_pack_to_uint_1(), scene_intersect(), and scene_intersect_shadow().
| ccl_device_inline T * pointer_unpack_from_uint | ( | const uint | a, |
| const uint | b ) |
Definition at line 335 of file math_base.h.
References b, ccl_device_inline, pointer_unpack_from_uint(), and T.
Referenced by get_payload_ptr_0(), get_payload_ptr_2(), and pointer_unpack_from_uint().
| ccl_device_inline uint popcount | ( | const uint | x | ) |
Definition at line 734 of file math_base.h.
References ccl_device_inline, popcount(), and x.
Referenced by gpu_parallel_active_index_array_impl(), light_tree_cluster_select_emitter(), popcount(), popcount(), sample_is_class_A(), and lexit::TokenBuffer::tokenize().
| ccl_device_inline uint popcount | ( | const uint64_t | x | ) |
Definition at line 738 of file math_base.h.
References ccl_device_inline, popcount(), and x.
| ccl_device_inline float pow20 | ( | const float | a | ) |
Definition at line 684 of file math_base.h.
References ccl_device_inline, pow20(), and sqr.
Referenced by pow20().
| ccl_device_inline float pow22 | ( | const float | a | ) |
Definition at line 689 of file math_base.h.
References ccl_device_inline, pow22(), and sqr.
Referenced by pow22().
| ccl_device_inline int power_of_2 | ( | const int | a | ) |
Definition at line 679 of file math_base.h.
References ccl_device_inline, and power_of_2().
Referenced by power_of_2(), and rgb_to_rgbe().
| ccl_device_inline uint prev_power_of_two | ( | const uint | x | ) |
Definition at line 838 of file math_base.h.
References ccl_device_inline, count_leading_zeros(), prev_power_of_two(), and x.
Referenced by prev_power_of_two(), round_down_to_power_of_two(), and TEST().
| ccl_device_inline uint32_t reverse_integer_bits | ( | uint32_t | x | ) |
Definition at line 848 of file math_base.h.
References ccl_device_inline, reverse_integer_bits(), and x.
Referenced by Integrator::device_update(), nested_uniform_scramble(), nested_uniform_scramble_base4(), reverse_integer_bits(), sobol_burley(), sobol_burley_sample_1D(), sobol_burley_sample_2D(), sobol_burley_sample_3D(), sobol_burley_sample_4D(), and TEST().
| ccl_device float safe_acosf | ( | const float | a | ) |
Definition at line 590 of file math_base.h.
References acosf, ccl_device, clamp(), and safe_acosf().
Referenced by attr_create_pointiness(), bsdf_diffuse_toon_eval(), bsdf_glossy_toon_eval(), bsdf_oren_nayar_G(), direction_to_fisheye_equisolid(), direction_to_spherical(), fisheye_to_direction(), map_to_sphere(), merge(), safe_acos(), safe_acosf(), sky_angle_between(), svm_math(), svm_node_ies(), and triangle_light_sample().
| ccl_device float safe_asinf | ( | const float | a | ) |
Definition at line 585 of file math_base.h.
References asinf, ccl_device, clamp(), and safe_asinf().
Referenced by area_light_rect_sample(), bsdf_hair_chiang_eval(), bsdf_hair_chiang_sample(), bsdf_hair_reflection_sample(), safe_asinf(), spherical_stereo_transform(), and svm_math().
| ccl_device float safe_divide | ( | const float | a, |
| const float | b ) |
Definition at line 627 of file math_base.h.
References b, ccl_device, and safe_divide().
| ccl_device float safe_floored_modulo | ( | const float | a, |
| const float | b ) |
Definition at line 646 of file math_base.h.
References b, ccl_device, floorf, and safe_floored_modulo().
| ccl_device float safe_logf | ( | const float | a, |
| const float | b ) |
Definition at line 632 of file math_base.h.
References b, ccl_device, logf, safe_divide(), safe_logf(), and UNLIKELY.
Referenced by safe_logf(), and svm_math().
| ccl_device float safe_modulo | ( | const float | a, |
| const float | b ) |
Definition at line 641 of file math_base.h.
References b, ccl_device, fmodf, and safe_modulo().
| ccl_device float safe_powf | ( | const float | a, |
| const float | b ) |
Definition at line 618 of file math_base.h.
References b, ccl_device, compatible_powf(), float_to_int(), safe_powf(), and UNLIKELY.
Referenced by safe_pow(), safe_powf(), and svm_math().
| ccl_device_inline float safe_sqrtf | ( | const float | f | ) |
Definition at line 571 of file math_base.h.
References ccl_device_inline, max, safe_sqrtf(), and sqrtf.
Referenced by bsdf_sheen_sample(), bssrdf_burley_sample(), cos_from_sin(), cos_theta(), disk_to_hemisphere(), ensure_valid_specular_reflection(), fresnel_dielectric_polarized(), guiding_record_surface_bounce(), light_tree_cos_bound_subtended_angle(), SkyMultipleScattering::lookup_multiscattering(), microfacet_fresnel(), microfacet_ggx_sample_vndf(), mnee_sample_bsdf_dh(), mu_to_y_index(), phase_henyey_greenstein(), point_light_sample(), safe_sqrtf(), sample_cos_hemisphere(), sample_uniform_cone(), sample_uniform_hemisphere(), sin_from_cos(), sin_sqr_to_one_minus_cos(), solve_quadratic(), spot_light_sample(), and svm_math().
| ccl_device_inline float saturatef | ( | const float | a | ) |
Definition at line 433 of file math_base.h.
References ccl_device_inline, clamp(), and saturatef.
| ccl_device_inline float signf | ( | const float | f | ) |
Definition at line 502 of file math_base.h.
References ccl_device_inline, and signf().
Referenced by compatible_signf(), TextureMapping::compute_transform(), microfacet_beckmann_sample_vndf(), nonzerof(), signf(), sphg_dir(), svm_node_set_bump(), volume_draine_setup(), and volume_henyey_greenstein_setup().
| ccl_device_inline float sin_from_cos | ( | const float | c | ) |
Definition at line 656 of file math_base.h.
References ccl_device_inline, safe_sqrtf(), sin_from_cos(), and sqr.
| ccl_device_inline float sin_sqr_to_one_minus_cos | ( | const float | s_sq | ) |
Definition at line 666 of file math_base.h.
References ccl_device_inline, safe_sqrtf(), and sin_sqr_to_one_minus_cos().
Referenced by point_light_sample(), sin_sqr_to_one_minus_cos(), sphere_light_pdf(), spot_light_pdf(), and spot_light_sample().
| ccl_device_inline float smoothminf | ( | const float | a, |
| const float | b, | ||
| float | k ) |
Definition at line 493 of file math_base.h.
References b, ccl_device_inline, fabsf, fmaxf, fminf, and smoothminf().
Referenced by smoothminf(), and svm_math().
| ccl_device_inline float smoothstep | ( | const float | edge0, |
| const float | edge1, | ||
| const float | x ) |
Definition at line 390 of file math_base.h.
References ccl_device_inline, smoothstep(), and x.
| ccl_device_inline float smoothstepf | ( | const float | f | ) |
Definition at line 532 of file math_base.h.
References ccl_device_inline, and smoothstepf().
Referenced by smoothstepf(), spot_light_attenuation(), spot_light_tree_parameters(), and svm_brick().
| ccl_device_inline bool solve_quadratic | ( | const float | a, |
| const float | b, | ||
| const float | c, | ||
| ccl_private float & | x1, | ||
| ccl_private float & | x2 ) |
Definition at line 888 of file math_base.h.
References b, ccl_device_inline, ccl_private, copysignf, fmaxf, fminf, safe_sqrtf(), solve_quadratic(), and sqr.
Referenced by ray_cone_intersect(), ray_infinite_cylinder_intersect(), and solve_quadratic().
| ccl_device_inline float sqr | ( | const float | a | ) |
Definition at line 651 of file math_base.h.
References ccl_device_inline, and sqr.
| ccl_device_inline uint uint16_pack_to_uint | ( | const uint | a, |
| const uint | b ) |
Definition at line 340 of file math_base.h.
References b, ccl_device_inline, and uint16_pack_to_uint().
Referenced by uint16_pack_to_uint().
| ccl_device_inline uint uint16_unpack_from_uint_0 | ( | const uint | i | ) |
Definition at line 345 of file math_base.h.
References ccl_device_inline, and uint16_unpack_from_uint_0().
Referenced by uint16_unpack_from_uint_0().
| ccl_device_inline uint uint16_unpack_from_uint_1 | ( | const uint | i | ) |
Definition at line 350 of file math_base.h.
References ccl_device_inline, and uint16_unpack_from_uint_1().
Referenced by uint16_unpack_from_uint_1().
| ccl_device_inline float wrapf | ( | const float | value, |
| const float | max, | ||
| const float | min ) |
Definition at line 482 of file math_base.h.
References ccl_device_inline, floorf, max, min, and wrapf().
Referenced by svm_math(), and wrapf().
| ccl_device_inline float xor_mask | ( | const float | x, |
| const uint | y ) |
Definition at line 713 of file math_base.h.
References __float_as_uint, __uint_as_float, ccl_device_inline, x, xor_mask(), and y.
Referenced by xor_mask().