MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / SetFloatData

Function SetFloatData

cmp_unittests/codecbuffer_tests.cpp:48–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46static double* g_doubleData = 0;
47
48static void SetFloatData(bool isSigned = false)
49{
50 float maxValue = isSigned ? 127.0f : 255.0f;
51
52 for (uint i = 0; i < g_dataLength; ++i)
53 {
54 float value = i / maxValue;
55
56 g_halfData[i] = (CMP_HALF)value;
57 g_floatData[i] = value;
58 g_doubleData[i] = (double)value;
59 }
60}
61
62static void GenerateTestData(unsigned int numValues = 128, bool isSigned = false)
63{

Callers 1

GenerateTestDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected