Changeset 1309 for trunk/test/benchmark/trig.cpp
 Timestamp:
 Apr 29, 2012, 10:02:20 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/benchmark/trig.cpp
r1189 r1309 65 65 66 66 /* Sin */ 67 timer.Get Ms();67 timer.Get(); 68 68 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 69 69 #if defined __GNUC__ && !defined __SNC__ … … 72 72 pf2[i] = sinf(pf[i]); 73 73 #endif 74 result[0] += timer.Get Ms();74 result[0] += timer.Get(); 75 75 76 76 /* Fast sin */ 77 timer.Get Ms();77 timer.Get(); 78 78 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 79 79 #if defined HAVE_FASTMATH_H && !defined __native_client__ … … 82 82 pf2[i] = sinf(pf[i]); 83 83 #endif 84 result[1] += timer.Get Ms();84 result[1] += timer.Get(); 85 85 86 86 /* Lol sin */ 87 timer.Get Ms();87 timer.Get(); 88 88 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 89 89 pf2[i] = lol_sin(pf[i]); 90 result[2] += timer.Get Ms();90 result[2] += timer.Get(); 91 91 92 92 /* Cos */ 93 timer.Get Ms();93 timer.Get(); 94 94 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 95 95 #if defined __GNUC__ && !defined __SNC__ … … 98 98 pf2[i] = cosf(pf[i]); 99 99 #endif 100 result[3] += timer.Get Ms();100 result[3] += timer.Get(); 101 101 102 102 /* Fast cos */ 103 timer.Get Ms();103 timer.Get(); 104 104 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 105 105 #if defined HAVE_FASTMATH_H && !defined __native_client__ … … 108 108 pf2[i] = cosf(pf[i]); 109 109 #endif 110 result[4] += timer.Get Ms();110 result[4] += timer.Get(); 111 111 112 112 /* Lol cos */ 113 timer.Get Ms();113 timer.Get(); 114 114 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 115 115 pf2[i] = lol_cos(pf[i]); 116 result[5] += timer.Get Ms();116 result[5] += timer.Get(); 117 117 118 118 /* Sin & cos */ 119 timer.Get Ms();119 timer.Get(); 120 120 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 121 121 { … … 128 128 #endif 129 129 } 130 result[6] += timer.Get Ms();130 result[6] += timer.Get(); 131 131 132 132 /* Fast sin & cos */ 133 timer.Get Ms();133 timer.Get(); 134 134 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 135 135 { … … 142 142 #endif 143 143 } 144 result[7] += timer.Get Ms();144 result[7] += timer.Get(); 145 145 146 146 /* Lol sincos */ 147 timer.Get Ms();147 timer.Get(); 148 148 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 149 149 lol_sincos(pf[i], &pf2[i], &pf3[i]); 150 result[8] += timer.Get Ms();150 result[8] += timer.Get(); 151 151 152 152 /* Tan */ 153 timer.Get Ms();153 timer.Get(); 154 154 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 155 155 #if defined __GNUC__ && !defined __SNC__ … … 158 158 pf2[i] = tanf(pf[i]); 159 159 #endif 160 result[9] += timer.Get Ms();160 result[9] += timer.Get(); 161 161 162 162 /* Fast tan */ 163 timer.Get Ms();163 timer.Get(); 164 164 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 165 165 #if defined HAVE_FASTMATH_H && !defined __native_client__ … … 168 168 pf2[i] = tanf(pf[i]); 169 169 #endif 170 result[10] += timer.Get Ms();170 result[10] += timer.Get(); 171 171 172 172 /* Lol tan */ 173 timer.Get Ms();173 timer.Get(); 174 174 for (size_t i = 0; i < TRIG_TABLE_SIZE; i++) 175 175 pf2[i] = lol_tan(pf[i]); 176 result[11] += timer.Get Ms();176 result[11] += timer.Get(); 177 177 } 178 178 … … 182 182 183 183 for (size_t i = 0; i < sizeof(result) / sizeof(*result); i++) 184 result[i] *= 1 000000.0f / (TRIG_TABLE_SIZE * TRIG_RUNS);184 result[i] *= 1e9f / (TRIG_TABLE_SIZE * TRIG_RUNS); 185 185 186 186 Log::Info(" ns/elem\n");
Note: See TracChangeset
for help on using the changeset viewer.