├── .gitignore ├── LICENSE ├── LICENSE_gaussian_splatting.md ├── README.md ├── arguments └── __init__.py ├── assets ├── pipeline.png └── teaser.png ├── configs ├── dnerf │ ├── bouncingballs.yaml │ ├── hellwarrior.yaml │ ├── hook.yaml │ ├── jumpingjacks.yaml │ ├── lego.yaml │ ├── mutant.yaml │ ├── standup.yaml │ └── trex.yaml └── dynerf │ ├── coffee_martini.yaml │ ├── cook_spinach.yaml │ ├── cut_roasted_beef.yaml │ ├── flame_salmon.yaml │ ├── flame_steak.yaml │ └── sear_steak.yaml ├── diff-gaussian-rasterization ├── CMakeLists.txt ├── README.md ├── cuda_rasterizer │ ├── auxiliary.h │ ├── backward.cu │ ├── backward.h │ ├── config.h │ ├── forward.cu │ ├── forward.h │ ├── rasterizer.h │ ├── rasterizer_impl.cu │ └── rasterizer_impl.h ├── ext.cpp ├── rasterize_points.cu ├── rasterize_points.h ├── setup.py └── third_party │ ├── glm │ ├── .appveyor.yml │ ├── .travis.yml │ ├── CMakeLists.txt │ ├── cmake │ │ └── cmake_uninstall.cmake.in │ ├── copying.txt │ ├── glm │ │ ├── CMakeLists.txt │ │ ├── common.hpp │ │ ├── detail │ │ │ ├── _features.hpp │ │ │ ├── _fixes.hpp │ │ │ ├── _noise.hpp │ │ │ ├── _swizzle.hpp │ │ │ ├── _swizzle_func.hpp │ │ │ ├── _vectorize.hpp │ │ │ ├── compute_common.hpp │ │ │ ├── compute_vector_relational.hpp │ │ │ ├── func_common.inl │ │ │ ├── func_common_simd.inl │ │ │ ├── func_exponential.inl │ │ │ ├── func_exponential_simd.inl │ │ │ ├── func_geometric.inl │ │ │ ├── func_geometric_simd.inl │ │ │ ├── func_integer.inl │ │ │ ├── func_integer_simd.inl │ │ │ ├── func_matrix.inl │ │ │ ├── func_matrix_simd.inl │ │ │ ├── func_packing.inl │ │ │ ├── func_packing_simd.inl │ │ │ ├── func_trigonometric.inl │ │ │ ├── func_trigonometric_simd.inl │ │ │ ├── func_vector_relational.inl │ │ │ ├── func_vector_relational_simd.inl │ │ │ ├── glm.cpp │ │ │ ├── qualifier.hpp │ │ │ ├── setup.hpp │ │ │ ├── type_float.hpp │ │ │ ├── type_half.hpp │ │ │ ├── type_half.inl │ │ │ ├── type_mat2x2.hpp │ │ │ ├── type_mat2x2.inl │ │ │ ├── type_mat2x3.hpp │ │ │ ├── type_mat2x3.inl │ │ │ ├── type_mat2x4.hpp │ │ │ ├── type_mat2x4.inl │ │ │ ├── type_mat3x2.hpp │ │ │ ├── type_mat3x2.inl │ │ │ ├── type_mat3x3.hpp │ │ │ ├── type_mat3x3.inl │ │ │ ├── type_mat3x4.hpp │ │ │ ├── type_mat3x4.inl │ │ │ ├── type_mat4x2.hpp │ │ │ ├── type_mat4x2.inl │ │ │ ├── type_mat4x3.hpp │ │ │ ├── type_mat4x3.inl │ │ │ ├── type_mat4x4.hpp │ │ │ ├── type_mat4x4.inl │ │ │ ├── type_mat4x4_simd.inl │ │ │ ├── type_quat.hpp │ │ │ ├── type_quat.inl │ │ │ ├── type_quat_simd.inl │ │ │ ├── type_vec1.hpp │ │ │ ├── type_vec1.inl │ │ │ ├── type_vec2.hpp │ │ │ ├── type_vec2.inl │ │ │ ├── type_vec3.hpp │ │ │ ├── type_vec3.inl │ │ │ ├── type_vec4.hpp │ │ │ ├── type_vec4.inl │ │ │ └── type_vec4_simd.inl │ │ ├── exponential.hpp │ │ ├── ext.hpp │ │ ├── ext │ │ │ ├── _matrix_vectorize.hpp │ │ │ ├── matrix_clip_space.hpp │ │ │ ├── matrix_clip_space.inl │ │ │ ├── matrix_common.hpp │ │ │ ├── matrix_common.inl │ │ │ ├── matrix_double2x2.hpp │ │ │ ├── matrix_double2x2_precision.hpp │ │ │ ├── matrix_double2x3.hpp │ │ │ ├── matrix_double2x3_precision.hpp │ │ │ ├── matrix_double2x4.hpp │ │ │ ├── matrix_double2x4_precision.hpp │ │ │ ├── matrix_double3x2.hpp │ │ │ ├── matrix_double3x2_precision.hpp │ │ │ ├── matrix_double3x3.hpp │ │ │ ├── matrix_double3x3_precision.hpp │ │ │ ├── matrix_double3x4.hpp │ │ │ ├── matrix_double3x4_precision.hpp │ │ │ ├── matrix_double4x2.hpp │ │ │ ├── matrix_double4x2_precision.hpp │ │ │ ├── matrix_double4x3.hpp │ │ │ ├── matrix_double4x3_precision.hpp │ │ │ ├── matrix_double4x4.hpp │ │ │ ├── matrix_double4x4_precision.hpp │ │ │ ├── matrix_float2x2.hpp │ │ │ ├── matrix_float2x2_precision.hpp │ │ │ ├── matrix_float2x3.hpp │ │ │ ├── matrix_float2x3_precision.hpp │ │ │ ├── matrix_float2x4.hpp │ │ │ ├── matrix_float2x4_precision.hpp │ │ │ ├── matrix_float3x2.hpp │ │ │ ├── matrix_float3x2_precision.hpp │ │ │ ├── matrix_float3x3.hpp │ │ │ ├── matrix_float3x3_precision.hpp │ │ │ ├── matrix_float3x4.hpp │ │ │ ├── matrix_float3x4_precision.hpp │ │ │ ├── matrix_float4x2.hpp │ │ │ ├── matrix_float4x2_precision.hpp │ │ │ ├── matrix_float4x3.hpp │ │ │ ├── matrix_float4x3_precision.hpp │ │ │ ├── matrix_float4x4.hpp │ │ │ ├── matrix_float4x4_precision.hpp │ │ │ ├── matrix_int2x2.hpp │ │ │ ├── matrix_int2x2_sized.hpp │ │ │ ├── matrix_int2x3.hpp │ │ │ ├── matrix_int2x3_sized.hpp │ │ │ ├── matrix_int2x4.hpp │ │ │ ├── matrix_int2x4_sized.hpp │ │ │ ├── matrix_int3x2.hpp │ │ │ ├── matrix_int3x2_sized.hpp │ │ │ ├── matrix_int3x3.hpp │ │ │ ├── matrix_int3x3_sized.hpp │ │ │ ├── matrix_int3x4.hpp │ │ │ ├── matrix_int3x4_sized.hpp │ │ │ ├── matrix_int4x2.hpp │ │ │ ├── matrix_int4x2_sized.hpp │ │ │ ├── matrix_int4x3.hpp │ │ │ ├── matrix_int4x3_sized.hpp │ │ │ ├── matrix_int4x4.hpp │ │ │ ├── matrix_int4x4_sized.hpp │ │ │ ├── matrix_integer.hpp │ │ │ ├── matrix_integer.inl │ │ │ ├── matrix_projection.hpp │ │ │ ├── matrix_projection.inl │ │ │ ├── matrix_relational.hpp │ │ │ ├── matrix_relational.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── matrix_uint2x2.hpp │ │ │ ├── matrix_uint2x2_sized.hpp │ │ │ ├── matrix_uint2x3.hpp │ │ │ ├── matrix_uint2x3_sized.hpp │ │ │ ├── matrix_uint2x4.hpp │ │ │ ├── matrix_uint2x4_sized.hpp │ │ │ ├── matrix_uint3x2.hpp │ │ │ ├── matrix_uint3x2_sized.hpp │ │ │ ├── matrix_uint3x3.hpp │ │ │ ├── matrix_uint3x3_sized.hpp │ │ │ ├── matrix_uint3x4.hpp │ │ │ ├── matrix_uint3x4_sized.hpp │ │ │ ├── matrix_uint4x2.hpp │ │ │ ├── matrix_uint4x2_sized.hpp │ │ │ ├── matrix_uint4x3.hpp │ │ │ ├── matrix_uint4x3_sized.hpp │ │ │ ├── matrix_uint4x4.hpp │ │ │ ├── matrix_uint4x4_sized.hpp │ │ │ ├── quaternion_common.hpp │ │ │ ├── quaternion_common.inl │ │ │ ├── quaternion_common_simd.inl │ │ │ ├── quaternion_double.hpp │ │ │ ├── quaternion_double_precision.hpp │ │ │ ├── quaternion_exponential.hpp │ │ │ ├── quaternion_exponential.inl │ │ │ ├── quaternion_float.hpp │ │ │ ├── quaternion_float_precision.hpp │ │ │ ├── quaternion_geometric.hpp │ │ │ ├── quaternion_geometric.inl │ │ │ ├── quaternion_relational.hpp │ │ │ ├── quaternion_relational.inl │ │ │ ├── quaternion_transform.hpp │ │ │ ├── quaternion_transform.inl │ │ │ ├── quaternion_trigonometric.hpp │ │ │ ├── quaternion_trigonometric.inl │ │ │ ├── scalar_common.hpp │ │ │ ├── scalar_common.inl │ │ │ ├── scalar_constants.hpp │ │ │ ├── scalar_constants.inl │ │ │ ├── scalar_int_sized.hpp │ │ │ ├── scalar_integer.hpp │ │ │ ├── scalar_integer.inl │ │ │ ├── scalar_packing.hpp │ │ │ ├── scalar_packing.inl │ │ │ ├── scalar_reciprocal.hpp │ │ │ ├── scalar_reciprocal.inl │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── scalar_uint_sized.hpp │ │ │ ├── scalar_ulp.hpp │ │ │ ├── scalar_ulp.inl │ │ │ ├── vector_bool1.hpp │ │ │ ├── vector_bool1_precision.hpp │ │ │ ├── vector_bool2.hpp │ │ │ ├── vector_bool2_precision.hpp │ │ │ ├── vector_bool3.hpp │ │ │ ├── vector_bool3_precision.hpp │ │ │ ├── vector_bool4.hpp │ │ │ ├── vector_bool4_precision.hpp │ │ │ ├── vector_common.hpp │ │ │ ├── vector_common.inl │ │ │ ├── vector_double1.hpp │ │ │ ├── vector_double1_precision.hpp │ │ │ ├── vector_double2.hpp │ │ │ ├── vector_double2_precision.hpp │ │ │ ├── vector_double3.hpp │ │ │ ├── vector_double3_precision.hpp │ │ │ ├── vector_double4.hpp │ │ │ ├── vector_double4_precision.hpp │ │ │ ├── vector_float1.hpp │ │ │ ├── vector_float1_precision.hpp │ │ │ ├── vector_float2.hpp │ │ │ ├── vector_float2_precision.hpp │ │ │ ├── vector_float3.hpp │ │ │ ├── vector_float3_precision.hpp │ │ │ ├── vector_float4.hpp │ │ │ ├── vector_float4_precision.hpp │ │ │ ├── vector_int1.hpp │ │ │ ├── vector_int1_sized.hpp │ │ │ ├── vector_int2.hpp │ │ │ ├── vector_int2_sized.hpp │ │ │ ├── vector_int3.hpp │ │ │ ├── vector_int3_sized.hpp │ │ │ ├── vector_int4.hpp │ │ │ ├── vector_int4_sized.hpp │ │ │ ├── vector_integer.hpp │ │ │ ├── vector_integer.inl │ │ │ ├── vector_packing.hpp │ │ │ ├── vector_packing.inl │ │ │ ├── vector_reciprocal.hpp │ │ │ ├── vector_reciprocal.inl │ │ │ ├── vector_relational.hpp │ │ │ ├── vector_relational.inl │ │ │ ├── vector_uint1.hpp │ │ │ ├── vector_uint1_sized.hpp │ │ │ ├── vector_uint2.hpp │ │ │ ├── vector_uint2_sized.hpp │ │ │ ├── vector_uint3.hpp │ │ │ ├── vector_uint3_sized.hpp │ │ │ ├── vector_uint4.hpp │ │ │ ├── vector_uint4_sized.hpp │ │ │ ├── vector_ulp.hpp │ │ │ └── vector_ulp.inl │ │ ├── fwd.hpp │ │ ├── geometric.hpp │ │ ├── glm.hpp │ │ ├── gtc │ │ │ ├── bitfield.hpp │ │ │ ├── bitfield.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── constants.hpp │ │ │ ├── constants.inl │ │ │ ├── epsilon.hpp │ │ │ ├── epsilon.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── matrix_access.hpp │ │ │ ├── matrix_access.inl │ │ │ ├── matrix_integer.hpp │ │ │ ├── matrix_inverse.hpp │ │ │ ├── matrix_inverse.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── noise.hpp │ │ │ ├── noise.inl │ │ │ ├── packing.hpp │ │ │ ├── packing.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── quaternion_simd.inl │ │ │ ├── random.hpp │ │ │ ├── random.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── round.hpp │ │ │ ├── round.inl │ │ │ ├── type_aligned.hpp │ │ │ ├── type_precision.hpp │ │ │ ├── type_precision.inl │ │ │ ├── type_ptr.hpp │ │ │ ├── type_ptr.inl │ │ │ ├── ulp.hpp │ │ │ ├── ulp.inl │ │ │ └── vec1.hpp │ │ ├── gtx │ │ │ ├── associated_min_max.hpp │ │ │ ├── associated_min_max.inl │ │ │ ├── bit.hpp │ │ │ ├── bit.inl │ │ │ ├── closest_point.hpp │ │ │ ├── closest_point.inl │ │ │ ├── color_encoding.hpp │ │ │ ├── color_encoding.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── color_space_YCoCg.hpp │ │ │ ├── color_space_YCoCg.inl │ │ │ ├── common.hpp │ │ │ ├── common.inl │ │ │ ├── compatibility.hpp │ │ │ ├── compatibility.inl │ │ │ ├── component_wise.hpp │ │ │ ├── component_wise.inl │ │ │ ├── dual_quaternion.hpp │ │ │ ├── dual_quaternion.inl │ │ │ ├── easing.hpp │ │ │ ├── easing.inl │ │ │ ├── euler_angles.hpp │ │ │ ├── euler_angles.inl │ │ │ ├── extend.hpp │ │ │ ├── extend.inl │ │ │ ├── extended_min_max.hpp │ │ │ ├── extended_min_max.inl │ │ │ ├── exterior_product.hpp │ │ │ ├── exterior_product.inl │ │ │ ├── fast_exponential.hpp │ │ │ ├── fast_exponential.inl │ │ │ ├── fast_square_root.hpp │ │ │ ├── fast_square_root.inl │ │ │ ├── fast_trigonometry.hpp │ │ │ ├── fast_trigonometry.inl │ │ │ ├── float_notmalize.inl │ │ │ ├── functions.hpp │ │ │ ├── functions.inl │ │ │ ├── gradient_paint.hpp │ │ │ ├── gradient_paint.inl │ │ │ ├── handed_coordinate_space.hpp │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── hash.hpp │ │ │ ├── hash.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── intersect.hpp │ │ │ ├── intersect.inl │ │ │ ├── io.hpp │ │ │ ├── io.inl │ │ │ ├── log_base.hpp │ │ │ ├── log_base.inl │ │ │ ├── matrix_cross_product.hpp │ │ │ ├── matrix_cross_product.inl │ │ │ ├── matrix_decompose.hpp │ │ │ ├── matrix_decompose.inl │ │ │ ├── matrix_factorisation.hpp │ │ │ ├── matrix_factorisation.inl │ │ │ ├── matrix_interpolation.hpp │ │ │ ├── matrix_interpolation.inl │ │ │ ├── matrix_major_storage.hpp │ │ │ ├── matrix_major_storage.inl │ │ │ ├── matrix_operation.hpp │ │ │ ├── matrix_operation.inl │ │ │ ├── matrix_query.hpp │ │ │ ├── matrix_query.inl │ │ │ ├── matrix_transform_2d.hpp │ │ │ ├── matrix_transform_2d.inl │ │ │ ├── mixed_product.hpp │ │ │ ├── mixed_product.inl │ │ │ ├── norm.hpp │ │ │ ├── norm.inl │ │ │ ├── normal.hpp │ │ │ ├── normal.inl │ │ │ ├── normalize_dot.hpp │ │ │ ├── normalize_dot.inl │ │ │ ├── number_precision.hpp │ │ │ ├── number_precision.inl │ │ │ ├── optimum_pow.hpp │ │ │ ├── optimum_pow.inl │ │ │ ├── orthonormalize.hpp │ │ │ ├── orthonormalize.inl │ │ │ ├── pca.hpp │ │ │ ├── pca.inl │ │ │ ├── perpendicular.hpp │ │ │ ├── perpendicular.inl │ │ │ ├── polar_coordinates.hpp │ │ │ ├── polar_coordinates.inl │ │ │ ├── projection.hpp │ │ │ ├── projection.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── range.hpp │ │ │ ├── raw_data.hpp │ │ │ ├── raw_data.inl │ │ │ ├── rotate_normalized_axis.hpp │ │ │ ├── rotate_normalized_axis.inl │ │ │ ├── rotate_vector.hpp │ │ │ ├── rotate_vector.inl │ │ │ ├── scalar_multiplication.hpp │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── spline.hpp │ │ │ ├── spline.inl │ │ │ ├── std_based_type.hpp │ │ │ ├── std_based_type.inl │ │ │ ├── string_cast.hpp │ │ │ ├── string_cast.inl │ │ │ ├── texture.hpp │ │ │ ├── texture.inl │ │ │ ├── transform.hpp │ │ │ ├── transform.inl │ │ │ ├── transform2.hpp │ │ │ ├── transform2.inl │ │ │ ├── type_aligned.hpp │ │ │ ├── type_aligned.inl │ │ │ ├── type_trait.hpp │ │ │ ├── type_trait.inl │ │ │ ├── vec_swizzle.hpp │ │ │ ├── vector_angle.hpp │ │ │ ├── vector_angle.inl │ │ │ ├── vector_query.hpp │ │ │ ├── vector_query.inl │ │ │ ├── wrap.hpp │ │ │ └── wrap.inl │ │ ├── integer.hpp │ │ ├── mat2x2.hpp │ │ ├── mat2x3.hpp │ │ ├── mat2x4.hpp │ │ ├── mat3x2.hpp │ │ ├── mat3x3.hpp │ │ ├── mat3x4.hpp │ │ ├── mat4x2.hpp │ │ ├── mat4x3.hpp │ │ ├── mat4x4.hpp │ │ ├── matrix.hpp │ │ ├── packing.hpp │ │ ├── simd │ │ │ ├── common.h │ │ │ ├── exponential.h │ │ │ ├── geometric.h │ │ │ ├── integer.h │ │ │ ├── matrix.h │ │ │ ├── neon.h │ │ │ ├── packing.h │ │ │ ├── platform.h │ │ │ ├── trigonometric.h │ │ │ └── vector_relational.h │ │ ├── trigonometric.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ └── vector_relational.hpp │ ├── test │ │ ├── CMakeLists.txt │ │ ├── bug │ │ │ ├── CMakeLists.txt │ │ │ └── bug_ms_vec_static.cpp │ │ ├── cmake │ │ │ ├── CMakeLists.txt │ │ │ └── test_find_glm.cpp │ │ ├── core │ │ │ ├── CMakeLists.txt │ │ │ ├── core_cpp_constexpr.cpp │ │ │ ├── core_cpp_defaulted_ctor.cpp │ │ │ ├── core_force_aligned_gentypes.cpp │ │ │ ├── core_force_arch_unknown.cpp │ │ │ ├── core_force_compiler_unknown.cpp │ │ │ ├── core_force_ctor_init.cpp │ │ │ ├── core_force_cxx03.cpp │ │ │ ├── core_force_cxx98.cpp │ │ │ ├── core_force_cxx_unknown.cpp │ │ │ ├── core_force_depth_zero_to_one.cpp │ │ │ ├── core_force_explicit_ctor.cpp │ │ │ ├── core_force_inline.cpp │ │ │ ├── core_force_left_handed.cpp │ │ │ ├── core_force_platform_unknown.cpp │ │ │ ├── core_force_pure.cpp │ │ │ ├── core_force_quat_xyzw.cpp │ │ │ ├── core_force_size_t_length.cpp │ │ │ ├── core_force_unrestricted_gentype.cpp │ │ │ ├── core_force_xyzw_only.cpp │ │ │ ├── core_func_common.cpp │ │ │ ├── core_func_exponential.cpp │ │ │ ├── core_func_geometric.cpp │ │ │ ├── core_func_integer.cpp │ │ │ ├── core_func_integer_bit_count.cpp │ │ │ ├── core_func_integer_find_lsb.cpp │ │ │ ├── core_func_integer_find_msb.cpp │ │ │ ├── core_func_matrix.cpp │ │ │ ├── core_func_noise.cpp │ │ │ ├── core_func_packing.cpp │ │ │ ├── core_func_swizzle.cpp │ │ │ ├── core_func_trigonometric.cpp │ │ │ ├── core_func_vector_relational.cpp │ │ │ ├── core_setup_force_cxx98.cpp │ │ │ ├── core_setup_force_size_t_length.cpp │ │ │ ├── core_setup_message.cpp │ │ │ ├── core_setup_platform_unknown.cpp │ │ │ ├── core_setup_precision.cpp │ │ │ ├── core_type_aligned.cpp │ │ │ ├── core_type_cast.cpp │ │ │ ├── core_type_ctor.cpp │ │ │ ├── core_type_int.cpp │ │ │ ├── core_type_length.cpp │ │ │ ├── core_type_mat2x2.cpp │ │ │ ├── core_type_mat2x3.cpp │ │ │ ├── core_type_mat2x4.cpp │ │ │ ├── core_type_mat3x2.cpp │ │ │ ├── core_type_mat3x3.cpp │ │ │ ├── core_type_mat3x4.cpp │ │ │ ├── core_type_mat4x2.cpp │ │ │ ├── core_type_mat4x3.cpp │ │ │ ├── core_type_mat4x4.cpp │ │ │ ├── core_type_vec1.cpp │ │ │ ├── core_type_vec2.cpp │ │ │ ├── core_type_vec3.cpp │ │ │ └── core_type_vec4.cpp │ │ ├── ext │ │ │ ├── CMakeLists.txt │ │ │ ├── ext_matrix_clip_space.cpp │ │ │ ├── ext_matrix_common.cpp │ │ │ ├── ext_matrix_int2x2_sized.cpp │ │ │ ├── ext_matrix_int2x3_sized.cpp │ │ │ ├── ext_matrix_int2x4_sized.cpp │ │ │ ├── ext_matrix_int3x2_sized.cpp │ │ │ ├── ext_matrix_int3x3_sized.cpp │ │ │ ├── ext_matrix_int3x4_sized.cpp │ │ │ ├── ext_matrix_int4x2_sized.cpp │ │ │ ├── ext_matrix_int4x3_sized.cpp │ │ │ ├── ext_matrix_int4x4_sized.cpp │ │ │ ├── ext_matrix_integer.cpp │ │ │ ├── ext_matrix_projection.cpp │ │ │ ├── ext_matrix_relational.cpp │ │ │ ├── ext_matrix_transform.cpp │ │ │ ├── ext_matrix_uint2x2_sized.cpp │ │ │ ├── ext_matrix_uint2x3_sized.cpp │ │ │ ├── ext_matrix_uint2x4_sized.cpp │ │ │ ├── ext_matrix_uint3x2_sized.cpp │ │ │ ├── ext_matrix_uint3x3_sized.cpp │ │ │ ├── ext_matrix_uint3x4_sized.cpp │ │ │ ├── ext_matrix_uint4x2_sized.cpp │ │ │ ├── ext_matrix_uint4x3_sized.cpp │ │ │ ├── ext_matrix_uint4x4_sized.cpp │ │ │ ├── ext_quaternion_common.cpp │ │ │ ├── ext_quaternion_exponential.cpp │ │ │ ├── ext_quaternion_geometric.cpp │ │ │ ├── ext_quaternion_relational.cpp │ │ │ ├── ext_quaternion_transform.cpp │ │ │ ├── ext_quaternion_trigonometric.cpp │ │ │ ├── ext_quaternion_type.cpp │ │ │ ├── ext_scalar_common.cpp │ │ │ ├── ext_scalar_constants.cpp │ │ │ ├── ext_scalar_int_sized.cpp │ │ │ ├── ext_scalar_integer.cpp │ │ │ ├── ext_scalar_packing.cpp │ │ │ ├── ext_scalar_reciprocal.cpp │ │ │ ├── ext_scalar_relational.cpp │ │ │ ├── ext_scalar_uint_sized.cpp │ │ │ ├── ext_scalar_ulp.cpp │ │ │ ├── ext_vec1.cpp │ │ │ ├── ext_vector_bool1.cpp │ │ │ ├── ext_vector_common.cpp │ │ │ ├── ext_vector_iec559.cpp │ │ │ ├── ext_vector_int1_sized.cpp │ │ │ ├── ext_vector_int2_sized.cpp │ │ │ ├── ext_vector_int3_sized.cpp │ │ │ ├── ext_vector_int4_sized.cpp │ │ │ ├── ext_vector_integer.cpp │ │ │ ├── ext_vector_integer_sized.cpp │ │ │ ├── ext_vector_packing.cpp │ │ │ ├── ext_vector_reciprocal.cpp │ │ │ ├── ext_vector_relational.cpp │ │ │ ├── ext_vector_uint1_sized.cpp │ │ │ ├── ext_vector_uint2_sized.cpp │ │ │ ├── ext_vector_uint3_sized.cpp │ │ │ ├── ext_vector_uint4_sized.cpp │ │ │ └── ext_vector_ulp.cpp │ │ ├── glm.cppcheck │ │ ├── gtc │ │ │ ├── CMakeLists.txt │ │ │ ├── gtc_bitfield.cpp │ │ │ ├── gtc_color_space.cpp │ │ │ ├── gtc_constants.cpp │ │ │ ├── gtc_epsilon.cpp │ │ │ ├── gtc_integer.cpp │ │ │ ├── gtc_matrix_access.cpp │ │ │ ├── gtc_matrix_integer.cpp │ │ │ ├── gtc_matrix_inverse.cpp │ │ │ ├── gtc_matrix_transform.cpp │ │ │ ├── gtc_noise.cpp │ │ │ ├── gtc_packing.cpp │ │ │ ├── gtc_quaternion.cpp │ │ │ ├── gtc_random.cpp │ │ │ ├── gtc_reciprocal.cpp │ │ │ ├── gtc_round.cpp │ │ │ ├── gtc_type_aligned.cpp │ │ │ ├── gtc_type_precision.cpp │ │ │ ├── gtc_type_ptr.cpp │ │ │ ├── gtc_ulp.cpp │ │ │ ├── gtc_user_defined_types.cpp │ │ │ └── gtc_vec1.cpp │ │ ├── gtx │ │ │ ├── CMakeLists.txt │ │ │ ├── gtx.cpp │ │ │ ├── gtx_associated_min_max.cpp │ │ │ ├── gtx_closest_point.cpp │ │ │ ├── gtx_color_encoding.cpp │ │ │ ├── gtx_color_space.cpp │ │ │ ├── gtx_color_space_YCoCg.cpp │ │ │ ├── gtx_common.cpp │ │ │ ├── gtx_compatibility.cpp │ │ │ ├── gtx_component_wise.cpp │ │ │ ├── gtx_dual_quaternion.cpp │ │ │ ├── gtx_easing.cpp │ │ │ ├── gtx_euler_angle.cpp │ │ │ ├── gtx_extend.cpp │ │ │ ├── gtx_extended_min_max.cpp │ │ │ ├── gtx_extented_min_max.cpp │ │ │ ├── gtx_exterior_product.cpp │ │ │ ├── gtx_fast_exponential.cpp │ │ │ ├── gtx_fast_square_root.cpp │ │ │ ├── gtx_fast_trigonometry.cpp │ │ │ ├── gtx_functions.cpp │ │ │ ├── gtx_gradient_paint.cpp │ │ │ ├── gtx_handed_coordinate_space.cpp │ │ │ ├── gtx_hash.cpp │ │ │ ├── gtx_int_10_10_10_2.cpp │ │ │ ├── gtx_integer.cpp │ │ │ ├── gtx_intersect.cpp │ │ │ ├── gtx_io.cpp │ │ │ ├── gtx_load.cpp │ │ │ ├── gtx_log_base.cpp │ │ │ ├── gtx_matrix_cross_product.cpp │ │ │ ├── gtx_matrix_decompose.cpp │ │ │ ├── gtx_matrix_factorisation.cpp │ │ │ ├── gtx_matrix_interpolation.cpp │ │ │ ├── gtx_matrix_major_storage.cpp │ │ │ ├── gtx_matrix_operation.cpp │ │ │ ├── gtx_matrix_query.cpp │ │ │ ├── gtx_matrix_transform_2d.cpp │ │ │ ├── gtx_mixed_product.cpp │ │ │ ├── gtx_norm.cpp │ │ │ ├── gtx_normal.cpp │ │ │ ├── gtx_normalize_dot.cpp │ │ │ ├── gtx_number_precision.cpp │ │ │ ├── gtx_optimum_pow.cpp │ │ │ ├── gtx_orthonormalize.cpp │ │ │ ├── gtx_pca.cpp │ │ │ ├── gtx_perpendicular.cpp │ │ │ ├── gtx_polar_coordinates.cpp │ │ │ ├── gtx_projection.cpp │ │ │ ├── gtx_quaternion.cpp │ │ │ ├── gtx_random.cpp │ │ │ ├── gtx_range.cpp │ │ │ ├── gtx_rotate_normalized_axis.cpp │ │ │ ├── gtx_rotate_vector.cpp │ │ │ ├── gtx_scalar_multiplication.cpp │ │ │ ├── gtx_scalar_relational.cpp │ │ │ ├── gtx_simd_mat4.cpp │ │ │ ├── gtx_simd_vec4.cpp │ │ │ ├── gtx_spline.cpp │ │ │ ├── gtx_string_cast.cpp │ │ │ ├── gtx_texture.cpp │ │ │ ├── gtx_type_aligned.cpp │ │ │ ├── gtx_type_trait.cpp │ │ │ ├── gtx_vec_swizzle.cpp │ │ │ ├── gtx_vector_angle.cpp │ │ │ ├── gtx_vector_query.cpp │ │ │ └── gtx_wrap.cpp │ │ └── perf │ │ │ ├── CMakeLists.txt │ │ │ ├── perf_matrix_div.cpp │ │ │ ├── perf_matrix_inverse.cpp │ │ │ ├── perf_matrix_mul.cpp │ │ │ ├── perf_matrix_mul_vector.cpp │ │ │ ├── perf_matrix_transpose.cpp │ │ │ └── perf_vector_mul_matrix.cpp │ └── util │ │ ├── autoexp.txt │ │ ├── autoexp.vc2010.dat │ │ ├── glm.natvis │ │ └── usertype.dat │ └── stbi_image_write.h ├── environment.yml ├── gaussian_renderer ├── __init__.py ├── diff_gaussian_rasterization.py └── network_gui.py ├── lpipsPyTorch ├── __init__.py └── modules │ ├── lpips.py │ ├── networks.py │ └── utils.py ├── pointops2 ├── __init__.py ├── functions │ ├── __init__.py │ ├── pointops.py │ ├── pointops2.py │ ├── pointops_ablation.py │ ├── test_attention_op_step1.py │ ├── test_attention_op_step1_v2.py │ ├── test_attention_op_step2.py │ ├── test_relative_pos_encoding_op_step1.py │ ├── test_relative_pos_encoding_op_step1_v2.py │ ├── test_relative_pos_encoding_op_step1_v3.py │ ├── test_relative_pos_encoding_op_step2.py │ └── test_relative_pos_encoding_op_step2_v2.py ├── setup.py └── src │ ├── __init__.py │ ├── aggregation │ ├── aggregation_cuda.cpp │ ├── aggregation_cuda_kernel.cu │ └── aggregation_cuda_kernel.h │ ├── attention │ ├── attention_cuda.cpp │ ├── attention_cuda_kernel.cu │ └── attention_cuda_kernel.h │ ├── attention_v2 │ ├── attention_cuda_kernel_v2.cu │ ├── attention_cuda_kernel_v2.h │ └── attention_cuda_v2.cpp │ ├── cuda_utils.h │ ├── grouping │ ├── grouping_cuda.cpp │ ├── grouping_cuda_kernel.cu │ └── grouping_cuda_kernel.h │ ├── interpolation │ ├── interpolation_cuda.cpp │ ├── interpolation_cuda_kernel.cu │ └── interpolation_cuda_kernel.h │ ├── knnquery │ ├── knnquery_cuda.cpp │ ├── knnquery_cuda_kernel.cu │ └── knnquery_cuda_kernel.h │ ├── pointops_api.cpp │ ├── rpe │ ├── relative_pos_encoding_cuda.cpp │ ├── relative_pos_encoding_cuda_kernel.cu │ └── relative_pos_encoding_cuda_kernel.h │ ├── rpe_v2 │ ├── relative_pos_encoding_cuda_kernel_v2.cu │ ├── relative_pos_encoding_cuda_kernel_v2.h │ └── relative_pos_encoding_cuda_v2.cpp │ ├── sampling │ ├── sampling_cuda.cpp │ ├── sampling_cuda_kernel.cu │ └── sampling_cuda_kernel.h │ └── subtraction │ ├── subtraction_cuda.cpp │ ├── subtraction_cuda_kernel.cu │ └── subtraction_cuda_kernel.h ├── scene ├── __init__.py ├── cameras.py ├── colmap_loader.py ├── dataset_readers.py └── gaussian_model.py ├── scripts └── n3v2blender.py ├── simple-knn ├── ext.cpp ├── setup.py ├── simple_knn.cu ├── simple_knn.h ├── spatial.cu └── spatial.h ├── train.py └── utils ├── camera_utils.py ├── data_utils.py ├── general_utils.py ├── graphics_utils.py ├── image_utils.py ├── loss_utils.py ├── sh_utils.py └── system_utils.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | data 3 | output 4 | build 5 | diff_rasterization/diff_rast.egg-info 6 | diff_rasterization/dist 7 | submodules/ 8 | SIBR_viewers/ 9 | submodules/* 10 | *.dump 11 | pointops2/pointops2.egg-info 12 | simple-knn/simple_knn.egg-info 13 | __pycache__/ 14 | *.so 15 | .Python 16 | .vscode/ 17 | build/ 18 | develop-eggs/ 19 | dist/ 20 | eggs/ 21 | .eggs/ 22 | *.egg 23 | *.sh -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Fudan Zhang Vision Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /assets/pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/assets/pipeline.png -------------------------------------------------------------------------------- /assets/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/assets/teaser.png -------------------------------------------------------------------------------- /diff-gaussian-rasterization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023, Inria 3 | # GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | # All rights reserved. 5 | # 6 | # This software is free for non-commercial, research and evaluation use 7 | # under the terms of the LICENSE.md file. 8 | # 9 | # For inquiries contact george.drettakis@inria.fr 10 | # 11 | 12 | cmake_minimum_required(VERSION 3.20) 13 | 14 | project(DiffRast LANGUAGES CUDA CXX) 15 | 16 | set(CMAKE_CXX_STANDARD 17) 17 | set(CMAKE_CXX_EXTENSIONS OFF) 18 | set(CMAKE_CUDA_STANDARD 17) 19 | 20 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 21 | 22 | add_library(CudaRasterizer 23 | cuda_rasterizer/backward.h 24 | cuda_rasterizer/backward.cu 25 | cuda_rasterizer/forward.h 26 | cuda_rasterizer/forward.cu 27 | cuda_rasterizer/auxiliary.h 28 | cuda_rasterizer/rasterizer_impl.cu 29 | cuda_rasterizer/rasterizer_impl.h 30 | cuda_rasterizer/rasterizer.h 31 | ) 32 | 33 | set_target_properties(CudaRasterizer PROPERTIES CUDA_ARCHITECTURES "70;75;86") 34 | 35 | target_include_directories(CudaRasterizer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/cuda_rasterizer) 36 | target_include_directories(CudaRasterizer PRIVATE third_party/glm ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}) 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/README.md: -------------------------------------------------------------------------------- 1 | # Differential Gaussian Rasterization 2 | 3 | Used as the rasterization engine for the paper "3D Gaussian Splatting for Real-Time Rendering of Radiance Fields". If you can make use of it in your own research, please be so kind to cite us. 4 | 5 |
6 |
7 |

BibTeX

8 |
@Article{kerbl3Dgaussians,
 9 |       author       = {Kerbl, Bernhard and Kopanas, Georgios and Leimk{\"u}hler, Thomas and Drettakis, George},
10 |       title        = {3D Gaussian Splatting for Real-Time Radiance Field Rendering},
11 |       journal      = {ACM Transactions on Graphics},
12 |       number       = {4},
13 |       volume       = {42},
14 |       month        = {July},
15 |       year         = {2023},
16 |       url          = {https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/}
17 | }
18 |
19 |
-------------------------------------------------------------------------------- /diff-gaussian-rasterization/cuda_rasterizer/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023, Inria 3 | * GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | * All rights reserved. 5 | * 6 | * This software is free for non-commercial, research and evaluation use 7 | * under the terms of the LICENSE.md file. 8 | * 9 | * For inquiries contact george.drettakis@inria.fr 10 | */ 11 | 12 | #ifndef CUDA_RASTERIZER_CONFIG_H_INCLUDED 13 | #define CUDA_RASTERIZER_CONFIG_H_INCLUDED 14 | 15 | #define NUM_CHANNELS 3 // Default 3, RGB 16 | #define BLOCK_X 16 17 | #define BLOCK_Y 16 18 | 19 | #endif -------------------------------------------------------------------------------- /diff-gaussian-rasterization/ext.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023, Inria 3 | * GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | * All rights reserved. 5 | * 6 | * This software is free for non-commercial, research and evaluation use 7 | * under the terms of the LICENSE.md file. 8 | * 9 | * For inquiries contact george.drettakis@inria.fr 10 | */ 11 | 12 | #include 13 | #include "rasterize_points.h" 14 | 15 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 16 | m.def("rasterize_gaussians", &RasterizeGaussiansCUDA); 17 | m.def("rasterize_gaussians_backward", &RasterizeGaussiansBackwardCUDA); 18 | m.def("mark_visible", &markVisible); 19 | } -------------------------------------------------------------------------------- /diff-gaussian-rasterization/setup.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023, Inria 3 | # GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | # All rights reserved. 5 | # 6 | # This software is free for non-commercial, research and evaluation use 7 | # under the terms of the LICENSE.md file. 8 | # 9 | # For inquiries contact george.drettakis@inria.fr 10 | # 11 | 12 | from setuptools import setup 13 | from torch.utils.cpp_extension import CUDAExtension, BuildExtension 14 | import os 15 | os.path.dirname(os.path.abspath(__file__)) 16 | 17 | setup( 18 | name="diff_gaussian_rasterization", 19 | packages=['diff_gaussian_rasterization'], 20 | ext_modules=[ 21 | CUDAExtension( 22 | name="diff_gaussian_rasterization._C", 23 | sources=[ 24 | "cuda_rasterizer/rasterizer_impl.cu", 25 | "cuda_rasterizer/forward.cu", 26 | "cuda_rasterizer/backward.cu", 27 | "rasterize_points.cu", 28 | "ext.cpp"], 29 | extra_compile_args={"cxx":['-g'], "nvcc": ["-g", "-G", "-I" + os.path.join(os.path.dirname(os.path.abspath(__file__)), "third_party/glm/")]}) 30 | ], 31 | cmdclass={ 32 | 'build_ext': BuildExtension 33 | } 34 | ) 35 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/cmake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") 3 | endif() 4 | 5 | file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 9 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | if(NOT "${rm_retval}" STREQUAL 0) 16 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 17 | endif() 18 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 19 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 20 | endif() 21 | endforeach() 22 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | /* 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/func_exponential_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_exponential_simd.inl 3 | 4 | #include "../simd/exponential.h" 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | template 12 | struct compute_sqrt<4, float, Q, true> 13 | { 14 | GLM_FUNC_QUALIFIER static vec<4, float, Q> call(vec<4, float, Q> const& v) 15 | { 16 | vec<4, float, Q> Result; 17 | Result.data = _mm_sqrt_ps(v.data); 18 | return Result; 19 | } 20 | }; 21 | 22 | # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE 23 | template<> 24 | struct compute_sqrt<4, float, aligned_lowp, true> 25 | { 26 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v) 27 | { 28 | vec<4, float, aligned_lowp> Result; 29 | Result.data = glm_vec4_sqrt_lowp(v.data); 30 | return Result; 31 | } 32 | }; 33 | # endif 34 | }//namespace detail 35 | }//namespace glm 36 | 37 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 38 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/diff-gaussian-rasterization/third_party/glm/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_common.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_common 2 | /// @file glm/ext/matrix_common.hpp 3 | /// 4 | /// @defgroup ext_matrix_common GLM_EXT_matrix_common 5 | /// @ingroup ext 6 | /// 7 | /// Defines functions for common matrix operations. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_matrix_common 12 | 13 | #pragma once 14 | 15 | #include "../detail/qualifier.hpp" 16 | #include "../detail/_fixes.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_common extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_common 25 | /// @{ 26 | 27 | template 28 | GLM_FUNC_DECL mat mix(mat const& x, mat const& y, mat const& a); 29 | 30 | template 31 | GLM_FUNC_DECL mat mix(mat const& x, mat const& y, U a); 32 | 33 | template 34 | GLM_FUNC_DECL GLM_CONSTEXPR mat abs(mat const& x); 35 | 36 | /// @} 37 | }//namespace glm 38 | 39 | #include "matrix_common.inl" 40 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_common.inl: -------------------------------------------------------------------------------- 1 | #include "../matrix.hpp" 2 | 3 | #include "_matrix_vectorize.hpp" 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER mat mix(mat const& x, mat const& y, U a) 9 | { 10 | return mat(x) * (static_cast(1) - a) + mat(y) * a; 11 | } 12 | 13 | template 14 | GLM_FUNC_QUALIFIER mat mix(mat const& x, mat const& y, mat const& a) 15 | { 16 | return matrixCompMult(mat(x), static_cast(1) - a) + matrixCompMult(mat(y), a); 17 | } 18 | 19 | template 20 | struct compute_abs_matrix 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static mat call(mat const& x) 23 | { 24 | return detail::matrix_functor_1::call(abs, x); 25 | } 26 | }; 27 | 28 | template 29 | GLM_FUNC_DECL GLM_CONSTEXPR mat abs(mat const& x) 30 | { 31 | return compute_abs_matrix::value>::call(x); 32 | } 33 | 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x2 2 | /// @file glm/ext/matrix_int2x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x2 GLM_EXT_matrix_int2x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int2x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int2x2 25 | /// @{ 26 | 27 | /// Signed integer 2x2 matrix. 28 | /// 29 | /// @see ext_matrix_int2x2 30 | typedef mat<2, 2, int, defaultp> imat2x2; 31 | 32 | /// Signed integer 2x2 matrix. 33 | /// 34 | /// @see ext_matrix_int2x2 35 | typedef mat<2, 2, int, defaultp> imat2; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x3 2 | /// @file glm/ext/matrix_int2x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_int2x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int2x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int2x3 25 | /// @{ 26 | 27 | /// Signed integer 2x3 matrix. 28 | /// 29 | /// @see ext_matrix_int2x3 30 | typedef mat<2, 3, int, defaultp> imat2x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x4 2 | /// @file glm/ext/matrix_int2x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x4 GLM_EXT_matrix_int2x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int2x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int2x4 25 | /// @{ 26 | 27 | /// Signed integer 2x4 matrix. 28 | /// 29 | /// @see ext_matrix_int2x4 30 | typedef mat<2, 4, int, defaultp> imat2x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x2 2 | /// @file glm/ext/matrix_int3x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_int3x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int3x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int3x2 25 | /// @{ 26 | 27 | /// Signed integer 3x2 matrix. 28 | /// 29 | /// @see ext_matrix_int3x2 30 | typedef mat<3, 2, int, defaultp> imat3x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x3 2 | /// @file glm/ext/matrix_int3x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x3 GLM_EXT_matrix_int3x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int3x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int3x3 25 | /// @{ 26 | 27 | /// Signed integer 3x3 matrix. 28 | /// 29 | /// @see ext_matrix_int3x3 30 | typedef mat<3, 3, int, defaultp> imat3x3; 31 | 32 | /// Signed integer 3x3 matrix. 33 | /// 34 | /// @see ext_matrix_int3x3 35 | typedef mat<3, 3, int, defaultp> imat3; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x4 2 | /// @file glm/ext/matrix_int3x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x4 GLM_EXT_matrix_int3x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int3x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int3x4 25 | /// @{ 26 | 27 | /// Signed integer 3x4 matrix. 28 | /// 29 | /// @see ext_matrix_int3x4 30 | typedef mat<3, 4, int, defaultp> imat3x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x2 2 | /// @file glm/ext/matrix_int4x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x2 GLM_EXT_matrix_int4x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int4x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int4x2 25 | /// @{ 26 | 27 | /// Signed integer 4x2 matrix. 28 | /// 29 | /// @see ext_matrix_int4x2 30 | typedef mat<4, 2, int, defaultp> imat4x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x3 2 | /// @file glm/ext/matrix_int4x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x3 GLM_EXT_matrix_int4x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int4x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int4x3 25 | /// @{ 26 | 27 | /// Signed integer 4x3 matrix. 28 | /// 29 | /// @see ext_matrix_int4x3 30 | typedef mat<4, 3, int, defaultp> imat4x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_int4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x4 2 | /// @file glm/ext/matrix_int4x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x4 GLM_EXT_matrix_int4x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int4x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int4x4 25 | /// @{ 26 | 27 | /// Signed integer 4x4 matrix. 28 | /// 29 | /// @see ext_matrix_int4x4 30 | typedef mat<4, 4, int, defaultp> imat4x4; 31 | 32 | /// Signed integer 4x4 matrix. 33 | /// 34 | /// @see ext_matrix_int4x4 35 | typedef mat<4, 4, int, defaultp> imat4; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x2 2 | /// @file glm/ext/matrix_uint2x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x2 GLM_EXT_matrix_uint2x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint2x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint2x2 25 | /// @{ 26 | 27 | /// Unsigned integer 2x2 matrix. 28 | /// 29 | /// @see ext_matrix_uint2x2 30 | typedef mat<2, 2, uint, defaultp> umat2x2; 31 | 32 | /// Unsigned integer 2x2 matrix. 33 | /// 34 | /// @see ext_matrix_uint2x2 35 | typedef mat<2, 2, uint, defaultp> umat2; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x3 2 | /// @file glm/ext/matrix_uint2x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x3 GLM_EXT_matrix_uint2x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint2x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint2x3 25 | /// @{ 26 | 27 | /// Unsigned integer 2x3 matrix. 28 | /// 29 | /// @see ext_matrix_uint2x3 30 | typedef mat<2, 3, uint, defaultp> umat2x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x4 2 | /// @file glm/ext/matrix_uint2x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x4 GLM_EXT_matrix_int2x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint2x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint2x4 25 | /// @{ 26 | 27 | /// Unsigned integer 2x4 matrix. 28 | /// 29 | /// @see ext_matrix_uint2x4 30 | typedef mat<2, 4, uint, defaultp> umat2x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x2 2 | /// @file glm/ext/matrix_uint3x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x2 GLM_EXT_matrix_uint3x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint3x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint3x2 25 | /// @{ 26 | 27 | /// Unsigned integer 3x2 matrix. 28 | /// 29 | /// @see ext_matrix_uint3x2 30 | typedef mat<3, 2, uint, defaultp> umat3x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x3 2 | /// @file glm/ext/matrix_uint3x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x3 GLM_EXT_matrix_uint3x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint3x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint3x3 25 | /// @{ 26 | 27 | /// Unsigned integer 3x3 matrix. 28 | /// 29 | /// @see ext_matrix_uint3x3 30 | typedef mat<3, 3, uint, defaultp> umat3x3; 31 | 32 | /// Unsigned integer 3x3 matrix. 33 | /// 34 | /// @see ext_matrix_uint3x3 35 | typedef mat<3, 3, uint, defaultp> umat3; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x4 2 | /// @file glm/ext/matrix_uint3x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x4 GLM_EXT_matrix_uint3x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint3x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint3x4 25 | /// @{ 26 | 27 | /// Signed integer 3x4 matrix. 28 | /// 29 | /// @see ext_matrix_uint3x4 30 | typedef mat<3, 4, uint, defaultp> umat3x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x2 2 | /// @file glm/ext/matrix_uint4x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x2 GLM_EXT_matrix_uint4x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint4x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint4x2 25 | /// @{ 26 | 27 | /// Unsigned integer 4x2 matrix. 28 | /// 29 | /// @see ext_matrix_uint4x2 30 | typedef mat<4, 2, uint, defaultp> umat4x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x3 2 | /// @file glm/ext/matrix_uint4x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x3 GLM_EXT_matrix_uint4x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint4x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint4x3 25 | /// @{ 26 | 27 | /// Unsigned integer 4x3 matrix. 28 | /// 29 | /// @see ext_matrix_uint4x3 30 | typedef mat<4, 3, uint, defaultp> umat4x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/matrix_uint4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x4 2 | /// @file glm/ext/matrix_uint4x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x4 GLM_EXT_matrix_uint4x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint4x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint4x4 25 | /// @{ 26 | 27 | /// Unsigned integer 4x4 matrix. 28 | /// 29 | /// @see ext_matrix_uint4x4 30 | typedef mat<4, 4, uint, defaultp> umat4x4; 31 | 32 | /// Unsigned integer 4x4 matrix. 33 | /// 34 | /// @see ext_matrix_uint4x4 35 | typedef mat<4, 4, uint, defaultp> umat4; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_double.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_double 2 | /// @file glm/ext/quaternion_double.hpp 3 | /// 4 | /// @defgroup ext_quaternion_double GLM_EXT_quaternion_double 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_float 12 | /// @see ext_quaternion_double_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_double extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_double 32 | /// @{ 33 | 34 | /// Quaternion of double-precision floating-point numbers. 35 | typedef qua dquat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_float.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float 2 | /// @file glm/ext/quaternion_float.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float GLM_EXT_quaternion_float 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_double 12 | /// @see ext_quaternion_float_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_float extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_float 32 | /// @{ 33 | 34 | /// Quaternion of single-precision floating-point numbers. 35 | typedef qua quat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_float_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float_precision 2 | /// @file glm/ext/quaternion_float_precision.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float_precision GLM_EXT_quaternion_float_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type with various precision in term of ULPs. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependency: 14 | #include "../detail/type_quat.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_quaternion_float_precision extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_quaternion_float_precision 23 | /// @{ 24 | 25 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 26 | typedef qua lowp_quat; 27 | 28 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 29 | typedef qua mediump_quat; 30 | 31 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 32 | typedef qua highp_quat; 33 | 34 | /// @} 35 | } //namespace glm 36 | 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_geometric.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER T dot(qua const& x, qua const& y) 5 | { 6 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs"); 7 | return detail::compute_dot, T, detail::is_aligned::value>::call(x, y); 8 | } 9 | 10 | template 11 | GLM_FUNC_QUALIFIER T length(qua const& q) 12 | { 13 | return glm::sqrt(dot(q, q)); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER qua normalize(qua const& q) 18 | { 19 | T len = length(q); 20 | if(len <= static_cast(0)) // Problem 21 | return qua(static_cast(1), static_cast(0), static_cast(0), static_cast(0)); 22 | T oneOverLen = static_cast(1) / len; 23 | return qua(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER qua cross(qua const& q1, qua const& q2) 28 | { 29 | return qua( 30 | q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, 31 | q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, 32 | q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, 33 | q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); 34 | } 35 | }//namespace glm 36 | 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_relational.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y) 5 | { 6 | vec<4, bool, Q> Result; 7 | for(length_t i = 0; i < x.length(); ++i) 8 | Result[i] = x[i] == y[i]; 9 | return Result; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y, T epsilon) 14 | { 15 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 16 | return lessThan(abs(v), vec<4, T, Q>(epsilon)); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y) 21 | { 22 | vec<4, bool, Q> Result; 23 | for(length_t i = 0; i < x.length(); ++i) 24 | Result[i] = x[i] != y[i]; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y, T epsilon) 30 | { 31 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 32 | return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon)); 33 | } 34 | }//namespace glm 35 | 36 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/quaternion_trigonometric.inl: -------------------------------------------------------------------------------- 1 | #include "scalar_constants.hpp" 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T angle(qua const& x) 7 | { 8 | if (abs(x.w) > cos_one_over_two()) 9 | { 10 | T const a = asin(sqrt(x.x * x.x + x.y * x.y + x.z * x.z)) * static_cast(2); 11 | if(x.w < static_cast(0)) 12 | return pi() * static_cast(2) - a; 13 | return a; 14 | } 15 | 16 | return acos(x.w) * static_cast(2); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER vec<3, T, Q> axis(qua const& x) 21 | { 22 | T const tmp1 = static_cast(1) - x.w * x.w; 23 | if(tmp1 <= static_cast(0)) 24 | return vec<3, T, Q>(0, 0, 1); 25 | T const tmp2 = static_cast(1) / sqrt(tmp1); 26 | return vec<3, T, Q>(x.x * tmp2, x.y * tmp2, x.z * tmp2); 27 | } 28 | 29 | template 30 | GLM_FUNC_QUALIFIER qua angleAxis(T const& angle, vec<3, T, Q> const& v) 31 | { 32 | T const a(angle); 33 | T const s = glm::sin(a * static_cast(0.5)); 34 | 35 | return qua(glm::cos(a * static_cast(0.5)), v * s); 36 | } 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/scalar_constants.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_constants 2 | /// @file glm/ext/scalar_constants.hpp 3 | /// 4 | /// @defgroup ext_scalar_constants GLM_EXT_scalar_constants 5 | /// @ingroup ext 6 | /// 7 | /// Provides a list of constants and precomputed useful values. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependencies 14 | #include "../detail/setup.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_scalar_constants extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_scalar_constants 23 | /// @{ 24 | 25 | /// Return the epsilon constant for floating point types. 26 | template 27 | GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon(); 28 | 29 | /// Return the pi constant for floating point types. 30 | template 31 | GLM_FUNC_DECL GLM_CONSTEXPR genType pi(); 32 | 33 | /// Return the value of cos(1 / 2) for floating point types. 34 | template 35 | GLM_FUNC_DECL GLM_CONSTEXPR genType cos_one_over_two(); 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | #include "scalar_constants.inl" 41 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'pi' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two() 21 | { 22 | return genType(0.877582561890372716130286068203503191); 23 | } 24 | } //namespace glm 25 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/scalar_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_packing 2 | /// @file glm/ext/scalar_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_scalar_packing GLM_EXT_scalar_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert scalar values to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_scalar_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_scalar_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "scalar_packing.inl" 33 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/scalar_packing.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/diff-gaussian-rasterization/third_party/glm/glm/ext/scalar_packing.inl -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | #include "../common.hpp" 2 | #include "../ext/scalar_int_sized.hpp" 3 | #include "../ext/scalar_uint_sized.hpp" 4 | #include "../detail/type_float.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon) 10 | { 11 | return abs(x - y) <= epsilon; 12 | } 13 | 14 | template 15 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon) 16 | { 17 | return abs(x - y) > epsilon; 18 | } 19 | 20 | template 21 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, int MaxULPs) 22 | { 23 | detail::float_t const a(x); 24 | detail::float_t const b(y); 25 | 26 | // Different signs means they do not match. 27 | if(a.negative() != b.negative()) 28 | return false; 29 | 30 | // Find the difference in ULPs. 31 | typename detail::float_t::int_type const DiffULPs = abs(a.i - b.i); 32 | return DiffULPs <= MaxULPs; 33 | } 34 | 35 | template 36 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, int ULPs) 37 | { 38 | return !equal(x, y, ULPs); 39 | } 40 | }//namespace glm 41 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_bool1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1_precision 2 | /// @file glm/ext/vector_bool1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1_precision GLM_EXT_vector_bool1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_bool1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_bool1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of bool values. 25 | typedef vec<1, bool, highp> highp_bvec1; 26 | 27 | /// 1 component vector of bool values. 28 | typedef vec<1, bool, mediump> mediump_bvec1; 29 | 30 | /// 1 component vector of bool values. 31 | typedef vec<1, bool, lowp> lowp_bvec1; 32 | 33 | /// @} 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_double1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1 2 | /// @file glm/ext/vector_double1.hpp 3 | /// 4 | /// @defgroup ext_vector_double1 GLM_EXT_vector_double1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1_precision extension. 12 | /// @see ext_vector_float1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_double1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_double1 25 | /// @{ 26 | 27 | /// 1 components vector of double-precision floating-point numbers. 28 | typedef vec<1, double, defaultp> dvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_double1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1_precision 2 | /// @file glm/ext/vector_double1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_double1_precision GLM_EXT_vector_double1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_double1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_double1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, double, highp> highp_dvec1; 28 | 29 | /// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, double, mediump> mediump_dvec1; 31 | 32 | /// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, double, lowp> lowp_dvec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_float1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1 2 | /// @file glm/ext/vector_float1.hpp 3 | /// 4 | /// @defgroup ext_vector_float1 GLM_EXT_vector_float1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1_precision extension. 12 | /// @see ext_vector_double1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_float1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_float1 25 | /// @{ 26 | 27 | /// 1 components vector of single-precision floating-point numbers. 28 | typedef vec<1, float, defaultp> vec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_float1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1_precision 2 | /// @file glm/ext/vector_float1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_float1_precision GLM_EXT_vector_float1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_vec1, mediump_vec1 and lowp_vec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1 extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_float1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_float1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, float, highp> highp_vec1; 28 | 29 | /// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, float, mediump> mediump_vec1; 31 | 32 | /// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, float, lowp> lowp_vec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_int1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1 2 | /// @file glm/ext/vector_int1.hpp 3 | /// 4 | /// @defgroup ext_vector_int1 GLM_EXT_vector_int1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes ivec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_uint1 extension. 12 | /// @see ext_vector_int1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_int1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_int1 25 | /// @{ 26 | 27 | /// 1 component vector of signed integer numbers. 28 | typedef vec<1, int, defaultp> ivec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_packing 2 | /// @file glm/ext/vector_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_vector_packing GLM_EXT_vector_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert vectors to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_vector_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_vector_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "vector_packing.inl" 33 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_packing.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/diff-gaussian-rasterization/third_party/glm/glm/ext/vector_packing.inl -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_uint1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_uint1 2 | /// @file glm/ext/vector_uint1.hpp 3 | /// 4 | /// @defgroup ext_vector_uint1 GLM_EXT_vector_uint1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes uvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_int1 extension. 12 | /// @see ext_vector_uint1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_uint1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_uint1 25 | /// @{ 26 | 27 | /// 1 component vector of unsigned integer numbers. 28 | typedef vec<1, unsigned int, defaultp> uvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/integer.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_integer 2 | /// @file glm/gtc/integer.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_integer (dependence) 6 | /// 7 | /// @defgroup gtc_integer GLM_GTC_integer 8 | /// @ingroup gtc 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// @brief Allow to perform bit operations on integer values 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/qualifier.hpp" 19 | #include "../common.hpp" 20 | #include "../integer.hpp" 21 | #include "../exponential.hpp" 22 | #include "../ext/scalar_common.hpp" 23 | #include "../ext/vector_common.hpp" 24 | #include 25 | 26 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 27 | # pragma message("GLM: GLM_GTC_integer extension included") 28 | #endif 29 | 30 | namespace glm 31 | { 32 | /// @addtogroup gtc_integer 33 | /// @{ 34 | 35 | /// Returns the log2 of x for integer values. Useful to compute mipmap count from the texture size. 36 | /// @see gtc_integer 37 | template 38 | GLM_FUNC_DECL genIUType log2(genIUType x); 39 | 40 | /// @} 41 | } //namespace glm 42 | 43 | #include "integer.inl" 44 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/integer.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_integer 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_log2 8 | { 9 | GLM_FUNC_QUALIFIER static vec call(vec const& v) 10 | { 11 | //Equivalent to return findMSB(vec); but save one function call in ASM with VC 12 | //return findMSB(vec); 13 | return vec(detail::compute_findMSB_vec::call(v)); 14 | } 15 | }; 16 | 17 | # if GLM_HAS_BITSCAN_WINDOWS 18 | template 19 | struct compute_log2<4, int, Q, false, Aligned> 20 | { 21 | GLM_FUNC_QUALIFIER static vec<4, int, Q> call(vec<4, int, Q> const& v) 22 | { 23 | vec<4, int, Q> Result; 24 | _BitScanReverse(reinterpret_cast(&Result.x), v.x); 25 | _BitScanReverse(reinterpret_cast(&Result.y), v.y); 26 | _BitScanReverse(reinterpret_cast(&Result.z), v.z); 27 | _BitScanReverse(reinterpret_cast(&Result.w), v.w); 28 | return Result; 29 | } 30 | }; 31 | # endif//GLM_HAS_BITSCAN_WINDOWS 32 | }//namespace detail 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/matrix_transform.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_transform 2 | /// @file glm/gtc/matrix_transform.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_transform 6 | /// @see gtx_transform2 7 | /// 8 | /// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform 9 | /// @ingroup gtc 10 | /// 11 | /// Include to use the features of this extension. 12 | /// 13 | /// Defines functions that generate common transformation matrices. 14 | /// 15 | /// The matrices generated by this extension use standard OpenGL fixed-function 16 | /// conventions. For example, the lookAt function generates a transform from world 17 | /// space into the specific eye space that the projective matrix functions 18 | /// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility 19 | /// specifications defines the particular layout of this eye space. 20 | 21 | #pragma once 22 | 23 | // Dependencies 24 | #include "../mat4x4.hpp" 25 | #include "../vec2.hpp" 26 | #include "../vec3.hpp" 27 | #include "../vec4.hpp" 28 | #include "../ext/matrix_projection.hpp" 29 | #include "../ext/matrix_clip_space.hpp" 30 | #include "../ext/matrix_transform.hpp" 31 | 32 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 33 | # pragma message("GLM: GLM_GTC_matrix_transform extension included") 34 | #endif 35 | 36 | #include "matrix_transform.inl" 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/diff-gaussian-rasterization/third_party/glm/glm/gtc/quaternion_simd.inl -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_reciprocal 2 | /// @file glm/gtc/reciprocal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_reciprocal GLM_GTC_reciprocal 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Define secant, cosecant and cotangent functions. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_reciprocal extension included") 20 | #endif 21 | 22 | #include "../ext/scalar_reciprocal.hpp" 23 | #include "../ext/vector_reciprocal.hpp" 24 | 25 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtc/vec1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_vec1 GLM_GTC_vec1 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Add vec1, ivec1, uvec1 and bvec1 types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../ext/vector_bool1.hpp" 17 | #include "../ext/vector_bool1_precision.hpp" 18 | #include "../ext/vector_float1.hpp" 19 | #include "../ext/vector_float1_precision.hpp" 20 | #include "../ext/vector_double1.hpp" 21 | #include "../ext/vector_double1_precision.hpp" 22 | #include "../ext/vector_int1.hpp" 23 | #include "../ext/vector_int1_sized.hpp" 24 | #include "../ext/vector_uint1.hpp" 25 | #include "../ext/vector_uint1_sized.hpp" 26 | 27 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 28 | # pragma message("GLM: GLM_GTC_vec1 extension included") 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> closestPointOnLine 7 | ( 8 | vec<3, T, Q> const& point, 9 | vec<3, T, Q> const& a, 10 | vec<3, T, Q> const& b 11 | ) 12 | { 13 | T LineLength = distance(a, b); 14 | vec<3, T, Q> Vector = point - a; 15 | vec<3, T, Q> LineDirection = (b - a) / LineLength; 16 | 17 | // Project Vector to LineDirection to get the distance of point from a 18 | T Distance = dot(Vector, LineDirection); 19 | 20 | if(Distance <= T(0)) return a; 21 | if(Distance >= LineLength) return b; 22 | return a + LineDirection * Distance; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine 27 | ( 28 | vec<2, T, Q> const& point, 29 | vec<2, T, Q> const& a, 30 | vec<2, T, Q> const& b 31 | ) 32 | { 33 | T LineLength = distance(a, b); 34 | vec<2, T, Q> Vector = point - a; 35 | vec<2, T, Q> LineDirection = (b - a) / LineLength; 36 | 37 | // Project Vector to LineDirection to get the distance of point from a 38 | T Distance = dot(Vector, LineDirection); 39 | 40 | if(Distance <= T(0)) return a; 41 | if(Distance >= LineLength) return b; 42 | return a + LineDirection * Distance; 43 | } 44 | 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_extend GLM_GTX_extend 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_extend extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_extend 29 | /// @{ 30 | 31 | /// Extends of Length the Origin position using the (Source - Origin) direction. 32 | /// @see gtx_extend 33 | template 34 | GLM_FUNC_DECL genType extend( 35 | genType const& Origin, 36 | genType const& Source, 37 | typename genType::value_type const Length); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "extend.inl" 43 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType extend 7 | ( 8 | genType const& Origin, 9 | genType const& Source, 10 | genType const& Distance 11 | ) 12 | { 13 | return Origin + (Source - Origin) * Distance; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER vec<2, T, Q> extend 18 | ( 19 | vec<2, T, Q> const& Origin, 20 | vec<2, T, Q> const& Source, 21 | T const& Distance 22 | ) 23 | { 24 | return Origin + (Source - Origin) * Distance; 25 | } 26 | 27 | template 28 | GLM_FUNC_QUALIFIER vec<3, T, Q> extend 29 | ( 30 | vec<3, T, Q> const& Origin, 31 | vec<3, T, Q> const& Source, 32 | T const& Distance 33 | ) 34 | { 35 | return Origin + (Source - Origin) * Distance; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER vec<4, T, Q> extend 40 | ( 41 | vec<4, T, Q> const& Origin, 42 | vec<4, T, Q> const& Source, 43 | T const& Distance 44 | ) 45 | { 46 | return Origin + (Source - Origin) * Distance; 47 | } 48 | }//namespace glm 49 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | 3 | #include "../exponential.hpp" 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER T gauss 9 | ( 10 | T x, 11 | T ExpectedValue, 12 | T StandardDeviation 13 | ) 14 | { 15 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER T gauss 20 | ( 21 | vec<2, T, Q> const& Coord, 22 | vec<2, T, Q> const& ExpectedValue, 23 | vec<2, T, Q> const& StandardDeviation 24 | ) 25 | { 26 | vec<2, T, Q> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 27 | return exp(-(Squared.x + Squared.y)); 28 | } 29 | }//namespace glm 30 | 31 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T radialGradient 7 | ( 8 | vec<2, T, Q> const& Center, 9 | T const& Radius, 10 | vec<2, T, Q> const& Focal, 11 | vec<2, T, Q> const& Position 12 | ) 13 | { 14 | vec<2, T, Q> F = Focal - Center; 15 | vec<2, T, Q> D = Position - Focal; 16 | T Radius2 = pow2(Radius); 17 | T Fx2 = pow2(F.x); 18 | T Fy2 = pow2(F.y); 19 | 20 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 21 | T Denominator = Radius2 - (Fx2 + Fy2); 22 | return Numerator / Denominator; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER T linearGradient 27 | ( 28 | vec<2, T, Q> const& Point0, 29 | vec<2, T, Q> const& Point1, 30 | vec<2, T, Q> const& Position 31 | ) 32 | { 33 | vec<2, T, Q> Dist = Point1 - Point0; 34 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 35 | } 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_log_base GLM_GTX_log_base 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Logarithm for any base. base can be a vector or a scalar. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_log_base extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_log_base 29 | /// @{ 30 | 31 | /// Logarithm for any base. 32 | /// From GLM_GTX_log_base. 33 | template 34 | GLM_FUNC_DECL genType log( 35 | genType const& x, 36 | genType const& base); 37 | 38 | /// Logarithm for any base. 39 | /// From GLM_GTX_log_base. 40 | template 41 | GLM_FUNC_DECL vec sign( 42 | vec const& x, 43 | vec const& base); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "log_base.inl" 49 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> matrixCross3 7 | ( 8 | vec<3, T, Q> const& x 9 | ) 10 | { 11 | mat<3, 3, T, Q> Result(T(0)); 12 | Result[0][1] = x.z; 13 | Result[1][0] = -x.z; 14 | Result[0][2] = -x.y; 15 | Result[2][0] = x.y; 16 | Result[1][2] = x.x; 17 | Result[2][1] = -x.x; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> matrixCross4 23 | ( 24 | vec<3, T, Q> const& x 25 | ) 26 | { 27 | mat<4, 4, T, Q> Result(T(0)); 28 | Result[0][1] = x.z; 29 | Result[1][0] = -x.z; 30 | Result[0][2] = -x.y; 31 | Result[2][0] = x.y; 32 | Result[1][2] = x.x; 33 | Result[2][1] = -x.x; 34 | return Result; 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/matrix_factorisation.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/diff-gaussian-rasterization/third_party/glm/glm/gtx/matrix_factorisation.inl -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Mixed product of 3 vectors. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_mixed_product 29 | /// @{ 30 | 31 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 32 | template 33 | GLM_FUNC_DECL T mixedProduct( 34 | vec<3, T, Q> const& v1, 35 | vec<3, T, Q> const& v2, 36 | vec<3, T, Q> const& v3); 37 | 38 | /// @} 39 | }// namespace glm 40 | 41 | #include "mixed_product.inl" 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Compute the normal of a triangle. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # ifndef GLM_ENABLE_EXPERIMENTAL 21 | # pragma message("GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 22 | # else 23 | # pragma message("GLM: GLM_GTX_normal extension included") 24 | # endif 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_normal 30 | /// @{ 31 | 32 | /// Computes triangle normal from triangle points. 33 | /// 34 | /// @see gtx_normal 35 | template 36 | GLM_FUNC_DECL vec<3, T, Q> triangleNormal(vec<3, T, Q> const& p1, vec<3, T, Q> const& p2, vec<3, T, Q> const& p3); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "normal.inl" 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Perpendicular of a vector from other one 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 21 | # ifndef GLM_ENABLE_EXPERIMENTAL 22 | # pragma message("GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 23 | # else 24 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 25 | # endif 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_perpendicular 31 | /// @{ 32 | 33 | //! Projects x a perpendicular axis of Normal. 34 | //! From GLM_GTX_perpendicular extension. 35 | template 36 | GLM_FUNC_DECL genType perp(genType const& x, genType const& Normal); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "perpendicular.inl" 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> polar 7 | ( 8 | vec<3, T, Q> const& euclidean 9 | ) 10 | { 11 | T const Length(length(euclidean)); 12 | vec<3, T, Q> const tmp(euclidean / Length); 13 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 14 | 15 | return vec<3, T, Q>( 16 | asin(tmp.y), // latitude 17 | atan(tmp.x, tmp.z), // longitude 18 | xz_dist); // xz distance 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER vec<3, T, Q> euclidean 23 | ( 24 | vec<2, T, Q> const& polar 25 | ) 26 | { 27 | T const latitude(polar.x); 28 | T const longitude(polar.y); 29 | 30 | return vec<3, T, Q>( 31 | cos(latitude) * sin(longitude), 32 | sin(latitude), 33 | cos(latitude) * cos(longitude)); 34 | } 35 | 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_projection extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_projection 29 | /// @{ 30 | 31 | /// Projects x on Normal. 32 | /// 33 | /// @param[in] x A vector to project 34 | /// @param[in] Normal A normal that doesn't need to be of unit length. 35 | /// 36 | /// @see gtx_projection 37 | template 38 | GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal); 39 | 40 | /// @} 41 | }//namespace glm 42 | 43 | #include "projection.inl" 44 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_extend extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_scalar_relational 29 | /// @{ 30 | 31 | 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "scalar_relational.inl" 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/wrap.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | /// @file glm/gtx/wrap.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_wrap GLM_GTX_wrap 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Wrapping mode of texture coordinates. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | #include "../ext/scalar_common.hpp" 18 | #include "../ext/vector_common.hpp" 19 | #include "../gtc/vec1.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 22 | # ifndef GLM_ENABLE_EXPERIMENTAL 23 | # pragma message("GLM: GLM_GTX_wrap is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 24 | # else 25 | # pragma message("GLM: GLM_GTX_wrap extension included") 26 | # endif 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup gtx_wrap 32 | /// @{ 33 | 34 | /// @} 35 | }// namespace glm 36 | 37 | #include "wrap.inl" 38 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/gtx/wrap.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_sized.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_sized.hpp" 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_sized.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_sized.hpp" 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_sized.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_sized.hpp" 15 | 16 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/bug/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(bug_ms_vec_static) 2 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/bug/bug_ms_vec_static.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE 4 | struct vec2; 5 | 6 | struct _swizzle 7 | { 8 | char _buffer[1]; 9 | }; 10 | 11 | struct vec2 12 | { 13 | GLM_CONSTEXPR vec2() : 14 | x(0), y(0) 15 | {} 16 | 17 | union 18 | { 19 | struct { float x, y; }; 20 | struct { _swizzle xx; }; 21 | }; 22 | }; 23 | #endif 24 | 25 | // Visual C++ has a bug generating the error: fatal error C1001: An internal error has occurred in the compiler. 26 | // vec2 Bar; 27 | 28 | int main() 29 | { 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2 FATAL_ERROR) 2 | project(test_find_glm) 3 | 4 | find_package(glm REQUIRED) 5 | 6 | add_executable(test_find_glm test_find_glm.cpp) 7 | target_link_libraries(test_find_glm glm::glm) 8 | 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/cmake/test_find_glm.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | glm::mat4 camera(float Translate, glm::vec2 const& Rotate) 6 | { 7 | glm::mat4 Projection = glm::perspective(glm::pi() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f); 8 | glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); 9 | View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); 10 | View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); 11 | glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); 12 | return Projection * View * Model; 13 | } 14 | 15 | int main() 16 | { 17 | const glm::mat4 m = camera(1.f, glm::vec2(1.f, 0.5f)); 18 | std::cout << "matrix diagonal: " << m[0][0] << ", " 19 | << m[1][1] << ", " << m[2][2] << ", " << m[3][3] << "\n"; 20 | return 0; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_aligned_gentypes.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int Error = 0; 7 | 8 | return Error; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_arch_unknown.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_ARCH_UNKNOWN 2 | # define GLM_FORCE_ARCH_UNKNOWN 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_compiler_unknown.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_COMPILER_UNKNOWN 2 | # define GLM_FORCE_COMPILER_UNKNOWN 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_cxx03.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_CXX03 2 | # define GLM_FORCE_CXX03 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_cxx98.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_CXX98 2 | # define GLM_FORCE_CXX98 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_cxx_unknown.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_CXX_UNKNOWN 2 | # define GLM_FORCE_CXX_UNKNOWN 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_depth_zero_to_one.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_DEPTH_ZERO_TO_ONE 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int Error = 0; 9 | 10 | return Error; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_explicit_ctor.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_EXPLICIT_CTOR 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int Error = 0; 9 | 10 | glm::ivec4 B(1); 11 | Error += B == glm::ivec4(1) ? 0 : 1; 12 | 13 | //glm::vec4 A = B; 14 | 15 | return Error; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_inline.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_INLINE 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int Error = 0; 9 | 10 | return Error; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_left_handed.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_LEFT_HANDED 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int Error = 0; 9 | 10 | return Error; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_platform_unknown.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_PLATFORM_UNKNOWN 2 | # define GLM_FORCE_PLATFORM_UNKNOWN 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_quat_xyzw.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_QUAT_DATA_XYZW 2 | #define GLM_FORCE_INLINE 3 | 4 | #include 5 | #include 6 | 7 | int main() 8 | { 9 | int Error = 0; 10 | 11 | return Error; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_size_t_length.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_SIZE_T_LENGTH 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int Error = 0; 9 | 10 | return Error; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_unrestricted_gentype.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_UNRESTRICTED_GENTYPE 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | int Error = 0; 9 | 10 | return Error; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_force_xyzw_only.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_XYZW_ONLY 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | { 15 | glm::ivec1 const A(1); 16 | Error += A.x == 1 ? 0 : 1; 17 | } 18 | 19 | { 20 | glm::ivec2 const A(1, 2); 21 | Error += A.x == 1 ? 0 : 1; 22 | Error += A.y == 2 ? 0 : 1; 23 | } 24 | 25 | { 26 | glm::ivec3 const A(1, 2, 3); 27 | Error += A.x == 1 ? 0 : 1; 28 | Error += A.y == 2 ? 0 : 1; 29 | Error += A.z == 3 ? 0 : 1; 30 | } 31 | 32 | { 33 | glm::ivec4 const A(1, 2, 3, 4); 34 | Error += A.x == 1 ? 0 : 1; 35 | Error += A.y == 2 ? 0 : 1; 36 | Error += A.z == 3 ? 0 : 1; 37 | Error += A.w == 4 ? 0 : 1; 38 | } 39 | 40 | return Error; 41 | } 42 | 43 | static int test_constexpr() 44 | { 45 | int Error = 0; 46 | 47 | return Error; 48 | } 49 | 50 | int main() 51 | { 52 | int Error = 0; 53 | 54 | Error += test_comp(); 55 | Error += test_constexpr(); 56 | 57 | return Error; 58 | } 59 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_func_noise.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | int Error = 0; 4 | 5 | return Error; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_func_trigonometric.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | 8 | return Error; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_setup_force_cxx98.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_CXX98 2 | # define GLM_FORCE_CXX98 3 | #endif 4 | #include 5 | #include 6 | 7 | int main() 8 | { 9 | int Error = 0; 10 | 11 | return Error; 12 | } 13 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_setup_force_size_t_length.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_FORCE_SIZE_T_LENGTH 2 | #include 3 | #include 4 | 5 | template 6 | genType add(genType const& a, genType const& b) 7 | { 8 | genType result(0); 9 | for(glm::length_t i = 0; i < a.length(); ++i) 10 | result[i] = a[i] + b[i]; 11 | return result; 12 | } 13 | 14 | int main() 15 | { 16 | int Error = 0; 17 | 18 | glm::ivec4 v(1); 19 | Error += add(v, v) == glm::ivec4(2) ? 0 : 1; 20 | 21 | return Error; 22 | } 23 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_setup_platform_unknown.cpp: -------------------------------------------------------------------------------- 1 | #ifndef GLM_FORCE_PLATFORM_UNKNOWN 2 | # define GLM_FORCE_PLATFORM_UNKNOWN 3 | #endif 4 | #ifndef GLM_FORCE_COMPILER_UNKNOWN 5 | # define GLM_FORCE_COMPILER_UNKNOWN 6 | #endif 7 | #ifndef GLM_FORCE_ARCH_UNKNOWN 8 | # define GLM_FORCE_ARCH_UNKNOWN 9 | #endif 10 | #ifndef GLM_FORCE_CXX_UNKNOWN 11 | # define GLM_FORCE_CXX_UNKNOWN 12 | #endif 13 | #include 14 | #include 15 | 16 | int main() 17 | { 18 | int Error = 0; 19 | 20 | return Error; 21 | } 22 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/core/core_type_int.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static int test_bit_operator() 5 | { 6 | int Error = 0; 7 | 8 | glm::ivec4 const a(1); 9 | glm::ivec4 const b = ~a; 10 | Error += glm::all(glm::equal(b, glm::ivec4(-2))) ? 0 : 1; 11 | 12 | glm::int32 const c(1); 13 | glm::int32 const d = ~c; 14 | Error += d == -2 ? 0 : 1; 15 | 16 | return Error; 17 | } 18 | 19 | int main() 20 | { 21 | int Error = 0; 22 | 23 | Error += test_bit_operator(); 24 | 25 | return Error; 26 | } 27 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_clip_space.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int2x2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat2x2) == 4, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat2x2) == 8, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat2x2) == 16, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat2x2) == 32, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat2x2) < sizeof(glm::i16mat2x2) ? 0 : 1; 15 | Error += sizeof(glm::i16mat2x2) < sizeof(glm::i32mat2x2) ? 0 : 1; 16 | Error += sizeof(glm::i32mat2x2) < sizeof(glm::i64mat2x2) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int2x3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat2x3) == 6, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat2x3) == 12, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat2x3) == 24, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat2x3) == 48, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat2x3) < sizeof(glm::i16mat2x3) ? 0 : 1; 15 | Error += sizeof(glm::i16mat2x3) < sizeof(glm::i32mat2x3) ? 0 : 1; 16 | Error += sizeof(glm::i32mat2x3) < sizeof(glm::i64mat2x3) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int2x4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat2x4) == 8, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat2x4) == 16, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat2x4) == 32, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat2x4) == 64, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat2x4) < sizeof(glm::i16mat2x4) ? 0 : 1; 15 | Error += sizeof(glm::i16mat2x4) < sizeof(glm::i32mat2x4) ? 0 : 1; 16 | Error += sizeof(glm::i32mat2x4) < sizeof(glm::i64mat2x4) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int3x2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat3x2) == 6, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat3x2) == 12, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat3x2) == 24, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat3x2) == 48, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat3x2) < sizeof(glm::i16mat3x2) ? 0 : 1; 15 | Error += sizeof(glm::i16mat3x2) < sizeof(glm::i32mat3x2) ? 0 : 1; 16 | Error += sizeof(glm::i32mat3x2) < sizeof(glm::i64mat3x2) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int3x3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat3x3) == 9, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat3x3) == 18, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat3x3) == 36, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat3x3) == 72, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat3x3) < sizeof(glm::i16mat3x3) ? 0 : 1; 15 | Error += sizeof(glm::i16mat3x3) < sizeof(glm::i32mat3x3) ? 0 : 1; 16 | Error += sizeof(glm::i32mat3x3) < sizeof(glm::i64mat3x3) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int3x4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat3x4) == 12, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat3x4) == 24, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat3x4) == 48, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat3x4) == 96, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat3x4) < sizeof(glm::i16mat3x4) ? 0 : 1; 15 | Error += sizeof(glm::i16mat3x4) < sizeof(glm::i32mat3x4) ? 0 : 1; 16 | Error += sizeof(glm::i32mat3x4) < sizeof(glm::i64mat3x4) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int4x2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat4x2) == 8, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat4x2) == 16, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat4x2) == 32, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat4x2) == 64, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat4x2) < sizeof(glm::i16mat4x2) ? 0 : 1; 15 | Error += sizeof(glm::i16mat4x2) < sizeof(glm::i32mat4x2) ? 0 : 1; 16 | Error += sizeof(glm::i32mat4x2) < sizeof(glm::i64mat4x2) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int4x3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat4x3) == 12, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat4x3) == 24, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat4x3) == 48, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat4x3) == 96, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat4x3) < sizeof(glm::i16mat4x3) ? 0 : 1; 15 | Error += sizeof(glm::i16mat4x3) < sizeof(glm::i32mat4x3) ? 0 : 1; 16 | Error += sizeof(glm::i32mat4x3) < sizeof(glm::i64mat4x3) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_int4x4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8mat4x4) == 16, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16mat4x4) == 32, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32mat4x4) == 64, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64mat4x4) == 128, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8mat4x4) < sizeof(glm::i16mat4x4) ? 0 : 1; 15 | Error += sizeof(glm::i16mat4x4) < sizeof(glm::i32mat4x4) ? 0 : 1; 16 | Error += sizeof(glm::i32mat4x4) < sizeof(glm::i64mat4x4) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_projection.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main() 9 | { 10 | int Error = 0; 11 | 12 | return Error; 13 | } 14 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint2x2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat2x2) == 4, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat2x2) == 8, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat2x2) == 16, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat2x2) == 32, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat2x2) < sizeof(glm::u16mat2x2) ? 0 : 1; 15 | Error += sizeof(glm::u16mat2x2) < sizeof(glm::u32mat2x2) ? 0 : 1; 16 | Error += sizeof(glm::u32mat2x2) < sizeof(glm::u64mat2x2) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint2x3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat2x3) == 6, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat2x3) == 12, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat2x3) == 24, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat2x3) == 48, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat2x3) < sizeof(glm::u16mat2x3) ? 0 : 1; 15 | Error += sizeof(glm::u16mat2x3) < sizeof(glm::u32mat2x3) ? 0 : 1; 16 | Error += sizeof(glm::u32mat2x3) < sizeof(glm::u64mat2x3) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint2x4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat2x4) == 8, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat2x4) == 16, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat2x4) == 32, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat2x4) == 64, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat2x4) < sizeof(glm::u16mat2x4) ? 0 : 1; 15 | Error += sizeof(glm::u16mat2x4) < sizeof(glm::u32mat2x4) ? 0 : 1; 16 | Error += sizeof(glm::u32mat2x4) < sizeof(glm::u64mat2x4) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint3x2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat3x2) == 6, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat3x2) == 12, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat3x2) == 24, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat3x2) == 48, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat3x2) < sizeof(glm::u16mat3x2) ? 0 : 1; 15 | Error += sizeof(glm::u16mat3x2) < sizeof(glm::u32mat3x2) ? 0 : 1; 16 | Error += sizeof(glm::u32mat3x2) < sizeof(glm::u64mat3x2) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint3x3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat3x3) == 9, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat3x3) == 18, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat3x3) == 36, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat3x3) == 72, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat3x3) < sizeof(glm::u16mat3x3) ? 0 : 1; 15 | Error += sizeof(glm::u16mat3x3) < sizeof(glm::u32mat3x3) ? 0 : 1; 16 | Error += sizeof(glm::u32mat3x3) < sizeof(glm::u64mat3x3) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint3x4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat3x4) == 12, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat3x4) == 24, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat3x4) == 48, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat3x4) == 96, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat3x4) < sizeof(glm::u16mat3x4) ? 0 : 1; 15 | Error += sizeof(glm::u16mat3x4) < sizeof(glm::u32mat3x4) ? 0 : 1; 16 | Error += sizeof(glm::u32mat3x4) < sizeof(glm::u64mat3x4) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint4x2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat4x2) == 8, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat4x2) == 16, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat4x2) == 32, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat4x2) == 64, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat4x2) < sizeof(glm::u16mat4x2) ? 0 : 1; 15 | Error += sizeof(glm::u16mat4x2) < sizeof(glm::u32mat4x2) ? 0 : 1; 16 | Error += sizeof(glm::u32mat4x2) < sizeof(glm::u64mat4x2) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint4x3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat4x3) == 12, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat4x3) == 24, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat4x3) == 48, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat4x3) == 96, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat4x3) < sizeof(glm::u16mat4x3) ? 0 : 1; 15 | Error += sizeof(glm::u16mat4x3) < sizeof(glm::u32mat4x3) ? 0 : 1; 16 | Error += sizeof(glm::u32mat4x3) < sizeof(glm::u64mat4x3) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_matrix_uint4x4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8mat4x4) == 16, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16mat4x4) == 32, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32mat4x4) == 64, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64mat4x4) == 128, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_comp() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8mat4x4) < sizeof(glm::u16mat4x4) ? 0 : 1; 15 | Error += sizeof(glm::u16mat4x4) < sizeof(glm::u32mat4x4) ? 0 : 1; 16 | Error += sizeof(glm::u32mat4x4) < sizeof(glm::u64mat4x4) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | 21 | int main() 22 | { 23 | int Error = 0; 24 | 25 | Error += test_comp(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_quaternion_trigonometric.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | float const Epsilon = 0.001f; 7 | 8 | static int test_angle() 9 | { 10 | int Error = 0; 11 | 12 | { 13 | glm::quat const Q = glm::quat(glm::vec3(1, 0, 0), glm::vec3(0, 1, 0)); 14 | float const A = glm::degrees(glm::angle(Q)); 15 | Error += glm::equal(A, 90.0f, Epsilon) ? 0 : 1; 16 | } 17 | 18 | { 19 | glm::quat const Q = glm::quat(glm::vec3(0, 1, 0), glm::vec3(1, 0, 0)); 20 | float const A = glm::degrees(glm::angle(Q)); 21 | Error += glm::equal(A, 90.0f, Epsilon) ? 0 : 1; 22 | } 23 | 24 | { 25 | glm::quat const Q = glm::angleAxis(glm::two_pi() - 1.0f, glm::vec3(1, 0, 0)); 26 | float const A = glm::angle(Q); 27 | Error += glm::equal(A, 1.0f, Epsilon) ? 1 : 0; 28 | } 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_angle(); 38 | 39 | return Error; 40 | } 41 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_scalar_constants.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | template 4 | static int test_epsilon() 5 | { 6 | int Error = 0; 7 | 8 | valType const Test = glm::epsilon(); 9 | Error += Test > static_cast(0) ? 0 : 1; 10 | 11 | return Error; 12 | } 13 | 14 | template 15 | static int test_pi() 16 | { 17 | int Error = 0; 18 | 19 | valType const Test = glm::pi(); 20 | Error += Test > static_cast(3.14) ? 0 : 1; 21 | Error += Test < static_cast(3.15) ? 0 : 1; 22 | 23 | return Error; 24 | } 25 | 26 | int main() 27 | { 28 | int Error = 0; 29 | 30 | Error += test_epsilon(); 31 | Error += test_epsilon(); 32 | Error += test_pi(); 33 | Error += test_pi(); 34 | 35 | return Error; 36 | } 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_scalar_int_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform"); 8 | static_assert(sizeof(glm::int16) == sizeof(short), "signed short size isn't 4 bytes on this platform"); 9 | static_assert(sizeof(glm::int32) == sizeof(int), "signed int size isn't 4 bytes on this platform"); 10 | #endif 11 | 12 | static int test_size() 13 | { 14 | int Error = 0; 15 | 16 | Error += sizeof(glm::int8) == 1 ? 0 : 1; 17 | Error += sizeof(glm::int16) == 2 ? 0 : 1; 18 | Error += sizeof(glm::int32) == 4 ? 0 : 1; 19 | Error += sizeof(glm::int64) == 8 ? 0 : 1; 20 | 21 | return Error; 22 | } 23 | 24 | static int test_comp() 25 | { 26 | int Error = 0; 27 | 28 | Error += sizeof(glm::int8) < sizeof(glm::int16) ? 0 : 1; 29 | Error += sizeof(glm::int16) < sizeof(glm::int32) ? 0 : 1; 30 | Error += sizeof(glm::int32) < sizeof(glm::int64) ? 0 : 1; 31 | 32 | return Error; 33 | } 34 | 35 | int main() 36 | { 37 | int Error = 0; 38 | 39 | Error += test_size(); 40 | Error += test_comp(); 41 | 42 | return Error; 43 | } 44 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_scalar_packing.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int test_packUnorm() 5 | { 6 | int Error = 0; 7 | 8 | 9 | return Error; 10 | } 11 | 12 | int test_packSnorm() 13 | { 14 | int Error = 0; 15 | 16 | 17 | return Error; 18 | } 19 | 20 | int main() 21 | { 22 | int Error = 0; 23 | 24 | Error += test_packUnorm(); 25 | Error += test_packSnorm(); 26 | 27 | return Error; 28 | } 29 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_int1_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8vec1) == 1, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16vec1) == 2, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32vec1) == 4, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64vec1) == 8, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8vec1) == 1 ? 0 : 1; 15 | Error += sizeof(glm::i16vec1) == 2 ? 0 : 1; 16 | Error += sizeof(glm::i32vec1) == 4 ? 0 : 1; 17 | Error += sizeof(glm::i64vec1) == 8 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::i8vec1) < sizeof(glm::i16vec1) ? 0 : 1; 27 | Error += sizeof(glm::i16vec1) < sizeof(glm::i32vec1) ? 0 : 1; 28 | Error += sizeof(glm::i32vec1) < sizeof(glm::i64vec1) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_int2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8vec2) == 2, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16vec2) == 4, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32vec2) == 8, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64vec2) == 16, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8vec2) == 2 ? 0 : 1; 15 | Error += sizeof(glm::i16vec2) == 4 ? 0 : 1; 16 | Error += sizeof(glm::i32vec2) == 8 ? 0 : 1; 17 | Error += sizeof(glm::i64vec2) == 16 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::i8vec2) < sizeof(glm::i16vec2) ? 0 : 1; 27 | Error += sizeof(glm::i16vec2) < sizeof(glm::i32vec2) ? 0 : 1; 28 | Error += sizeof(glm::i32vec2) < sizeof(glm::i64vec2) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_int3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8vec3) == 3, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16vec3) == 6, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32vec3) == 12, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64vec3) == 24, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8vec3) == 3 ? 0 : 1; 15 | Error += sizeof(glm::i16vec3) == 6 ? 0 : 1; 16 | Error += sizeof(glm::i32vec3) == 12 ? 0 : 1; 17 | Error += sizeof(glm::i64vec3) == 24 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::i8vec3) < sizeof(glm::i16vec3) ? 0 : 1; 27 | Error += sizeof(glm::i16vec3) < sizeof(glm::i32vec3) ? 0 : 1; 28 | Error += sizeof(glm::i32vec3) < sizeof(glm::i64vec3) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_int4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::i8vec4) == 4, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::i16vec4) == 8, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::i32vec4) == 16, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::i64vec4) == 32, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::i8vec4) == 4 ? 0 : 1; 15 | Error += sizeof(glm::i16vec4) == 8 ? 0 : 1; 16 | Error += sizeof(glm::i32vec4) == 16 ? 0 : 1; 17 | Error += sizeof(glm::i64vec4) == 32 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::i8vec4) < sizeof(glm::i16vec4) ? 0 : 1; 27 | Error += sizeof(glm::i16vec4) < sizeof(glm::i32vec4) ? 0 : 1; 28 | Error += sizeof(glm::i32vec4) < sizeof(glm::i64vec4) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_uint1_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8vec1) == 1, "uint8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16vec1) == 2, "uint16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32vec1) == 4, "uint32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64vec1) == 8, "uint64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8vec1) == 1 ? 0 : 1; 15 | Error += sizeof(glm::u16vec1) == 2 ? 0 : 1; 16 | Error += sizeof(glm::u32vec1) == 4 ? 0 : 1; 17 | Error += sizeof(glm::u64vec1) == 8 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::u8vec1) < sizeof(glm::u16vec1) ? 0 : 1; 27 | Error += sizeof(glm::u16vec1) < sizeof(glm::u32vec1) ? 0 : 1; 28 | Error += sizeof(glm::u32vec1) < sizeof(glm::u64vec1) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_uint2_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8vec2) == 2, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16vec2) == 4, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32vec2) == 8, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64vec2) == 16, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8vec2) == 2 ? 0 : 1; 15 | Error += sizeof(glm::u16vec2) == 4 ? 0 : 1; 16 | Error += sizeof(glm::u32vec2) == 8 ? 0 : 1; 17 | Error += sizeof(glm::u64vec2) == 16 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::u8vec2) < sizeof(glm::u16vec2) ? 0 : 1; 27 | Error += sizeof(glm::u16vec2) < sizeof(glm::u32vec2) ? 0 : 1; 28 | Error += sizeof(glm::u32vec2) < sizeof(glm::u64vec2) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_uint3_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8vec3) == 3, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16vec3) == 6, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32vec3) == 12, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64vec3) == 24, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8vec3) == 3 ? 0 : 1; 15 | Error += sizeof(glm::u16vec3) == 6 ? 0 : 1; 16 | Error += sizeof(glm::u32vec3) == 12 ? 0 : 1; 17 | Error += sizeof(glm::u64vec3) == 24 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::u8vec3) < sizeof(glm::u16vec3) ? 0 : 1; 27 | Error += sizeof(glm::u16vec3) < sizeof(glm::u32vec3) ? 0 : 1; 28 | Error += sizeof(glm::u32vec3) < sizeof(glm::u64vec3) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/ext/ext_vector_uint4_sized.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if GLM_HAS_STATIC_ASSERT 4 | static_assert(sizeof(glm::u8vec4) == 4, "int8 size isn't 1 byte on this platform"); 5 | static_assert(sizeof(glm::u16vec4) == 8, "int16 size isn't 2 bytes on this platform"); 6 | static_assert(sizeof(glm::u32vec4) == 16, "int32 size isn't 4 bytes on this platform"); 7 | static_assert(sizeof(glm::u64vec4) == 32, "int64 size isn't 8 bytes on this platform"); 8 | #endif 9 | 10 | static int test_size() 11 | { 12 | int Error = 0; 13 | 14 | Error += sizeof(glm::u8vec4) == 4 ? 0 : 1; 15 | Error += sizeof(glm::u16vec4) == 8 ? 0 : 1; 16 | Error += sizeof(glm::u32vec4) == 16 ? 0 : 1; 17 | Error += sizeof(glm::u64vec4) == 32 ? 0 : 1; 18 | 19 | return Error; 20 | } 21 | 22 | static int test_comp() 23 | { 24 | int Error = 0; 25 | 26 | Error += sizeof(glm::u8vec4) < sizeof(glm::u16vec4) ? 0 : 1; 27 | Error += sizeof(glm::u16vec4) < sizeof(glm::u32vec4) ? 0 : 1; 28 | Error += sizeof(glm::u32vec4) < sizeof(glm::u64vec4) ? 0 : 1; 29 | 30 | return Error; 31 | } 32 | 33 | int main() 34 | { 35 | int Error = 0; 36 | 37 | Error += test_size(); 38 | Error += test_comp(); 39 | 40 | return Error; 41 | } 42 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/glm.cppcheck: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(gtc_bitfield) 2 | glmCreateTestGTC(gtc_color_space) 3 | glmCreateTestGTC(gtc_constants) 4 | glmCreateTestGTC(gtc_epsilon) 5 | glmCreateTestGTC(gtc_integer) 6 | glmCreateTestGTC(gtc_matrix_access) 7 | glmCreateTestGTC(gtc_matrix_integer) 8 | glmCreateTestGTC(gtc_matrix_inverse) 9 | glmCreateTestGTC(gtc_matrix_transform) 10 | glmCreateTestGTC(gtc_noise) 11 | glmCreateTestGTC(gtc_packing) 12 | glmCreateTestGTC(gtc_quaternion) 13 | glmCreateTestGTC(gtc_random) 14 | glmCreateTestGTC(gtc_round) 15 | glmCreateTestGTC(gtc_reciprocal) 16 | glmCreateTestGTC(gtc_type_aligned) 17 | glmCreateTestGTC(gtc_type_precision) 18 | glmCreateTestGTC(gtc_type_ptr) 19 | glmCreateTestGTC(gtc_ulp) 20 | glmCreateTestGTC(gtc_vec1) 21 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_constants.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test_epsilon() 4 | { 5 | int Error = 0; 6 | 7 | { 8 | float Test = glm::epsilon(); 9 | Error += Test > 0.0f ? 0 : 1; 10 | } 11 | 12 | { 13 | double Test = glm::epsilon(); 14 | Error += Test > 0.0 ? 0 : 1; 15 | } 16 | 17 | return Error; 18 | } 19 | 20 | int main() 21 | { 22 | int Error(0); 23 | 24 | //float MinHalf = 0.0f; 25 | //while (glm::half(MinHalf) == glm::half(0.0f)) 26 | // MinHalf += std::numeric_limits::epsilon(); 27 | Error += test_epsilon(); 28 | 29 | return Error; 30 | } 31 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_matrix_integer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_matrix_inverse.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int test_affine() 5 | { 6 | int Error = 0; 7 | 8 | { 9 | glm::mat3 const M( 10 | 2.f, 0.f, 0.f, 11 | 0.f, 2.f, 0.f, 12 | 0.f, 0.f, 1.f); 13 | glm::mat3 const A = glm::affineInverse(M); 14 | glm::mat3 const I = glm::inverse(M); 15 | glm::mat3 const R = glm::affineInverse(A); 16 | 17 | for(glm::length_t i = 0; i < A.length(); ++i) 18 | { 19 | Error += glm::all(glm::epsilonEqual(M[i], R[i], 0.01f)) ? 0 : 1; 20 | Error += glm::all(glm::epsilonEqual(A[i], I[i], 0.01f)) ? 0 : 1; 21 | } 22 | } 23 | 24 | { 25 | glm::mat4 const M( 26 | 2.f, 0.f, 0.f, 0.f, 27 | 0.f, 2.f, 0.f, 0.f, 28 | 0.f, 0.f, 2.f, 0.f, 29 | 0.f, 0.f, 0.f, 1.f); 30 | glm::mat4 const A = glm::affineInverse(M); 31 | glm::mat4 const I = glm::inverse(M); 32 | glm::mat4 const R = glm::affineInverse(A); 33 | 34 | for(glm::length_t i = 0; i < A.length(); ++i) 35 | { 36 | Error += glm::all(glm::epsilonEqual(M[i], R[i], 0.01f)) ? 0 : 1; 37 | Error += glm::all(glm::epsilonEqual(A[i], I[i], 0.01f)) ? 0 : 1; 38 | } 39 | } 40 | 41 | return Error; 42 | } 43 | 44 | int main() 45 | { 46 | int Error = 0; 47 | 48 | Error += test_affine(); 49 | 50 | return Error; 51 | } 52 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_matrix_transform.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int test_perspective() 6 | { 7 | int Error = 0; 8 | 9 | glm::mat4 Projection = glm::perspective(glm::pi() * 0.25f, 4.0f / 3.0f, 0.1f, 100.0f); 10 | 11 | return Error; 12 | } 13 | 14 | int test_pick() 15 | { 16 | int Error = 0; 17 | 18 | glm::mat4 Pick = glm::pickMatrix(glm::vec2(1, 2), glm::vec2(3, 4), glm::ivec4(0, 0, 320, 240)); 19 | 20 | return Error; 21 | } 22 | 23 | int test_tweakedInfinitePerspective() 24 | { 25 | int Error = 0; 26 | 27 | glm::mat4 ProjectionA = glm::tweakedInfinitePerspective(45.f, 640.f/480.f, 1.0f); 28 | glm::mat4 ProjectionB = glm::tweakedInfinitePerspective(45.f, 640.f/480.f, 1.0f, 0.001f); 29 | 30 | 31 | return Error; 32 | } 33 | 34 | int test_translate() 35 | { 36 | int Error = 0; 37 | 38 | glm::lowp_vec3 v(1.0); 39 | glm::lowp_mat4 m(0); 40 | glm::lowp_mat4 t = glm::translate(m, v); 41 | 42 | return Error; 43 | } 44 | 45 | int main() 46 | { 47 | int Error = 0; 48 | 49 | Error += test_translate(); 50 | Error += test_tweakedInfinitePerspective(); 51 | Error += test_pick(); 52 | Error += test_perspective(); 53 | 54 | return Error; 55 | } 56 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_quaternion.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_quaternion.cpp -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_reciprocal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | return 0; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_user_defined_types.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2011-05-27 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/type_ptr.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_FORCE_RADIANS 11 | #include 12 | 13 | int test_make_pointer_vec() 14 | { 15 | int Error = 0; 16 | 17 | glm::func(); 18 | //func(); 19 | 20 | return Error; 21 | } 22 | 23 | int main() 24 | { 25 | int Error = 0; 26 | 27 | Error += test_make_pointer_vec(); 28 | 29 | return Error; 30 | } 31 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtc/gtc_vec1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | int Error = 0; 6 | 7 | return Error; 8 | } 9 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_associated_min_max.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int Error(0); 8 | 9 | return Error; 10 | } 11 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_closest_point.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_color_space.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int test_saturation() 5 | { 6 | int Error(0); 7 | 8 | glm::vec4 Color = glm::saturation(1.0f, glm::vec4(1.0, 0.5, 0.0, 1.0)); 9 | 10 | return Error; 11 | } 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | Error += test_saturation(); 18 | 19 | return Error; 20 | } 21 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_color_space_YCoCg.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_compatibility.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | Error += glm::isfinite(1.0f) ? 0 : 1; 9 | Error += glm::isfinite(1.0) ? 0 : 1; 10 | Error += glm::isfinite(-1.0f) ? 0 : 1; 11 | Error += glm::isfinite(-1.0) ? 0 : 1; 12 | 13 | Error += glm::all(glm::isfinite(glm::vec4(1.0f))) ? 0 : 1; 14 | Error += glm::all(glm::isfinite(glm::dvec4(1.0))) ? 0 : 1; 15 | Error += glm::all(glm::isfinite(glm::vec4(-1.0f))) ? 0 : 1; 16 | Error += glm::all(glm::isfinite(glm::dvec4(-1.0))) ? 0 : 1; 17 | 18 | return Error; 19 | } 20 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_extend.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_exterior_product.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int Error = 0; 8 | 9 | float const f = glm::cross(glm::vec2(1.0f, 1.0f), glm::vec2(1.0f, 1.0f)); 10 | Error += glm::epsilonEqual(f, 0.0f, 0.001f) ? 0 : 1; 11 | 12 | return Error; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_fast_exponential.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_functions.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int test_gauss_1d() 6 | { 7 | int Error = 0; 8 | 9 | std::vector Result(20); 10 | for(std::size_t i = 0, n = Result.size(); i < n; ++i) 11 | Result[i] = glm::gauss(static_cast(i) * 0.1f, 0.0f, 1.0f); 12 | 13 | return Error; 14 | } 15 | 16 | int test_gauss_2d() 17 | { 18 | int Error = 0; 19 | 20 | std::vector Result(20); 21 | for(std::size_t i = 0, n = Result.size(); i < n; ++i) 22 | Result[i] = glm::gauss(glm::vec2(static_cast(i)) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f)); 23 | 24 | return Error; 25 | } 26 | 27 | int main() 28 | { 29 | int Error = 0; 30 | 31 | Error += test_gauss_1d(); 32 | Error += test_gauss_2d(); 33 | 34 | return Error; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_gradient_paint.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int test_radialGradient() 5 | { 6 | int Error = 0; 7 | 8 | float Gradient = glm::radialGradient(glm::vec2(0), 1.0f, glm::vec2(1), glm::vec2(0.5)); 9 | Error += Gradient != 0.0f ? 0 : 1; 10 | 11 | return Error; 12 | } 13 | 14 | int test_linearGradient() 15 | { 16 | int Error = 0; 17 | 18 | float Gradient = glm::linearGradient(glm::vec2(0), glm::vec2(1), glm::vec2(0.5)); 19 | Error += Gradient != 0.0f ? 0 : 1; 20 | 21 | return Error; 22 | } 23 | 24 | int main() 25 | { 26 | int Error = 0; 27 | 28 | Error += test_radialGradient(); 29 | Error += test_linearGradient(); 30 | 31 | return Error; 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_handed_coordinate_space.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_int_10_10_10_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-10-25 5 | // Updated : 2013-10-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/associated_min_max.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_matrix_cross_product.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_matrix_decompose.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | glm::mat4 Matrix(1); 9 | 10 | glm::vec3 Scale; 11 | glm::quat Orientation; 12 | glm::vec3 Translation; 13 | glm::vec3 Skew(1); 14 | glm::vec4 Perspective(1); 15 | 16 | glm::decompose(Matrix, Scale, Orientation, Translation, Skew, Perspective); 17 | 18 | return Error; 19 | } 20 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_matrix_major_storage.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_matrix_query.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int test_isNull() 5 | { 6 | int Error(0); 7 | 8 | bool TestA = glm::isNull(glm::mat4(0), 0.00001f); 9 | Error += TestA ? 0 : 1; 10 | 11 | return Error; 12 | } 13 | 14 | int test_isIdentity() 15 | { 16 | int Error(0); 17 | 18 | { 19 | bool TestA = glm::isIdentity(glm::mat2(1), 0.00001f); 20 | Error += TestA ? 0 : 1; 21 | } 22 | { 23 | bool TestA = glm::isIdentity(glm::mat3(1), 0.00001f); 24 | Error += TestA ? 0 : 1; 25 | } 26 | { 27 | bool TestA = glm::isIdentity(glm::mat4(1), 0.00001f); 28 | Error += TestA ? 0 : 1; 29 | } 30 | 31 | return Error; 32 | } 33 | 34 | int test_isNormalized() 35 | { 36 | int Error(0); 37 | 38 | bool TestA = glm::isNormalized(glm::mat4(1), 0.00001f); 39 | Error += TestA ? 0 : 1; 40 | 41 | return Error; 42 | } 43 | 44 | int test_isOrthogonal() 45 | { 46 | int Error(0); 47 | 48 | bool TestA = glm::isOrthogonal(glm::mat4(1), 0.00001f); 49 | Error += TestA ? 0 : 1; 50 | 51 | return Error; 52 | } 53 | 54 | int main() 55 | { 56 | int Error(0); 57 | 58 | Error += test_isNull(); 59 | Error += test_isIdentity(); 60 | Error += test_isNormalized(); 61 | Error += test_isOrthogonal(); 62 | 63 | return Error; 64 | } 65 | 66 | 67 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_matrix_transform_2d.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_mixed_product.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-10-25 5 | // Updated : 2013-10-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/associated_min_max.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_normal.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_normalize_dot.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_number_precision.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_optimum_pow.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_orthonormalize.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_perpendicular.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_polar_coordinates.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_projection.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_rotate_normalized_axis.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error(0); 7 | 8 | return Error; 9 | } 10 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_scalar_multiplication.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | #include 4 | #include 5 | 6 | #if GLM_HAS_TEMPLATE_ALIASES && !(GLM_COMPILER & GLM_COMPILER_GCC) 7 | #include 8 | 9 | int main() 10 | { 11 | int Error(0); 12 | glm::vec3 v(0.5, 3.1, -9.1); 13 | 14 | Error += glm::all(glm::equal(v, 1.0 * v, glm::epsilon())) ? 0 : 1; 15 | Error += glm::all(glm::equal(v, 1 * v, glm::epsilon())) ? 0 : 1; 16 | Error += glm::all(glm::equal(v, 1u * v, glm::epsilon())) ? 0 : 1; 17 | 18 | glm::mat3 m(1, 2, 3, 4, 5, 6, 7, 8, 9); 19 | glm::vec3 w = 0.5f * m * v; 20 | 21 | Error += glm::all(glm::equal((m*v)/2, w, glm::epsilon())) ? 0 : 1; 22 | Error += glm::all(glm::equal(m*(v/2), w, glm::epsilon())) ? 0 : 1; 23 | Error += glm::all(glm::equal((m/2)*v, w, glm::epsilon())) ? 0 : 1; 24 | Error += glm::all(glm::equal((0.5*m)*v, w, glm::epsilon())) ? 0 : 1; 25 | Error += glm::all(glm::equal(0.5*(m*v), w, glm::epsilon())) ? 0 : 1; 26 | 27 | return Error; 28 | } 29 | 30 | #else 31 | 32 | int main() 33 | { 34 | return 0; 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_texture.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | #include 4 | 5 | int test_levels() 6 | { 7 | int Error = 0; 8 | 9 | int const Levels = glm::levels(glm::ivec2(3, 2)); 10 | Error += Levels == 2 ? 0 : 1; 11 | 12 | return Error; 13 | } 14 | 15 | int main() 16 | { 17 | int Error = 0; 18 | 19 | Error += test_levels(); 20 | 21 | return Error; 22 | } 23 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_type_trait.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int Error = 0; 8 | 9 | 10 | 11 | return Error; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/gtx/gtx_vec_swizzle.cpp: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | int main() 5 | { 6 | int Error = 0; 7 | 8 | 9 | return Error; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/test/perf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(perf_matrix_div) 2 | glmCreateTestGTC(perf_matrix_inverse) 3 | glmCreateTestGTC(perf_matrix_mul) 4 | glmCreateTestGTC(perf_matrix_mul_vector) 5 | glmCreateTestGTC(perf_matrix_transpose) 6 | glmCreateTestGTC(perf_vector_mul_matrix) 7 | -------------------------------------------------------------------------------- /diff-gaussian-rasterization/third_party/glm/util/autoexp.txt: -------------------------------------------------------------------------------- 1 | [Visualizer] 2 | 3 | glm::detail::tvec2<*>{ 4 | preview ( 5 | #(#($c.x,$c.y)) 6 | ) 7 | children ( 8 | #([x]: $c.x,[y]: $c.y) 9 | ) 10 | } 11 | 12 | glm::detail::tvec3<*>{ 13 | preview ( 14 | #($e.x,$e.y,$e.z) 15 | ) 16 | children ( 17 | #([x]: $e.x,[y]: $e.y,[z]: $e.z) 18 | ) 19 | } 20 | 21 | glm::detail::tvec4<*>{ 22 | preview ( 23 | #($c.x,$c.y,$c.z,$c.w) 24 | ) 25 | children ( 26 | #([x]: $e.x,[y]: $e.y,[z]: $e.z, #([w]: $e.w)) 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: 4d_gaussian_splatting 2 | channels: 3 | - pytorch 4 | - conda-forge 5 | - defaults 6 | dependencies: 7 | - cudatoolkit=11.6 8 | - plyfile=0.8.1 9 | - python=3.7.13 10 | - pip=22.3.1 11 | - pytorch=1.12.1 12 | - torchaudio=0.12.1 13 | - torchvision=0.13.1 14 | - colmap 15 | - pip: 16 | - tqdm==4.66.1 17 | - torchmetrics==0.11.4 18 | - imagesize==1.4.1 19 | - kornia==0.6.12 20 | - omegaconf==2.3.0 21 | - ./simple-knn 22 | - ./pointops2 23 | -------------------------------------------------------------------------------- /lpipsPyTorch/__init__.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | from .modules.lpips import LPIPS 4 | 5 | 6 | def lpips(x: torch.Tensor, 7 | y: torch.Tensor, 8 | net_type: str = 'alex', 9 | version: str = '0.1'): 10 | r"""Function that measures 11 | Learned Perceptual Image Patch Similarity (LPIPS). 12 | 13 | Arguments: 14 | x, y (torch.Tensor): the input tensors to compare. 15 | net_type (str): the network type to compare the features: 16 | 'alex' | 'squeeze' | 'vgg'. Default: 'alex'. 17 | version (str): the version of LPIPS. Default: 0.1. 18 | """ 19 | device = x.device 20 | criterion = LPIPS(net_type, version).to(device) 21 | return criterion(x, y) 22 | -------------------------------------------------------------------------------- /lpipsPyTorch/modules/lpips.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | 4 | from .networks import get_network, LinLayers 5 | from .utils import get_state_dict 6 | 7 | 8 | class LPIPS(nn.Module): 9 | r"""Creates a criterion that measures 10 | Learned Perceptual Image Patch Similarity (LPIPS). 11 | 12 | Arguments: 13 | net_type (str): the network type to compare the features: 14 | 'alex' | 'squeeze' | 'vgg'. Default: 'alex'. 15 | version (str): the version of LPIPS. Default: 0.1. 16 | """ 17 | def __init__(self, net_type: str = 'alex', version: str = '0.1'): 18 | 19 | assert version in ['0.1'], 'v0.1 is only supported now' 20 | 21 | super(LPIPS, self).__init__() 22 | 23 | # pretrained network 24 | self.net = get_network(net_type) 25 | 26 | # linear layers 27 | self.lin = LinLayers(self.net.n_channels_list) 28 | self.lin.load_state_dict(get_state_dict(net_type, version)) 29 | 30 | def forward(self, x: torch.Tensor, y: torch.Tensor): 31 | feat_x, feat_y = self.net(x), self.net(y) 32 | 33 | diff = [(fx - fy) ** 2 for fx, fy in zip(feat_x, feat_y)] 34 | res = [l(d).mean((2, 3), True) for d, l in zip(diff, self.lin)] 35 | 36 | return torch.sum(torch.cat(res, 0), 0, True) 37 | -------------------------------------------------------------------------------- /lpipsPyTorch/modules/utils.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | 3 | import torch 4 | 5 | 6 | def normalize_activation(x, eps=1e-10): 7 | norm_factor = torch.sqrt(torch.sum(x ** 2, dim=1, keepdim=True)) 8 | return x / (norm_factor + eps) 9 | 10 | 11 | def get_state_dict(net_type: str = 'alex', version: str = '0.1'): 12 | # build url 13 | url = 'https://raw.githubusercontent.com/richzhang/PerceptualSimilarity/' \ 14 | + f'master/lpips/weights/v{version}/{net_type}.pth' 15 | 16 | # download 17 | old_state_dict = torch.hub.load_state_dict_from_url( 18 | url, progress=True, 19 | map_location=None if torch.cuda.is_available() else torch.device('cpu') 20 | ) 21 | 22 | # rename keys 23 | new_state_dict = OrderedDict() 24 | for key, val in old_state_dict.items(): 25 | new_key = key 26 | new_key = new_key.replace('lin', '') 27 | new_key = new_key.replace('model.', '') 28 | new_state_dict[new_key] = val 29 | 30 | return new_state_dict 31 | -------------------------------------------------------------------------------- /pointops2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/pointops2/__init__.py -------------------------------------------------------------------------------- /pointops2/functions/__init__.py: -------------------------------------------------------------------------------- 1 | from pointops2 import * -------------------------------------------------------------------------------- /pointops2/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | from setuptools import setup 3 | from torch.utils.cpp_extension import BuildExtension, CUDAExtension 4 | from distutils.sysconfig import get_config_vars 5 | 6 | # (opt,) = get_config_vars('OPT') 7 | # os.environ['OPT'] = " ".join( 8 | # flag for flag in opt.split() if flag != '-Wstrict-prototypes' 9 | # ) 10 | 11 | src = 'src' 12 | sources = [os.path.join(root, file) for root, dirs, files in os.walk(src) 13 | for file in files 14 | if file.endswith('.cpp') or file.endswith('.cu')] 15 | 16 | setup( 17 | name='pointops2', 18 | version='1.0', 19 | install_requires=["torch", "numpy"], 20 | packages=["pointops2"], 21 | package_dir={"pointops2": "functions"}, 22 | ext_modules=[ 23 | CUDAExtension( 24 | name='pointops2_cuda', 25 | sources=sources, 26 | extra_compile_args={'cxx': ['-g'], 'nvcc': ['-O2']} 27 | ) 28 | ], 29 | cmdclass={'build_ext': BuildExtension} 30 | ) 31 | -------------------------------------------------------------------------------- /pointops2/src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fudan-zvg/4d-gaussian-splatting/3fe460f1f2342526bccf6c01b63da125faf0fa94/pointops2/src/__init__.py -------------------------------------------------------------------------------- /pointops2/src/aggregation/aggregation_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _AGGREGATION_CUDA_KERNEL 2 | #define _AGGREGATION_CUDA_KERNEL 3 | #include 4 | #include 5 | #include 6 | 7 | void aggregation_forward_cuda(int n, int nsample, int c, int w_c, at::Tensor input_tensor, at::Tensor position_tensor, at::Tensor weight_tensor, at::Tensor idx_tensor, at::Tensor output_tensor); 8 | void aggregation_backward_cuda(int n, int nsample, int c, int w_c, at::Tensor input_tensor, at::Tensor position_tensor, at::Tensor weight_tensor, at::Tensor idx_tensor, at::Tensor grad_output_tensor, at::Tensor grad_input_tensor, at::Tensor grad_position_tensor, at::Tensor grad_weight_tensor); 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void aggregation_forward_cuda_launcher(int n, int nsample, int c, int w_c, const float *input, const float *position, const float *weight, const int *idx, float *output); 15 | void aggregation_backward_cuda_launcher(int n, int nsample, int c, int w_c, const float *input, const float *position, const float *weight, const int *idx, const float *grad_output, float *grad_input, float *grad_position, float *grad_weight); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /pointops2/src/cuda_utils.h: -------------------------------------------------------------------------------- 1 | #ifndef _CUDA_UTILS_H 2 | #define _CUDA_UTILS_H 3 | 4 | #include 5 | #include 6 | 7 | #define TOTAL_THREADS 1024 8 | #define THREADS_PER_BLOCK 256 9 | #define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0)) 10 | 11 | inline int opt_n_threads(int work_size) { 12 | const int pow_2 = std::log(static_cast(work_size)) / std::log(2.0); 13 | return std::max(std::min(1 << pow_2, TOTAL_THREADS), 1); 14 | } 15 | 16 | inline dim3 opt_block_config(int x, int y) { 17 | const int x_threads = opt_n_threads(x); 18 | const int y_threads = std::max(std::min(opt_n_threads(y), TOTAL_THREADS / x_threads), 1); 19 | dim3 block_config(x_threads, y_threads, 1); 20 | return block_config; 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /pointops2/src/grouping/grouping_cuda.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "grouping_cuda_kernel.h" 5 | 6 | 7 | void grouping_forward_cuda(int m, int nsample, int c, at::Tensor input_tensor, at::Tensor idx_tensor, at::Tensor output_tensor) 8 | { 9 | const float *input = input_tensor.data_ptr(); 10 | const int *idx = idx_tensor.data_ptr(); 11 | float *output = output_tensor.data_ptr(); 12 | grouping_forward_cuda_launcher(m, nsample, c, input, idx, output); 13 | } 14 | 15 | void grouping_backward_cuda(int m, int nsample, int c, at::Tensor grad_output_tensor, at::Tensor idx_tensor, at::Tensor grad_input_tensor) 16 | { 17 | const float *grad_output = grad_output_tensor.data_ptr(); 18 | const int *idx = idx_tensor.data_ptr(); 19 | float *grad_input = grad_input_tensor.data_ptr(); 20 | grouping_backward_cuda_launcher(m, nsample, c, grad_output, idx, grad_input); 21 | } 22 | -------------------------------------------------------------------------------- /pointops2/src/grouping/grouping_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _GROUPING_CUDA_KERNEL 2 | #define _GROUPING_CUDA_KERNEL 3 | #include 4 | #include 5 | #include 6 | 7 | void grouping_forward_cuda(int m, int nsample, int c, at::Tensor input_tensor, at::Tensor idx_tensor, at::Tensor output_tensor); 8 | void grouping_backward_cuda(int m, int nsample, int c, at::Tensor grad_output_tensor, at::Tensor idx_tensor, at::Tensor grad_input_tensor); 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void grouping_forward_cuda_launcher(int m, int nsample, int c, const float *input, const int *idx, float *output); 15 | void grouping_backward_cuda_launcher(int m, int nsample, int c, const float *grad_output, const int *idx, float *grad_input); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /pointops2/src/interpolation/interpolation_cuda.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "interpolation_cuda_kernel.h" 5 | 6 | 7 | void interpolation_forward_cuda(int n, int c, int k, at::Tensor input_tensor, at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor output_tensor) 8 | { 9 | const float *input = input_tensor.data_ptr(); 10 | const int *idx = idx_tensor.data_ptr(); 11 | const float *weight = weight_tensor.data_ptr(); 12 | float *output = output_tensor.data_ptr(); 13 | interpolation_forward_cuda_launcher(n, c, k, input, idx, weight, output); 14 | } 15 | 16 | void interpolation_backward_cuda(int n, int c, int k, at::Tensor grad_output_tensor, at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor grad_input_tensor) 17 | { 18 | const float *grad_output = grad_output_tensor.data_ptr(); 19 | const int *idx = idx_tensor.data_ptr(); 20 | const float *weight = weight_tensor.data_ptr(); 21 | float *grad_input = grad_input_tensor.data_ptr(); 22 | interpolation_backward_cuda_launcher(n, c, k, grad_output, idx, weight, grad_input); 23 | } 24 | -------------------------------------------------------------------------------- /pointops2/src/interpolation/interpolation_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERPOLATION_CUDA_KERNEL 2 | #define _INTERPOLATION_CUDA_KERNEL 3 | #include 4 | #include 5 | #include 6 | 7 | void interpolation_forward_cuda(int n, int c, int k, at::Tensor input_tensor, at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor output_tensor); 8 | void interpolation_backward_cuda(int n, int c, int k, at::Tensor grad_output_tensor, at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor grad_input_tensor); 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void interpolation_forward_cuda_launcher(int n, int c, int k, const float *input, const int *idx, const float *weight, float *output); 15 | void interpolation_backward_cuda_launcher(int n, int c, int k, const float *grad_output, const int *idx, const float *weight, float *grad_input); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /pointops2/src/knnquery/knnquery_cuda.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "knnquery_cuda_kernel.h" 5 | 6 | 7 | void knnquery_cuda(int m, int nsample, at::Tensor xyz_tensor, at::Tensor new_xyz_tensor, at::Tensor offset_tensor, at::Tensor new_offset_tensor, at::Tensor idx_tensor, at::Tensor dist2_tensor) 8 | { 9 | const float *xyz = xyz_tensor.data_ptr(); 10 | const float *new_xyz = new_xyz_tensor.data_ptr(); 11 | const int *offset = offset_tensor.data_ptr(); 12 | const int *new_offset = new_offset_tensor.data_ptr(); 13 | int *idx = idx_tensor.data_ptr(); 14 | float *dist2 = dist2_tensor.data_ptr(); 15 | knnquery_cuda_launcher(m, nsample, xyz, new_xyz, offset, new_offset, idx, dist2); 16 | } 17 | -------------------------------------------------------------------------------- /pointops2/src/knnquery/knnquery_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _KNNQUERY_CUDA_KERNEL 2 | #define _KNNQUERY_CUDA_KERNEL 3 | #include 4 | #include 5 | #include 6 | 7 | void knnquery_cuda(int m, int nsample, at::Tensor xyz_tensor, at::Tensor new_xyz_tensor, at::Tensor offset_tensor, at::Tensor new_offset_tensor, at::Tensor idx_tensor, at::Tensor dist2_tensor); 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | void knnquery_cuda_launcher(int m, int nsample, const float *xyz, const float *new_xyz, const int *offset, const int *new_offset, int *idx, float *dist2); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /pointops2/src/sampling/sampling_cuda.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "sampling_cuda_kernel.h" 5 | 6 | 7 | void furthestsampling_cuda(int b, int n, at::Tensor xyz_tensor, at::Tensor offset_tensor, at::Tensor new_offset_tensor, at::Tensor tmp_tensor, at::Tensor idx_tensor) 8 | { 9 | const float *xyz = xyz_tensor.data_ptr(); 10 | const int *offset = offset_tensor.data_ptr(); 11 | const int *new_offset = new_offset_tensor.data_ptr(); 12 | float *tmp = tmp_tensor.data_ptr(); 13 | int *idx = idx_tensor.data_ptr(); 14 | furthestsampling_cuda_launcher(b, n, xyz, offset, new_offset, tmp, idx); 15 | } 16 | -------------------------------------------------------------------------------- /pointops2/src/sampling/sampling_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _SAMPLING_CUDA_KERNEL 2 | #define _SAMPLING_CUDA_KERNEL 3 | #include 4 | #include 5 | #include 6 | 7 | void furthestsampling_cuda(int b, int n, at::Tensor xyz_tensor, at::Tensor offset_tensor, at::Tensor new_offset_tensor, at::Tensor tmp_tensor, at::Tensor idx_tensor); 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | void furthestsampling_cuda_launcher(int b, int n, const float *xyz, const int *offset, const int *new_offset, float *tmp, int *idx); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /pointops2/src/subtraction/subtraction_cuda.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "subtraction_cuda_kernel.h" 5 | 6 | 7 | void subtraction_forward_cuda(int n, int nsample, int c, at::Tensor input1_tensor, at::Tensor input2_tensor, at::Tensor idx_tensor, at::Tensor output_tensor) 8 | { 9 | const float *input1 = input1_tensor.data_ptr(); 10 | const float *input2 = input2_tensor.data_ptr(); 11 | const int *idx = idx_tensor.data_ptr(); 12 | float *output = output_tensor.data_ptr(); 13 | subtraction_forward_cuda_launcher(n, nsample, c, input1, input2, idx, output); 14 | } 15 | 16 | void subtraction_backward_cuda(int n, int nsample, int c, at::Tensor idx_tensor, at::Tensor grad_output_tensor, at::Tensor grad_input1_tensor, at::Tensor grad_input2_tensor) 17 | { 18 | const int *idx = idx_tensor.data_ptr(); 19 | const float *grad_output = grad_output_tensor.data_ptr(); 20 | float *grad_input1 = grad_input1_tensor.data_ptr(); 21 | float *grad_input2 = grad_input2_tensor.data_ptr(); 22 | subtraction_backward_cuda_launcher(n, nsample, c, idx, grad_output, grad_input1, grad_input2); 23 | } 24 | -------------------------------------------------------------------------------- /pointops2/src/subtraction/subtraction_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _SUBTRACTION_CUDA_KERNEL 2 | #define _SUBTRACTION_CUDA_KERNEL 3 | #include 4 | #include 5 | #include 6 | 7 | void subtraction_forward_cuda(int n, int nsample, int c, at::Tensor input1_tensor, at::Tensor input2_tensor, at::Tensor idx_tensor, at::Tensor output_tensor); 8 | void subtraction_backward_cuda(int n, int nsample, int c, at::Tensor idx_tensor, at::Tensor grad_output_tensor, at::Tensor grad_input1_tensor, at::Tensor grad_input2_tensor); 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void subtraction_forward_cuda_launcher(int n, int nsample, int c, const float *input1, const float *input2, const int *idx, float *output); 15 | void subtraction_backward_cuda_launcher(int n, int nsample, int c, const int *idx, const float *grad_output, float *grad_input1, float *grad_input2); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /simple-knn/ext.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023, Inria 3 | * GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | * All rights reserved. 5 | * 6 | * This software is free for non-commercial, research and evaluation use 7 | * under the terms of the LICENSE.md file. 8 | * 9 | * For inquiries contact george.drettakis@inria.fr 10 | */ 11 | 12 | #include 13 | #include "spatial.h" 14 | 15 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 16 | m.def("distCUDA2", &distCUDA2); 17 | } 18 | -------------------------------------------------------------------------------- /simple-knn/setup.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023, Inria 3 | # GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | # All rights reserved. 5 | # 6 | # This software is free for non-commercial, research and evaluation use 7 | # under the terms of the LICENSE.md file. 8 | # 9 | # For inquiries contact george.drettakis@inria.fr 10 | # 11 | 12 | from setuptools import setup 13 | from torch.utils.cpp_extension import CUDAExtension, BuildExtension 14 | import os 15 | 16 | cxx_compiler_flags = [] 17 | 18 | if os.name == 'nt': 19 | cxx_compiler_flags.append("/wd4624") 20 | 21 | setup( 22 | name="simple_knn", 23 | ext_modules=[ 24 | CUDAExtension( 25 | name="simple_knn._C", 26 | sources=[ 27 | "spatial.cu", 28 | "simple_knn.cu", 29 | "ext.cpp"], 30 | extra_compile_args={"nvcc": [], "cxx": cxx_compiler_flags}) 31 | ], 32 | cmdclass={ 33 | 'build_ext': BuildExtension 34 | } 35 | ) 36 | -------------------------------------------------------------------------------- /simple-knn/simple_knn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023, Inria 3 | * GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | * All rights reserved. 5 | * 6 | * This software is free for non-commercial, research and evaluation use 7 | * under the terms of the LICENSE.md file. 8 | * 9 | * For inquiries contact george.drettakis@inria.fr 10 | */ 11 | 12 | #ifndef SIMPLEKNN_H_INCLUDED 13 | #define SIMPLEKNN_H_INCLUDED 14 | 15 | class SimpleKNN 16 | { 17 | public: 18 | static void knn(int P, float3* points, float* meanDists); 19 | }; 20 | 21 | #endif -------------------------------------------------------------------------------- /simple-knn/spatial.cu: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023, Inria 3 | * GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | * All rights reserved. 5 | * 6 | * This software is free for non-commercial, research and evaluation use 7 | * under the terms of the LICENSE.md file. 8 | * 9 | * For inquiries contact george.drettakis@inria.fr 10 | */ 11 | 12 | #include "spatial.h" 13 | #include "simple_knn.h" 14 | 15 | torch::Tensor 16 | distCUDA2(const torch::Tensor& points) 17 | { 18 | const int P = points.size(0); 19 | 20 | auto float_opts = points.options().dtype(torch::kFloat32); 21 | torch::Tensor means = torch::full({P}, 0.0, float_opts); 22 | 23 | SimpleKNN::knn(P, (float3*)points.contiguous().data(), means.contiguous().data()); 24 | 25 | return means; 26 | } -------------------------------------------------------------------------------- /simple-knn/spatial.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023, Inria 3 | * GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | * All rights reserved. 5 | * 6 | * This software is free for non-commercial, research and evaluation use 7 | * under the terms of the LICENSE.md file. 8 | * 9 | * For inquiries contact george.drettakis@inria.fr 10 | */ 11 | 12 | #include 13 | 14 | torch::Tensor distCUDA2(const torch::Tensor& points); -------------------------------------------------------------------------------- /utils/image_utils.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023, Inria 3 | # GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | # All rights reserved. 5 | # 6 | # This software is free for non-commercial, research and evaluation use 7 | # under the terms of the LICENSE.md file. 8 | # 9 | # For inquiries contact george.drettakis@inria.fr 10 | # 11 | 12 | import torch 13 | 14 | def mse(img1, img2): 15 | return (((img1 - img2)) ** 2).view(img1.shape[0], -1).mean(1, keepdim=True) 16 | 17 | def psnr(img1, img2): 18 | mse = (((img1 - img2)) ** 2).view(img1.shape[0], -1).mean(1, keepdim=True) 19 | return 20 * torch.log10(1.0 / torch.sqrt(mse)) 20 | 21 | def easy_cmap(x: torch.Tensor): 22 | x_rgb = torch.zeros((3, x.shape[0], x.shape[1]), dtype=torch.float32, device=x.device) 23 | x_max, x_min = x.max(), x.min() 24 | x_normalize = (x - x_min) / (x_max - x_min) 25 | x_rgb[0] = torch.clamp(x_normalize, 0, 1) 26 | x_rgb[1] = torch.clamp(x_normalize, 0, 1) 27 | x_rgb[2] = torch.clamp(x_normalize, 0, 1) 28 | return x_rgb 29 | 30 | -------------------------------------------------------------------------------- /utils/system_utils.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2023, Inria 3 | # GRAPHDECO research group, https://team.inria.fr/graphdeco 4 | # All rights reserved. 5 | # 6 | # This software is free for non-commercial, research and evaluation use 7 | # under the terms of the LICENSE.md file. 8 | # 9 | # For inquiries contact george.drettakis@inria.fr 10 | # 11 | 12 | from errno import EEXIST 13 | from os import makedirs, path 14 | import os 15 | 16 | def mkdir_p(folder_path): 17 | # Creates a directory. equivalent to using mkdir -p on the command line 18 | try: 19 | makedirs(folder_path) 20 | except OSError as exc: # Python >2.5 21 | if exc.errno == EEXIST and path.isdir(folder_path): 22 | pass 23 | else: 24 | raise 25 | 26 | def searchForMaxIteration(folder): 27 | saved_iters = [int(fname.split("_")[-1]) for fname in os.listdir(folder)] 28 | return max(saved_iters) 29 | --------------------------------------------------------------------------------