Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

58 lignes
1.4 KiB

  1. //
  2. // Lol Engine — Benchmark program
  3. //
  4. // Copyright © 2005—2015 Sam Hocevar <sam@hocevar.net>
  5. //
  6. // This program is free software. It comes without any warranty, to
  7. // the extent permitted by applicable law. You can redistribute it
  8. // and/or modify it under the terms of the Do What the Fuck You Want
  9. // to Public License, Version 2, as published by the WTFPL Task Force.
  10. // See http://www.wtfpl.net/ for more details.
  11. //
  12. #if HAVE_CONFIG_H
  13. # include "config.h"
  14. #endif
  15. #include <cstdio>
  16. #include <lol/engine.h>
  17. using namespace lol;
  18. void bench_real(int mode);
  19. void bench_matrix(int mode);
  20. void bench_half(int mode);
  21. int main(int argc, char **argv)
  22. {
  23. UNUSED(argc, argv);
  24. msg::info("-----------------------\n");
  25. msg::info(" High precision floats\n");
  26. msg::info("-----------------------\n");
  27. bench_real(1);
  28. msg::info("----------------------------\n");
  29. msg::info(" Float matrices [-2.0, 2.0]\n");
  30. msg::info("----------------------------\n");
  31. bench_matrix(1);
  32. msg::info("-------------------------------------\n");
  33. msg::info(" Half precision floats (random bits)\n");
  34. msg::info("-------------------------------------\n");
  35. bench_half(1);
  36. msg::info("-----------------------------------\n");
  37. msg::info(" Half precision floats [-2.0, 2.0]\n");
  38. msg::info("-----------------------------------\n");
  39. bench_half(2);
  40. #if defined _WIN32
  41. getchar();
  42. #endif
  43. return EXIT_SUCCESS;
  44. }