Blender V5.0
BLI_hash.h File Reference
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

#define rot(x, k)
#define final(a, b, c)

Functions

BLI_INLINE unsigned int BLI_hash_int_3d (unsigned int kx, unsigned int ky, unsigned int kz)
BLI_INLINE unsigned int BLI_hash_int_2d (unsigned int kx, unsigned int ky)
BLI_INLINE unsigned int BLI_hash_string (const char *str)
BLI_INLINE float BLI_hash_int_2d_to_float (uint32_t kx, uint32_t ky)
BLI_INLINE float BLI_hash_int_3d_to_float (uint32_t kx, uint32_t ky, uint32_t kz)
BLI_INLINE unsigned int BLI_hash_int (unsigned int k)
BLI_INLINE float BLI_hash_int_01 (unsigned int k)
BLI_INLINE void BLI_hash_pointer_to_color (const void *ptr, int *r, int *g, int *b)

Macro Definition Documentation

◆ final

#define final ( a,
b,
c )
Value:
{ \
c ^= b; \
c -= rot(b, 14); \
a ^= c; \
a -= rot(c, 11); \
b ^= a; \
b -= rot(a, 25); \
c ^= b; \
c -= rot(b, 16); \
a ^= c; \
a -= rot(c, 4); \
b ^= a; \
b -= rot(a, 14); \
c ^= b; \
c -= rot(b, 24); \
} \
((void)0)
#define rot(x, k)

Definition at line 19 of file BLI_hash.h.

Referenced by blender::ui::AbstractTreeViewItem::begin_renaming(), blender::draw::compositor_engine::Instance::begin_sync(), blender::draw::edit_select::Instance::begin_sync(), blender::image_engine::Instance::begin_sync(), blender::workbench::Instance::begin_sync(), blender::ui::AbstractGridViewItem::build_grid_tile(), blender::ui::AbstractTreeViewItem::build_row(), blender::image_engine::Engine::create_instance(), blender::draw::compositor_engine::Instance::end_sync(), blender::draw::edit_select::Instance::end_sync(), blender::image_engine::Instance::end_sync(), blender::workbench::Instance::end_sync(), blender::nodes::node_fn_align_rotation_to_vector_cc::AlignRotationToVectorFunction::get_execution_hints(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::hash(), blender::nodes::node_geo_curve_handle_type_selection_cc::HandleTypeFieldInput::hash(), blender::nodes::node_geo_curve_spline_parameter_cc::IndexOnSplineFieldInput::hash(), blender::nodes::node_geo_curve_topology_curve_of_point_cc::PointIndexInCurveInput::hash(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::CurvePointCountInput::hash(), blender::nodes::node_geo_index_of_nearest_cc::HasNeighborFieldInput::hash(), blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput::hash(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::hash(), blender::nodes::node_geo_input_spline_resolution_cc::ResolutionFieldInput::hash(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeCountInput::hash(), blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceCountInput::hash(), blender::nodes::node_geo_mesh_topology_corners_of_face_cc::CornersOfFaceInput::hash(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertCountInput::hash(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput::hash(), blender::nodes::node_geo_mesh_topology_edges_of_corner_cc::CornerNextEdgeFieldInput::hash(), blender::nodes::node_geo_mesh_topology_edges_of_corner_cc::CornerPreviousEdgeFieldInput::hash(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertCountInput::hash(), blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc::EdgesOfVertInput::hash(), blender::nodes::node_geo_mesh_topology_face_of_corner_cc::CornerFaceIndexInput::hash(), blender::nodes::node_geo_mesh_topology_face_of_corner_cc::CornerIndexInFaceInput::hash(), blender::nodes::node_geo_mesh_topology_offset_corner_in_face_cc::OffsetCornerInFaceFieldInput::hash(), blender::nodes::node_geo_mesh_topology_vertex_of_corner_cc::CornerVertFieldInput::hash(), blender::draw::compositor_engine::Instance::init(), blender::draw::edit_select::Instance::init(), blender::image_engine::Instance::init(), blender::workbench::Instance::init(), blender::draw::compositor_engine::Instance::name_get(), blender::draw::edit_select::Instance::name_get(), blender::draw::gpencil::Instance::name_get(), blender::draw::overlay::Instance::name_get(), blender::eevee::Instance::name_get(), blender::image_engine::Instance::name_get(), blender::workbench::Instance::name_get(), blender::draw::gpencil::Instance::~Instance(), blender::io::usd::USDCurvesWriter::~USDCurvesWriter(), and blender::io::usd::USDPointsWriter::~USDPointsWriter().

◆ rot

#define rot ( x,
k )
Value:
(((x) << (k)) | ((x) >> (32 - (k))))

Jenkins Lookup3 Hash Functions. Source: http://burtleburtle.net/bob/c/lookup3.c

Definition at line 18 of file BLI_hash.h.

Function Documentation

◆ BLI_hash_int()

◆ BLI_hash_int_01()

◆ BLI_hash_int_2d()

◆ BLI_hash_int_2d_to_float()

BLI_INLINE float BLI_hash_int_2d_to_float ( uint32_t kx,
uint32_t ky )

Definition at line 77 of file BLI_hash.h.

References BLI_hash_int_2d(), BLI_INLINE, and float.

◆ BLI_hash_int_3d()

BLI_INLINE unsigned int BLI_hash_int_3d ( unsigned int kx,
unsigned int ky,
unsigned int kz )

Definition at line 38 of file BLI_hash.h.

References b, and BLI_INLINE.

Referenced by BLI_hash_int_3d_to_float(), and blender::ed::sculpt_paint::greasepencil::hash_rng().

◆ BLI_hash_int_3d_to_float()

BLI_INLINE float BLI_hash_int_3d_to_float ( uint32_t kx,
uint32_t ky,
uint32_t kz )

Definition at line 82 of file BLI_hash.h.

References BLI_hash_int_3d(), BLI_INLINE, and float.

◆ BLI_hash_pointer_to_color()

BLI_INLINE void BLI_hash_pointer_to_color ( const void * ptr,
int * r,
int * g,
int * b )

Definition at line 97 of file BLI_hash.h.

References b, BLI_hash_int(), BLI_INLINE, hash, and ptr.

Referenced by blender::deg::color_for_pointer().

◆ BLI_hash_string()