Blender  V3.3
Macros | Functions
hash.h File Reference
#include "util/types.h"

Go to the source code of this file.

Macros

#define rot(x, k)   (((x) << (k)) | ((x) >> (32 - (k))))
 
#define mix(a, b, c)
 
#define final(a, b, c)
 

Functions

ccl_device_inline uint hash_uint (uint kx)
 
ccl_device_inline uint hash_uint2 (uint kx, uint ky)
 
ccl_device_inline uint hash_uint3 (uint kx, uint ky, uint kz)
 
ccl_device_inline uint hash_uint4 (uint kx, uint ky, uint kz, uint kw)
 
ccl_device_inline float hash_uint_to_float (uint kx)
 
ccl_device_inline float hash_uint2_to_float (uint kx, uint ky)
 
ccl_device_inline float hash_uint3_to_float (uint kx, uint ky, uint kz)
 
ccl_device_inline float hash_uint4_to_float (uint kx, uint ky, uint kz, uint kw)
 
ccl_device_inline float hash_float_to_float (float k)
 
ccl_device_inline float hash_float2_to_float (float2 k)
 
ccl_device_inline float hash_float3_to_float (float3 k)
 
ccl_device_inline float hash_float4_to_float (float4 k)
 
ccl_device_inline float2 hash_float2_to_float2 (float2 k)
 
ccl_device_inline float3 hash_float3_to_float3 (float3 k)
 
ccl_device_inline float4 hash_float4_to_float4 (float4 k)
 
ccl_device_inline float3 hash_float_to_float3 (float k)
 
ccl_device_inline float3 hash_float2_to_float3 (float2 k)
 
ccl_device_inline float3 hash_float4_to_float3 (float4 k)
 
static uint hash_string (const char *str)
 

Macro Definition Documentation

◆ final

#define final (   a,
  b,
 
)
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)
SyclQueue void void size_t num_bytes void
#define rot(x, k)
Definition: hash.h:15
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)

Definition at line 40 of file hash.h.

◆ mix

#define mix (   a,
  b,
 
)
Value:
{ \
a -= c; \
a ^= rot(c, 4); \
c += b; \
b -= a; \
b ^= rot(a, 6); \
a += c; \
c -= b; \
c ^= rot(b, 8); \
b += a; \
a -= c; \
a ^= rot(c, 16); \
c += b; \
b -= a; \
b ^= rot(a, 19); \
a += c; \
c -= b; \
c ^= rot(b, 4); \
b += a; \
} \
((void)0)

Definition at line 17 of file hash.h.

◆ rot

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

Definition at line 15 of file hash.h.

Function Documentation

◆ hash_float2_to_float()

ccl_device_inline float hash_float2_to_float ( float2  k)

◆ hash_float2_to_float2()

ccl_device_inline float2 hash_float2_to_float2 ( float2  k)

◆ hash_float2_to_float3()

ccl_device_inline float3 hash_float2_to_float3 ( float2  k)

◆ hash_float3_to_float()

ccl_device_inline float hash_float3_to_float ( float3  k)

◆ hash_float3_to_float3()

ccl_device_inline float3 hash_float3_to_float3 ( float3  k)

◆ hash_float4_to_float()

ccl_device_inline float hash_float4_to_float ( float4  k)

◆ hash_float4_to_float3()

ccl_device_inline float3 hash_float4_to_float3 ( float4  k)

◆ hash_float4_to_float4()

ccl_device_inline float4 hash_float4_to_float4 ( float4  k)

◆ hash_float_to_float()

ccl_device_inline float hash_float_to_float ( float  k)

Definition at line 139 of file hash.h.

References __float_as_uint(), and hash_uint_to_float().

Referenced by hash_float_to_float3().

◆ hash_float_to_float3()

ccl_device_inline float3 hash_float_to_float3 ( float  k)

◆ hash_string()

static uint hash_string ( const char *  str)
inlinestatic

Definition at line 363 of file hash.h.

References Freestyle::c, and str.

Referenced by LightManager::add_ies(), and GeometryManager::create_volume_mesh().

◆ hash_uint()

ccl_device_inline uint hash_uint ( uint  kx)

Definition at line 59 of file hash.h.

References Freestyle::a, usdtokens::b(), and Freestyle::c.

Referenced by hash_uint_to_float(), integrator_init_from_bake(), and perlin_1d().

◆ hash_uint2()

ccl_device_inline uint hash_uint2 ( uint  kx,
uint  ky 
)

◆ hash_uint2_to_float()

ccl_device_inline float hash_uint2_to_float ( uint  kx,
uint  ky 
)

◆ hash_uint3()

ccl_device_inline uint hash_uint3 ( uint  kx,
uint  ky,
uint  kz 
)

Definition at line 82 of file hash.h.

References Freestyle::a, usdtokens::b(), and Freestyle::c.

Referenced by hash_uint3_to_float(), and perlin_3d().

◆ hash_uint3_to_float()

ccl_device_inline float hash_uint3_to_float ( uint  kx,
uint  ky,
uint  kz 
)

Definition at line 127 of file hash.h.

References float(), and hash_uint3().

Referenced by hash_float3_to_float().

◆ hash_uint4()

ccl_device_inline uint hash_uint4 ( uint  kx,
uint  ky,
uint  kz,
uint  kw 
)

Definition at line 95 of file hash.h.

References Freestyle::a, usdtokens::b(), Freestyle::c, and mix.

Referenced by hash_uint4_to_float(), and perlin_4d().

◆ hash_uint4_to_float()

ccl_device_inline float hash_uint4_to_float ( uint  kx,
uint  ky,
uint  kz,
uint  kw 
)

Definition at line 132 of file hash.h.

References float(), and hash_uint4().

Referenced by hash_float4_to_float().

◆ hash_uint_to_float()

ccl_device_inline float hash_uint_to_float ( uint  kx)