MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / hash52

Function hash52

Source/astcenc_partition_tables.cpp:114–128  ·  view source on GitHub ↗

* @brief Hash function used for procedural partition assignment. * * @param inp The hash seed. * * @return The hashed value. */

Source from the content-addressed store, hash-verified

112 * @return The hashed value.
113 */
114static uint32_t hash52(
115 uint32_t inp
116) {
117 inp ^= inp >> 15;
118
119 // (2^4 + 1) * (2^7 + 1) * (2^17 - 1)
120 inp *= 0xEEDE0891;
121 inp ^= inp >> 5;
122 inp += inp << 16;
123 inp ^= inp >> 7;
124 inp ^= inp >> 3;
125 inp ^= inp << 6;
126 inp ^= inp >> 17;
127 return inp;
128}
129
130/**
131 * @brief Select texel assignment for a single coordinate.

Callers 1

select_partitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected