OSDN Git Service

util: Make half float lookup tables constant.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 4 Apr 2010 19:43:52 +0000 (20:43 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 6 Apr 2010 14:38:21 +0000 (15:38 +0100)
src/gallium/auxiliary/util/u_half.h
src/gallium/auxiliary/util/u_half.py

index a28b1fd..bc41c65 100644 (file)
@@ -8,11 +8,11 @@
 extern "C" {
 #endif
 
-extern uint32_t util_half_to_float_mantissa_table[2048];
-extern uint32_t util_half_to_float_exponent_table[64];
-extern uint32_t util_half_to_float_offset_table[64];
-extern uint16_t util_float_to_half_base_table[512];
-extern uint8_t util_float_to_half_shift_table[512];
+extern const uint32_t util_half_to_float_mantissa_table[2048];
+extern const uint32_t util_half_to_float_exponent_table[64];
+extern const uint32_t util_half_to_float_offset_table[64];
+extern const uint16_t util_float_to_half_base_table[512];
+extern const uint8_t util_float_to_half_shift_table[512];
 
 /*
  * Note that if the half float is a signaling NaN, the x87 FPU will turn
index a92f758..8007482 100644 (file)
@@ -56,7 +56,7 @@ def begin(t, n, l):
        table_index = 0
        table_length = l
        print
-       print t + " " + n + "[" + str(l) + "] = {"
+       print "const " + t + " " + n + "[" + str(l) + "] = {"
 
 def value(v):
        global table_index