Changeset 1309 for trunk/test/benchmark/real.cpp
- Timestamp:
- Apr 29, 2012, 10:02:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/benchmark/real.cpp
r1020 r1309 37 37 38 38 real fib1 = 1.0, fib2 = 1.0; 39 timer.Get Ms();39 timer.Get(); 40 40 for (size_t i = 0; i < REAL_TABLE_SIZE; i++) 41 41 { … … 44 44 fib2 = tmp; 45 45 } 46 result[0] += timer.Get Ms();46 result[0] += timer.Get(); 47 47 48 48 real fact = 1.0; 49 timer.Get Ms();49 timer.Get(); 50 50 for (size_t i = 0; i < REAL_TABLE_SIZE; i++) 51 51 fact = fact * real(1.0 + i); 52 result[1] += timer.Get Ms();52 result[1] += timer.Get(); 53 53 54 54 real invfact = 1.0; 55 timer.Get Ms();55 timer.Get(); 56 56 for (size_t i = 0; i < REAL_TABLE_SIZE; i++) 57 57 invfact = invfact / real(1.0 + i); 58 result[2] += timer.Get Ms();58 result[2] += timer.Get(); 59 59 60 timer.Get Ms();60 timer.Get(); 61 61 for (size_t i = 0; i < REAL_TABLE_SIZE / 128; i++) 62 62 sin(real(0.01 * i)); 63 result[3] += timer.Get Ms() * 128;63 result[3] += timer.Get() * 128; 64 64 65 timer.Get Ms();65 timer.Get(); 66 66 for (size_t i = 0; i < REAL_TABLE_SIZE / 128; i++) 67 67 exp((real)(int)(i - REAL_TABLE_SIZE / 256)); 68 result[4] += timer.Get Ms() * 128;68 result[4] += timer.Get() * 128; 69 69 } 70 70 71 71 for (size_t i = 0; i < sizeof(result) / sizeof(*result); i++) 72 result[i] *= 1 000000.0f / (REAL_TABLE_SIZE * REAL_RUNS);72 result[i] *= 1e9f / (REAL_TABLE_SIZE * REAL_RUNS); 73 73 74 74 Log::Info(" ns/elem\n");
Note: See TracChangeset
for help on using the changeset viewer.