Blender V5.3
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__ __inline__
#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 ccl_attr_maybe_unused   [[maybe_unused]]
#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_image_object_2D
typedef unsigned short half

Functions

template<typename T>
ccl_device_forceinline T ccl_gpu_image_object_read_2D (const ccl_gpu_image_object_2D texobj, const float x, const float y)
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 51 of file device/cuda/compat.h.

◆ ccl_attr_maybe_unused

#define ccl_attr_maybe_unused   [[maybe_unused]]

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

◆ ccl_constant

#define ccl_constant   const

Definition at line 45 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 43 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 36 of file device/cuda/compat.h.

◆ ccl_device_inline

#define ccl_device_inline   __device__ __inline__

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

◆ ccl_device_inline_method

#define ccl_device_inline_method   ccl_device

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

◆ ccl_device_noinline

#define ccl_device_noinline   __device__ __noinline__

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

◆ ccl_device_noinline_cpu

#define ccl_device_noinline_cpu   ccl_device

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

◆ ccl_device_template_spec

#define ccl_device_template_spec   template<> ccl_device_inline

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

◆ ccl_global

#define ccl_global

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

◆ ccl_gpu_ballot

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

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

Referenced by gpu_parallel_active_index_array_impl().

◆ ccl_gpu_block_dim_x

◆ ccl_gpu_block_idx_x

◆ 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 68 of file device/cuda/compat.h.

◆ ccl_gpu_global_size_x

#define ccl_gpu_global_size_x ( )
Value:

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

◆ ccl_gpu_grid_dim_x

#define ccl_gpu_grid_dim_x   (gridDim.x)

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

◆ ccl_gpu_shared

#define ccl_gpu_shared   __shared__

◆ ccl_gpu_syncthreads

#define ccl_gpu_syncthreads ( )

◆ ccl_gpu_thread_idx_x

◆ ccl_gpu_thread_mask

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

Definition at line 66 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 65 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 42 of file device/cuda/compat.h.

◆ ccl_may_alias

#define ccl_may_alias

Definition at line 49 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 52 of file device/cuda/compat.h.

◆ ccl_private

#define ccl_private

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

◆ ccl_ray_data

#define ccl_ray_data   ccl_private

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

◆ ccl_restrict

#define ccl_restrict   __restrict__

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

◆ ccl_static_constexpr

#define ccl_static_constexpr   static constexpr

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

◆ cosf

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

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

◆ expf

#define expf ( x)
Value:
__expf(((float)(x)))

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

Referenced by beta(), blender::BKE_pchan_bbone_spline_compute(), bsdf_aniso_D(), bsdf_ashikhmin_velvet_eval(), bsdf_ashikhmin_velvet_sample(), bsdf_D(), bsdf_hair_chiang_sample(), bsdf_hair_huang_sample(), bssrdf_burley_eval(), bssrdf_burley_root_find(), bssrdf_dipole_compute_Rd(), btExp(), blender::eevee::burley_eval(), compute_2d_gabor_kernel(), compute_3d_gabor_kernel(), density_mie(), density_rayleigh(), blender::distlimit_evaluate(), blender::do_kink_spiral_deform(), exp(), exp(), exp(), exp(), blender::fcm_smooth_frame(), blender::eevee::film_filter_weight(), film_get_pass_pixel_volume_majorant(), filter_func_gaussian(), blender::filter_gauss(), blender::math::filter_kernel_value(), get_aerosol_density(), get_molecular_absorption_coefficient(), get_molecular_scattering_coefficient(), blender::init_track_for_stabilization(), logistic(), logistic_cdf(), longitudinal_scattering(), SkyMultipleScattering::lookup_multiscattering(), microfacet_beckmann_sample_vndf(), blender::ui::numedit_but_NUM(), blender::fn::multi_function::register_common_functions_impl(), blender::rotation_contribution(), sample_exponential_distribution(), blender::sb_detect_face_pointCached(), single_scattering(), blender::nodes::node_shader_tex_sky_cc::sky_perez_function(), sky_perez_function(), sky_perez_function(), sky_radiance_internal(), blender::stabilization_calculate_data(), sun_radiation(), svm_math(), blender::seq::tonemap_rd_photoreceptor(), blender::valuefn(), and blender::waveModifier_do().

◆ kernel_assert

#define kernel_assert ( cond)

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

◆ logf

◆ powf

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

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

Referenced by blender::aggregate_item_normal(), blender::seq::WhiteBalanceApplyOp::apply(), Hair::apply_transform(), PointCloud::apply_transform(), blender::draw::overlay::Fade::begin_sync(), blender::BKE_screen_view3d_zoom_to_fac(), blender::BLI_easing_elastic_ease_in(), blender::BLI_easing_elastic_ease_in_out(), blender::BLI_easing_elastic_ease_out(), blender::BLI_easing_expo_ease_in(), blender::BLI_easing_expo_ease_out(), blender::BLI_noise_mg_fbm(), blender::BLI_noise_mg_hetero_terrain(), blender::BLI_noise_mg_hybrid_multi_fractal(), blender::BLI_noise_mg_multi_fractal(), blender::BLI_noise_mg_ridged_multi_fractal(), blender::blinn_specular(), blender::ed::sculpt_paint::brush_dynamic_size_get(), blender::ed::sculpt_paint::brush_strength(), bsdf_ashikhmin_shirley_eval(), bsdf_ashikhmin_shirley_sample(), bsdf_ashikhmin_shirley_sample_first_quadrant(), btPow(), blender::ceil_power_of_10(), blender::cineonOpen(), blender::cloth_calc_average_acceleration(), blender::seq::color_balance_lgg(), blender::seq::color_balance_sop(), color_linear_to_srgb(), color_srgb_to_linear(), compatible_powf(), blender::compute_bbone_segment_boundaries(), blender::computeBindWeights(), AreaLight::copy_to_kernel(), blender::dist_Minkovsky(), blender::ui::do_but_NUM(), blender::ui::do_but_SLI(), blender::do_path_effectors(), blender::do_physical_effector(), blender::ED_space_image_grid_steps(), blender::ED_space_image_zoom_level(), blender::seq::fill_rect_alpha_under(), film_write_data_passes(), blender::floor_power_of_10(), generalized_schlick_fresnel(), Integrator::get_adaptive_sampling(), blender::get_display_buffer_processor(), get_molecular_scattering_coefficient(), blender::getLinToLogLut(), blender::getLinToSrgbLut(), blender::getLogToLinLut(), blender::getSrgbToLinLut(), blender::draw::hair_shape_radius(), blender::image_buf_fill_checker_slice(), blender::image_view_zoom_in_exec(), blender::image_view_zoom_out_exec(), blender::IMB_colormanagement_setup_glsl_draw_from_space(), blender::seq::ColorBalanceApplyOp::init_lgg(), blender::linearrgb_to_srgb(), blender::M_Geometry_intersect_sphere_sphere_2d(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), blender::nla_combine_get_inverted_lower_value(), blender::nla_combine_get_inverted_strip_value(), blender::nla_combine_value(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ui::numedit_apply_snapf(), blender::ui::numedit_begin(), blender::ui::numedit_but_NUM(), blender::ui::numedit_but_SLI(), phase_fournier_forand(), phase_fournier_forand_coeffs(), phase_fournier_forand_newton(), phase_mie(), phase_mie_fitted_parameters(), pow(), power(), power(), power(), blender::prepare_save_dpx(), blender::io::obj::round_float_to_n_digits(), blender::rule_goal_avoid(), blender::safe_powf(), sample_geometric_distribution(), shaperadius(), blender::sizelike_evaluate(), sky_radiance_internal(), blender::geometry::construct::snap_to_superellipsoid(), blender::snap_to_superellipsoid(), blender::splineik_evaluate_bone(), blender::srgb_to_linearrgb(), blender::stretchto_evaluate(), blender::subdivide_base(), blender::svd_m4(), svm_math_gamma_color(), svm_node_layer_weight(), blender::seq::tonemap_rd_photoreceptor(), blender::seq::tonemap_simple(), blender::update_reports_display_invoke(), blender::uv_copy_mirrored_faces(), blender::value_dissolve(), blender::ui::view2d_dot_grid_draw(), blender::view3d_grid_steps_ex(), blender::view_zoom_in_exec(), blender::view_zoom_out_exec(), voronoi_distance(), and blender::wm_pressure_curve().

◆ sinf

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

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

◆ tanf

#define tanf ( x)
Value:
__tanf(((float)(x)))

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

Typedef Documentation

◆ ccl_gpu_image_object_2D

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

◆ CUtexObject

typedef unsigned long long CUtexObject

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

◆ half

typedef unsigned short half

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

Function Documentation

◆ __float2half()

ccl_device_forceinline half __float2half ( const float f)

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

References __float2half, and ccl_device_forceinline.

◆ __half2float()

ccl_device_forceinline float __half2float ( const half h)

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

References __half2float(), and ccl_device_forceinline.

Referenced by __half2float(), half4_to_float4(), and half_to_float().

◆ ccl_gpu_image_object_read_2D()