Blender V4.5
compat.h File Reference
#include <stdint.h>
#include "util/half.h"
#include "util/types.h"

Go to the source code of this file.

Macros

#define __KERNEL_GPU__
#define __KERNEL_CUDA__
#define CCL_NAMESPACE_BEGIN
#define CCL_NAMESPACE_END
#define ATTR_FALLTHROUGH
#define ccl_device   __device__ __inline__
#define ccl_device_extern   extern "C" __device__
#define ccl_device_inline   __device__ __forceinline__
#define ccl_device_forceinline   __device__ __forceinline__
#define ccl_device_noinline   __device__ __noinline__
#define ccl_device_noinline_cpu   ccl_device
#define ccl_device_inline_method   ccl_device
#define ccl_device_template_spec   template<> ccl_device_inline
#define ccl_global
#define ccl_inline_constant   __constant__
#define ccl_device_constant   __constant__ __device__
#define ccl_static_constexpr   static constexpr
#define ccl_constant   const
#define ccl_gpu_shared   __shared__
#define ccl_private
#define ccl_ray_data   ccl_private
#define ccl_may_alias
#define ccl_restrict   __restrict__
#define ccl_align(n)
#define ccl_optional_struct_init
#define kernel_assert(cond)
#define ccl_gpu_thread_idx_x   (threadIdx.x)
#define ccl_gpu_block_dim_x   (blockDim.x)
#define ccl_gpu_block_idx_x   (blockIdx.x)
#define ccl_gpu_grid_dim_x   (gridDim.x)
#define ccl_gpu_warp_size   (warpSize)
#define ccl_gpu_thread_mask(thread_warp)
#define ccl_gpu_global_id_x()
#define ccl_gpu_global_size_x()
#define ccl_gpu_syncthreads()
#define ccl_gpu_ballot(predicate)
#define cosf(x)
#define sinf(x)
#define powf(x, y)
#define tanf(x)
#define logf(x)
#define expf(x)

Typedefs

typedef unsigned long long CUtexObject
typedef CUtexObject ccl_gpu_tex_object_2D
typedef CUtexObject ccl_gpu_tex_object_3D
typedef unsigned short half

Functions

template<typename T>
ccl_device_forceinline T ccl_gpu_tex_object_read_2D (const ccl_gpu_tex_object_2D texobj, const float x, const float y)
template<typename T>
ccl_device_forceinline T ccl_gpu_tex_object_read_3D (const ccl_gpu_tex_object_3D texobj, const float x, const float y, const float z)
ccl_device_forceinline half __float2half (const float f)
ccl_device_forceinline float __half2float (const half h)

Macro Definition Documentation

◆ __KERNEL_CUDA__

#define __KERNEL_CUDA__

Definition at line 8 of file device/cuda/compat.h.

◆ __KERNEL_GPU__

#define __KERNEL_GPU__

Definition at line 7 of file device/cuda/compat.h.

◆ ATTR_FALLTHROUGH

#define ATTR_FALLTHROUGH

Definition at line 13 of file device/cuda/compat.h.

◆ ccl_align

#define ccl_align ( n)
Value:
__align__(n)

Definition at line 56 of file device/cuda/compat.h.

◆ ccl_constant

#define ccl_constant   const

Definition at line 50 of file device/cuda/compat.h.

◆ ccl_device

#define ccl_device   __device__ __inline__

Definition at line 33 of file device/cuda/compat.h.

◆ ccl_device_constant

#define ccl_device_constant   __constant__ __device__

Definition at line 48 of file device/cuda/compat.h.

◆ ccl_device_extern

#define ccl_device_extern   extern "C" __device__

Definition at line 34 of file device/cuda/compat.h.

◆ ccl_device_forceinline

#define ccl_device_forceinline   __device__ __forceinline__

Definition at line 37 of file device/cuda/compat.h.

◆ ccl_device_inline

#define ccl_device_inline   __device__ __forceinline__

Definition at line 36 of file device/cuda/compat.h.

◆ ccl_device_inline_method

#define ccl_device_inline_method   ccl_device

Definition at line 44 of file device/cuda/compat.h.

◆ ccl_device_noinline

#define ccl_device_noinline   __device__ __noinline__

Definition at line 42 of file device/cuda/compat.h.

◆ ccl_device_noinline_cpu

#define ccl_device_noinline_cpu   ccl_device

Definition at line 43 of file device/cuda/compat.h.

◆ ccl_device_template_spec

#define ccl_device_template_spec   template<> ccl_device_inline

Definition at line 45 of file device/cuda/compat.h.

◆ ccl_global

#define ccl_global

Definition at line 46 of file device/cuda/compat.h.

◆ ccl_gpu_ballot

#define ccl_gpu_ballot ( predicate)
Value:
__ballot_sync(0xFFFFFFFF, predicate)

Definition at line 78 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_block_dim_x

#define ccl_gpu_block_dim_x   (blockDim.x)

Definition at line 66 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_block_idx_x

#define ccl_gpu_block_idx_x   (blockIdx.x)

Definition at line 67 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_global_id_x

#define ccl_gpu_global_id_x ( )
Value:
#define ccl_gpu_block_dim_x
#define ccl_gpu_thread_idx_x
#define ccl_gpu_block_idx_x

Definition at line 72 of file device/cuda/compat.h.

◆ ccl_gpu_global_size_x

#define ccl_gpu_global_size_x ( )
Value:

Definition at line 73 of file device/cuda/compat.h.

◆ ccl_gpu_grid_dim_x

#define ccl_gpu_grid_dim_x   (gridDim.x)

Definition at line 68 of file device/cuda/compat.h.

◆ ccl_gpu_shared

#define ccl_gpu_shared   __shared__

Definition at line 51 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_syncthreads

#define ccl_gpu_syncthreads ( )
Value:
__syncthreads()

Definition at line 77 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_thread_idx_x

#define ccl_gpu_thread_idx_x   (threadIdx.x)

Definition at line 65 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_thread_mask

#define ccl_gpu_thread_mask ( thread_warp)
Value:
uint(0xFFFFFFFF >> (ccl_gpu_warp_size - thread_warp))
unsigned int uint
#define ccl_gpu_warp_size

Definition at line 70 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_warp_size

#define ccl_gpu_warp_size   (warpSize)

Definition at line 69 of file device/cuda/compat.h.

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_inline_constant

#define ccl_inline_constant   __constant__

Definition at line 47 of file device/cuda/compat.h.

◆ ccl_may_alias

#define ccl_may_alias

Definition at line 54 of file device/cuda/compat.h.

◆ CCL_NAMESPACE_BEGIN

#define CCL_NAMESPACE_BEGIN

Definition at line 9 of file device/cuda/compat.h.

◆ CCL_NAMESPACE_END

◆ ccl_optional_struct_init

#define ccl_optional_struct_init

Definition at line 57 of file device/cuda/compat.h.

◆ ccl_private

#define ccl_private

Definition at line 52 of file device/cuda/compat.h.

◆ ccl_ray_data

#define ccl_ray_data   ccl_private

Definition at line 53 of file device/cuda/compat.h.

◆ ccl_restrict

#define ccl_restrict   __restrict__

Definition at line 55 of file device/cuda/compat.h.

◆ ccl_static_constexpr

#define ccl_static_constexpr   static constexpr

Definition at line 49 of file device/cuda/compat.h.

◆ cosf

#define cosf ( x)
Value:
__cosf(((float)(x)))

Definition at line 105 of file device/cuda/compat.h.

Referenced by angle_to_mat2(), area_light_rect_sample(), axis_angle_normalized_to_mat3(), axis_angle_normalized_to_quat(), axis_angle_to_mat3_single(), axis_angle_to_quat_single(), batch_sphere_lat_lon_vert(), bevel_quarter_fill(), bevel_vert_construct(), BKE_brush_sample_masktex(), BKE_brush_sample_tex_3d(), BLI_easing_sine_ease_in(), BLI_easing_sine_ease_in_out(), BLI_rctf_rotate_expand(), bm_edge_delmimit_data_from_op(), BM_edges_sharp_from_angle_set(), BM_mesh_decimate_dissolve_ex(), bmo_connect_verts_nonplanar_exec(), bmo_create_uvsphere_exec(), bsdf_ashikhmin_shirley_sample_first_quadrant(), bsdf_hair_chiang_sample(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), btCos(), build_underline(), blender::ed::sculpt_paint::calc_brush_local_mat(), OrientationBounds::calculate_measure(), blender::nodes::node_shader_tex_magic_cc::MagicFunction::call(), camera_stereo3d_model_matrix(), central_cylindrical_to_direction(), blender::eevee::circle_to_polygon_radius(), compute_2d_gabor_kernel(), compute_3d_gabor_kernel(), compute_seam_normal(), blender::bke::mesh::corner_space_custom_data_to_normal(), cos(), cubic_tangent_factor_circle_v3(), curve_bevel_make_full_circle(), curve_nurb_select_similar_type(), curveprofile_build_supports(), LightManager::device_update_background(), LightManager::device_update_lights(), dial_ghostarc_draw_incremental_angle(), do_kink(), do_vert_pair(), doEdgeSplit(), draw_circle_in_quad(), blender::ed::vse::draw_cursor_2d(), draw_disk_shaded(), blender::seq::draw_text_shadow(), blender::ed::vse::draw_vectorscope_graticule(), edbm_select_linked_flat_faces_exec(), edbm_select_sharp_edges_exec(), eul_to_quat(), euler_to_transform(), feline_eval(), blender::eevee::film_filter_weight(), filter_func_blackman_harris(), fisheye_to_direction(), geographical_to_direction(), geometry_collide_offset(), blender::RandomNumberGenerator::get_unit_float2(), blender::RandomNumberGenerator::get_unit_float3(), gizmo_spot_blend_prop_matrix_get(), gizmo_spot_blend_prop_matrix_set(), blender::draw::gpencil::gpencil_material_pool_create(), imm_draw_circle(), imm_draw_circle_3D(), imm_draw_circle_partial(), imm_draw_circle_partial_3d(), imm_draw_cylinder_fill_3d(), imm_draw_cylinder_fill_normal_3d(), imm_draw_cylinder_wire_3d(), imm_draw_disk_partial(), imm_draw_disk_partial_3d(), iridescence_lookup_sensitivity(), blender::eevee::DepthOfField::jitter_apply(), light_tree_importance(), lineart_geometry_object_load(), blender::ed::sculpt_paint::load_tex_task_cb_ex(), magic(), make_bevel_list_2D(), mat3_to_quat_legacy(), mball_select_similar_type(), merge(), blender::bke::mesh::mesh_edges_sharp_tag(), mesh_uv_reset_array(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), blender::ed::space_node::node_update_hidden(), blender::draw::overlay::ForceFields::object_sync(), blender::draw::overlay::Lights::object_sync(), blender::ed::object::object_warp_transverts(), offset_meet(), one_minus_cos(), orthogonalize_stable(), blender::geometry::p_chart_rotate_minimum_area(), blender::geometry::p_chart_stretch_minimize(), blender::geometry::pack_gobel(), blender::draw::pack_rotation_aspect_hardness(), blender::ed::sculpt_paint::paint_stroke_line_constrain(), polar_to_cartesian(), polar_to_x(), pow_qt_fl_normalized(), blender::draw::precompute_sphere_points(), blender::ed::greasepencil::primitive_calulate_curve_positions(), project_state_init(), psys_get_birth_coords(), quat_interpolate(), quat_split_swing_and_twist(), radangle2imp(), radial_control_set_initial_mouse(), regular_polygon_sample(), rotate(), rotate_around_axis(), rotate_m4(), rotate_normalized_v3_v3v3fl(), rotate_point_v2(), rotate_v2_v2fl(), blender::eevee::Sampling::sample_ball(), blender::eevee::Sampling::sample_disk(), blender::eevee::Sampling::sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), blender::eevee::Sampling::sample_spiral(), blender::ed::transform::SeqToTransData(), blender::draw::overlay::ShapeCache::ShapeCache(), shell_angle_to_dist(), shift_cos_in(), simpleDeform_bend(), simpleDeform_twist(), sin_cos_from_fraction(), sky_angle_between(), SKY_nishita_skymodel_precompute_sun(), blender::nodes::node_shader_tex_sky_cc::sky_perez_function(), sky_perez_function(), sky_perez_function(), sky_radiance_internal(), slide_marker_modal(), smart_project_exec(), spherical_cos_to_direction(), spherical_stereo_transform(), spherical_to_direction(), spot_light_tree_parameters(), svm_magic(), svm_math(), svm_vector_math(), TEST(), test_sin_cos_from_fraction_accuracy(), blender::ed::transform::transform_draw_cursor_draw(), blender::seq::transform_image(), transform_rotate(), tri_to_quat_ex(), blender::nodes::try_dispatch_float_math_fl3_to_fl3(), blender::nodes::try_dispatch_float_math_fl_to_fl(), ui_but_pie_dir(), ui_draw_but_HSVCIRCLE(), ui_hsvcircle_pos_from_vals(), uv_image_outset(), uv_map_rotation_matrix_ex(), blender::ed::transform::uv_rotation_in_clip_bounds_test(), valuefn(), vec_to_quat(), vfont_char_build_impl(), vfont_to_curve(), blender::ed::sculpt_paint::vwpaint::view_angle_limits_init(), and WIDGETGROUP_light_spot_refresh().

◆ expf

◆ kernel_assert

#define kernel_assert ( cond)

Definition at line 61 of file device/cuda/compat.h.

◆ logf

◆ powf

#define powf ( x,
y )
Value:
__powf(((float)(x)), ((float)(y)))

Definition at line 107 of file device/cuda/compat.h.

Referenced by aggregate_item_normal(), blender::seq::WhiteBalanceApplyOp::apply(), Hair::apply_transform(), PointCloud::apply_transform(), blender::draw::overlay::Fade::begin_sync(), BKE_screen_view3d_zoom_to_fac(), BLI_easing_elastic_ease_in(), BLI_easing_elastic_ease_in_out(), BLI_easing_elastic_ease_out(), BLI_easing_expo_ease_in(), BLI_easing_expo_ease_out(), BLI_noise_mg_fbm(), BLI_noise_mg_hetero_terrain(), BLI_noise_mg_hybrid_multi_fractal(), BLI_noise_mg_multi_fractal(), BLI_noise_mg_ridged_multi_fractal(), blinn_specular(), blender::ed::sculpt_paint::brush_dynamic_size_get(), brush_strength(), bsdf_ashikhmin_shirley_eval(), bsdf_ashikhmin_shirley_sample(), bsdf_ashikhmin_shirley_sample_first_quadrant(), btPow(), ceil_power_of_10(), cineonOpen(), cloth_calc_average_acceleration(), blender::seq::color_balance_lgg(), blender::seq::color_balance_sop(), color_linear_to_srgb(), color_srgb_to_linear(), compatible_powf(), compute_bbone_segment_boundaries(), computeBindWeights(), LightManager::device_update_lights(), dist_Minkovsky(), do_path_effectors(), do_physical_effector(), dpxCreate(), dpxOpen(), ED_space_image_grid_steps(), ED_space_image_zoom_level(), blender::seq::fill_rect_alpha_under(), film_write_data_passes(), floor_power_of_10(), Integrator::get_adaptive_sampling(), get_display_buffer_processor(), getLinToLogLut(), getLinToSrgbLut(), getLogToLinLut(), getSrgbToLinLut(), image_buf_fill_checker_slice(), image_view_zoom_in_exec(), image_view_zoom_out_exec(), IMB_colormanagement_setup_glsl_draw_from_space(), imb_save_dpx(), blender::seq::ColorBalanceApplyOp::init_lgg(), linearrgb_to_srgb(), M_Geometry_intersect_sphere_sphere_2d(), microfacet_fresnel(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), nla_combine_get_inverted_lower_value(), nla_combine_get_inverted_strip_value(), nla_combine_value(), blender::ed::sculpt_paint::expand::normals_falloff_create(), phase_fournier_forand(), phase_fournier_forand_coeffs(), phase_fournier_forand_newton(), phase_mie(), phase_mie_fitted_parameters(), pow(), power(), power(), power(), blender::io::obj::round_float_to_n_digits(), rule_goal_avoid(), safe_powf(), shaperadius(), sizelike_evaluate(), sky_radiance_internal(), snap_to_superellipsoid(), splineik_evaluate_bone(), srgb_to_linearrgb(), stretchto_evaluate(), subdivide_base(), svd_m4(), svm_math_gamma_color(), svm_node_layer_weight(), blender::seq::tonemap_rd_photoreceptor(), blender::seq::tonemap_simple(), ui_do_but_NUM(), ui_do_but_SLI(), ui_numedit_apply_snapf(), ui_numedit_begin(), ui_numedit_but_NUM(), ui_numedit_but_SLI(), UI_view2d_dot_grid_draw(), update_reports_display_invoke(), value_dissolve(), view3d_grid_steps_ex(), view_zoom_in_exec(), view_zoom_out_exec(), voronoi_distance(), and wm_pressure_curve().

◆ sinf

#define sinf ( x)
Value:
__sinf(((float)(x)))

Definition at line 106 of file device/cuda/compat.h.

Referenced by angle_to_mat2(), arc_length(), Light::area(), area_light_rect_sample(), axis_angle_normalized_to_mat3(), axis_angle_normalized_to_quat(), axis_angle_to_mat3_single(), axis_angle_to_quat_single(), background_cdf(), background_map_pdf(), background_map_sample(), batch_sphere_lat_lon_vert(), bevel_quarter_fill(), bevel_vert_construct(), BKE_brush_sample_masktex(), BKE_brush_sample_tex_3d(), BKE_light_area(), BLI_easing_elastic_ease_in(), BLI_easing_elastic_ease_in_out(), BLI_easing_elastic_ease_out(), BLI_easing_sine_ease_out(), BLI_rctf_rotate_expand(), bmo_create_uvsphere_exec(), bsdf_ashikhmin_shirley_sample_first_quadrant(), btSin(), build_underline(), calc_bevel_sin_cos(), blender::ed::sculpt_paint::calc_brush_local_mat(), OrientationBounds::calculate_measure(), blender::nodes::node_shader_tex_magic_cc::MagicFunction::call(), blender::nodes::node_shader_tex_wave_cc::WaveFunction::call(), camera_stereo3d_model_matrix(), central_cylindrical_to_direction(), compute_seam_normal(), computeAngularWeight(), computeBindWeights(), blender::bke::mesh::corner_space_custom_data_to_normal(), cubic_tangent_factor_circle_v3(), curve_bevel_make_full_circle(), curveprofile_build_supports(), LightManager::device_update_background(), LightManager::device_update_lights(), dial_ghostarc_draw_incremental_angle(), direction_to_fisheye_equisolid(), do_kink(), do_vert_pair(), draw_bone_degrees_of_freedom(), draw_circle_in_quad(), blender::ed::vse::draw_cursor_2d(), draw_disk_shaded(), blender::seq::draw_text_shadow(), blender::ed::vse::draw_vectorscope_graticule(), eul_to_quat(), euler_to_transform(), feline_eval(), fisheye_equisolid_to_direction(), fisheye_to_direction(), geographical_to_direction(), geometry_collide_offset(), blender::RandomNumberGenerator::get_unit_float2(), blender::RandomNumberGenerator::get_unit_float3(), get_updated_data_for_edge(), blender::draw::gpencil::gpencil_material_pool_create(), hair_alpha_angles(), imm_draw_circle(), imm_draw_circle_3D(), imm_draw_circle_partial(), imm_draw_circle_partial_3d(), imm_draw_cylinder_fill_3d(), imm_draw_cylinder_fill_normal_3d(), imm_draw_cylinder_wire_3d(), imm_draw_disk_partial(), imm_draw_disk_partial_3d(), interp_dot_slerp(), blender::eevee::DepthOfField::jitter_apply(), blender::ed::sculpt_paint::load_tex_task_cb_ex(), magic(), make_bevel_list_2D(), mat3_to_quat_legacy(), merge(), mesh_uv_reset_array(), blender::ed::space_node::node_update_hidden(), blender::draw::overlay::ForceFields::object_sync(), blender::ed::object::object_warp_transverts(), offset_meet_edge(), offset_on_edge_between(), orthogonalize_stable(), blender::geometry::p_chart_rotate_minimum_area(), blender::geometry::p_chart_stretch_minimize(), blender::ed::sculpt_paint::paint_stroke_line_constrain(), polar_to_cartesian(), polar_to_y(), pow_qt_fl_normalized(), blender::draw::precompute_sphere_points(), blender::ed::greasepencil::primitive_calulate_curve_positions(), psys_get_birth_coords(), quat_interpolate(), quat_split_swing_and_twist(), quat_to_axis_angle(), radangle2imp(), radial_control_set_initial_mouse(), regular_polygon_sample(), blender::eevee::regular_polygon_side_length(), rotate(), rotate_around_axis(), rotate_m4(), rotate_normalized_v3_v3v3fl(), rotate_point_v2(), rotate_v2_v2fl(), blender::eevee::Sampling::sample_ball(), blender::eevee::Sampling::sample_disk(), blender::eevee::Sampling::sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), blender::eevee::Sampling::sample_spiral(), blender::ed::transform::SeqToTransData(), blender::draw::overlay::ShapeCache::ShapeCache(), simpleDeform_bend(), simpleDeform_twist(), sin_cos_from_fraction(), sky_angle_between(), slide_marker_modal(), spherical_cos_to_direction(), spherical_to_direction(), square_out_adj_vmesh(), svm_magic(), svm_math(), svm_vector_math(), svm_wave(), TEST(), test_sin_cos_from_fraction_accuracy(), tex_sin(), blender::ed::transform::transform_draw_cursor_draw(), blender::seq::transform_image(), transform_rotate(), tri_to_quat_ex(), blender::nodes::try_dispatch_float_math_fl3_to_fl3(), blender::nodes::try_dispatch_float_math_fl_to_fl(), ui_but_pie_dir(), ui_draw_but_HSVCIRCLE(), ui_hsvcircle_pos_from_vals(), ui_numedit_but_UNITVEC(), uv_map_rotation_matrix_ex(), blender::ed::transform::uv_rotation_in_clip_bounds_test(), valuefn(), vec_to_quat(), vfont_char_build_impl(), and vfont_to_curve().

◆ tanf

Typedef Documentation

◆ ccl_gpu_tex_object_2D

◆ ccl_gpu_tex_object_3D

◆ CUtexObject

◆ half

typedef unsigned short half

Definition at line 114 of file device/cuda/compat.h.

Function Documentation

◆ __float2half()

ccl_device_forceinline half __float2half ( const float f)

Definition at line 116 of file device/cuda/compat.h.

References ccl_device_forceinline.

◆ __half2float()

ccl_device_forceinline float __half2float ( const half h)

Definition at line 123 of file device/cuda/compat.h.

References ccl_device_forceinline.

Referenced by half_to_float_image().

◆ ccl_gpu_tex_object_read_2D()

template<typename T>
ccl_device_forceinline T ccl_gpu_tex_object_read_2D ( const ccl_gpu_tex_object_2D texobj,
const float x,
const float y )

Definition at line 87 of file device/cuda/compat.h.

References ccl_device_forceinline, T, x, and y.

Referenced by kernel_tex_image_interp_bicubic().

◆ ccl_gpu_tex_object_read_3D()

template<typename T>
ccl_device_forceinline T ccl_gpu_tex_object_read_3D ( const ccl_gpu_tex_object_3D texobj,
const float x,
const float y,
const float z )

Definition at line 95 of file device/cuda/compat.h.

References ccl_device_forceinline, T, x, y, and z().

Referenced by kernel_tex_image_interp_tricubic().