Changeset 879 for trunk/test/lolbench.cpp
 Timestamp:
 Aug 29, 2011, 7:03:07 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/lolbench.cpp
r877 r879 67 67 timer.GetMs(); 68 68 half::convert(pf, ph, HALF_TABLE_SIZE); 69 result[ 1] += timer.GetMs();69 result[0] += timer.GetMs(); 70 70 71 71 /* Convert half to float (fast) */ … … 73 73 for (size_t i = 0; i < HALF_TABLE_SIZE; i++) 74 74 pf[i] = (float)ph[i]; 75 result[ 0] += timer.GetMs();75 result[1] += timer.GetMs(); 76 76 77 77 /* Convert float to half (array) */ 78 78 timer.GetMs(); 79 79 half::convert(ph, pf, HALF_TABLE_SIZE); 80 result[ 4] += timer.GetMs();80 result[2] += timer.GetMs(); 81 81 82 82 /* Convert float to half (fast) */ … … 84 84 for (size_t i = 0; i < HALF_TABLE_SIZE; i++) 85 85 ph[i] = (half)pf[i]; 86 result[ 2] += timer.GetMs();86 result[3] += timer.GetMs(); 87 87 88 /* Convert float to half ( slow) */88 /* Convert float to half (accurate) */ 89 89 timer.GetMs(); 90 90 for (size_t i = 0; i < HALF_TABLE_SIZE; i++) 91 ph[i] = half::make slow(pf[i]);92 result[ 3] += timer.GetMs();91 ph[i] = half::makeaccurate(pf[i]); 92 result[4] += timer.GetMs(); 93 93 94 94 /* Change sign of every half */ … … 117 117 result[i] *= 1000000.0f / (HALF_TABLE_SIZE * HALF_RUNS); 118 118 119 Log::Info(" ns/elem\n");120 Log::Info("float = half%7.3f\n", result[0]);121 Log::Info("float [] = half[]%7.3f\n", result[1]);122 Log::Info("half = float%7.3f\n", result[2]);123 Log::Info("half = makeslow(float)%7.3f\n", result[3]);124 Log::Info("half [] = float[]%7.3f\n", result[4]);125 Log::Info("half = half %7.3f\n", result[5]);126 Log::Info("float += half %7.3f\n", result[6]);127 Log::Info("half += float %7.3f\n", result[7]);119 Log::Info(" ns/elem\n"); 120 Log::Info("float[] = half[] %7.3f\n", result[0]); 121 Log::Info("float = half %7.3f\n", result[1]); 122 Log::Info("half[] = float[] %7.3f\n", result[2]); 123 Log::Info("half = float (fast) %7.3f\n", result[3]); 124 Log::Info("half = float (accurate) %7.3f\n", result[4]); 125 Log::Info("half = half %7.3f\n", result[5]); 126 Log::Info("float += half %7.3f\n", result[6]); 127 Log::Info("half += float %7.3f\n", result[7]); 128 128 } 129 129
Note: See TracChangeset
for help on using the changeset viewer.