2
0

PerfTests.cpp 591 B

1234567891011121314151617181920212223242526272829303132
  1. #include "Common.h"
  2. /*int main(int, char** argv)
  3. {
  4. int i, n = atoi(argv[1]);
  5. N_Body_System system;
  6. printf("%.9f\n", system.energy());
  7. for (i = 0; i < n; ++i)
  8. system.advance(0.01);
  9. printf("%.9f\n", system.energy());
  10. return 0;
  11. }*/
  12. void NBody(int n);
  13. void FastaRedux(int n);
  14. void FannkuchRedux(int max_n);
  15. USING_NS_BF;
  16. BF_EXPORT void BF_CALLTYPE BFApp_RunPerfTest(const char* testName, int arg)
  17. {
  18. if (strcmp(testName, "nbody") == 0)
  19. NBody(arg);
  20. if (strcmp(testName, "fastaredux") == 0)
  21. FastaRedux(arg);
  22. if (strcmp(testName, "fannkuchredux") == 0)
  23. FannkuchRedux(arg);
  24. }