// Hash function for GLSLstd450 // // This file was thoughtfully generated by a machine, // don't even think about modifying it yourself! // #include "../core/slang-common.h" #include "../core/slang-string.h" #include "spirv/unified1/GLSL.std.450.h" namespace Slang { static const unsigned tableSalt[81] ={ 1, 1, 1, 1, 4, 0, 1, 0, 10, 0, 3, 0, 0, 13, 4, 1, 5, 1, 5, 4, 0, 0, 0, 1, 0, 9, 1, 0, 0, 1, 1, 8, 2, 0, 0, 2, 0, 1, 0, 0, 2, 1, 1, 0, 0, 0, 0, 1, 4, 3, 9, 0, 26, 0, 0, 2, 0, 2, 8, 0, 0, 17, 20, 5, 0, 0, 0, 5, 4, 9, 4, 23, 0, 1, 7, 0, 24, 43, 10, 41, 6 }; struct KV { const char* name; GLSLstd450 value; }; static const KV words[81] = { {"FindSMsb", GLSLstd450FindSMsb}, {"SClamp", GLSLstd450SClamp}, {"UnpackHalf2x16", GLSLstd450UnpackHalf2x16}, {"Normalize", GLSLstd450Normalize}, {"Pow", GLSLstd450Pow}, {"Ceil", GLSLstd450Ceil}, {"PackUnorm4x8", GLSLstd450PackUnorm4x8}, {"Cosh", GLSLstd450Cosh}, {"Frexp", GLSLstd450Frexp}, {"PackUnorm2x16", GLSLstd450PackUnorm2x16}, {"Atan2", GLSLstd450Atan2}, {"Exp", GLSLstd450Exp}, {"Ldexp", GLSLstd450Ldexp}, {"NClamp", GLSLstd450NClamp}, {"PackHalf2x16", GLSLstd450PackHalf2x16}, {"Trunc", GLSLstd450Trunc}, {"UMin", GLSLstd450UMin}, {"FClamp", GLSLstd450FClamp}, {"SMin", GLSLstd450SMin}, {"IMix", GLSLstd450IMix}, {"FindUMsb", GLSLstd450FindUMsb}, {"Cos", GLSLstd450Cos}, {"UnpackUnorm4x8", GLSLstd450UnpackUnorm4x8}, {"Fma", GLSLstd450Fma}, {"RoundEven", GLSLstd450RoundEven}, {"Log", GLSLstd450Log}, {"Refract", GLSLstd450Refract}, {"Distance", GLSLstd450Distance}, {"UMax", GLSLstd450UMax}, {"ModfStruct", GLSLstd450ModfStruct}, {"PackSnorm4x8", GLSLstd450PackSnorm4x8}, {"Determinant", GLSLstd450Determinant}, {"SmoothStep", GLSLstd450SmoothStep}, {"Reflect", GLSLstd450Reflect}, {"Fract", GLSLstd450Fract}, {"Asin", GLSLstd450Asin}, {"Tanh", GLSLstd450Tanh}, {"Degrees", GLSLstd450Degrees}, {"Sqrt", GLSLstd450Sqrt}, {"MatrixInverse", GLSLstd450MatrixInverse}, {"Exp2", GLSLstd450Exp2}, {"Cross", GLSLstd450Cross}, {"FindILsb", GLSLstd450FindILsb}, {"FMax", GLSLstd450FMax}, {"NMin", GLSLstd450NMin}, {"SMax", GLSLstd450SMax}, {"InverseSqrt", GLSLstd450InverseSqrt}, {"Length", GLSLstd450Length}, {"SAbs", GLSLstd450SAbs}, {"UClamp", GLSLstd450UClamp}, {"FMix", GLSLstd450FMix}, {"FaceForward", GLSLstd450FaceForward}, {"Tan", GLSLstd450Tan}, {"Modf", GLSLstd450Modf}, {"PackSnorm2x16", GLSLstd450PackSnorm2x16}, {"Round", GLSLstd450Round}, {"UnpackUnorm2x16", GLSLstd450UnpackUnorm2x16}, {"Atan", GLSLstd450Atan}, {"FSign", GLSLstd450FSign}, {"Sin", GLSLstd450Sin}, {"UnpackSnorm2x16", GLSLstd450UnpackSnorm2x16}, {"Radians", GLSLstd450Radians}, {"PackDouble2x32", GLSLstd450PackDouble2x32}, {"Sinh", GLSLstd450Sinh}, {"UnpackSnorm4x8", GLSLstd450UnpackSnorm4x8}, {"InterpolateAtCentroid", GLSLstd450InterpolateAtCentroid}, {"NMax", GLSLstd450NMax}, {"Acosh", GLSLstd450Acosh}, {"Acos", GLSLstd450Acos}, {"UnpackDouble2x32", GLSLstd450UnpackDouble2x32}, {"FrexpStruct", GLSLstd450FrexpStruct}, {"Atanh", GLSLstd450Atanh}, {"Floor", GLSLstd450Floor}, {"Asinh", GLSLstd450Asinh}, {"InterpolateAtOffset", GLSLstd450InterpolateAtOffset}, {"Step", GLSLstd450Step}, {"FAbs", GLSLstd450FAbs}, {"InterpolateAtSample", GLSLstd450InterpolateAtSample}, {"Log2", GLSLstd450Log2}, {"SSign", GLSLstd450SSign}, {"FMin", GLSLstd450FMin}, }; static UInt32 hash(const UnownedStringSlice& str, UInt32 salt) { UInt64 h = salt; for(const char c : str) h = ((h * 0x00000100000001B3) ^ c); return h % (sizeof(tableSalt)/sizeof(tableSalt[0])); } bool lookupGLSLstd450(const UnownedStringSlice& str, GLSLstd450& value) { const auto i = hash(str, tableSalt[hash(str, 0)]); if(str == words[i].name) { value = words[i].value; return true; } else { return false; } } }