| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Native Client Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <stdint.h> | |
| 6 #include <stdio.h> | |
| 7 #include <stdlib.h> | |
| 8 #include <string.h> | |
| 9 #include <unistd.h> | |
| 10 | |
| 11 #include <string> | |
| 12 | |
| 13 // @EXEMPTION[include] | |
| 14 #include "./framework.h" | |
| 15 | |
| 16 | |
| 17 extern "C" { | |
| 18 int main_nbody(int argc, const char* argv[]); | |
| 19 } | |
| 20 | |
| 21 namespace { | |
| 22 | |
| 23 // Wrap NBody in benchmark harness | |
| 24 class BenchmarkNBody : public Benchmark { | |
| 25 public: | |
| 26 virtual int Run() { | |
| 27 const char *args[] = {"nbody", "500000"}; | |
| 28 return main_nbody(2, args); | |
| 29 } | |
| 30 virtual const std::string Name() { return "NBody"; } | |
| 31 virtual const std::string Notes() { return "c #1 version"; } | |
| 32 }; | |
| 33 | |
| 34 } // namespace | |
| 35 | |
| 36 // Register an instance to the list of benchmarks to be run. | |
| 37 RegisterBenchmark<BenchmarkNBody> benchmark_nbody; | |
| OLD | NEW |