You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.7 KiB

  1. /*
  2. * fcyc.h - prototypes for the routines in fcyc.c that estimate the
  3. * time in CPU cycles used by a test function f
  4. *
  5. * Copyright (c) 2002, R. Bryant and D. O'Hallaron, All rights reserved.
  6. * May not be used, modified, or copied without permission.
  7. *
  8. */
  9. /* The test function takes a generic pointer as input */
  10. typedef void (*test_funct)(void *);
  11. /* Compute number of cycles used by test function f */
  12. double fcyc(test_funct f, void* argp);
  13. /*********************************************************
  14. * Set the various parameters used by measurement routines
  15. *********************************************************/
  16. /*
  17. * set_fcyc_clear_cache - When set, will run code to clear cache
  18. * before each measurement.
  19. * Default = 0
  20. */
  21. void set_fcyc_clear_cache(int clear);
  22. /*
  23. * set_fcyc_cache_size - Set size of cache to use when clearing cache
  24. * Default = 1<<19 (512KB)
  25. */
  26. void set_fcyc_cache_size(int bytes);
  27. /*
  28. * set_fcyc_cache_block - Set size of cache block
  29. * Default = 32
  30. */
  31. void set_fcyc_cache_block(int bytes);
  32. /*
  33. * set_fcyc_compensate- When set, will attempt to compensate for
  34. * timer interrupt overhead
  35. * Default = 0
  36. */
  37. void set_fcyc_compensate(int compensate_arg);
  38. /*
  39. * set_fcyc_k - Value of K in K-best measurement scheme
  40. * Default = 3
  41. */
  42. void set_fcyc_k(int k);
  43. /*
  44. * set_fcyc_maxsamples - Maximum number of samples attempting to find
  45. * K-best within some tolerance.
  46. * When exceeded, just return best sample found.
  47. * Default = 20
  48. */
  49. void set_fcyc_maxsamples(int maxsamples_arg);
  50. /*
  51. * set_fcyc_epsilon - Tolerance required for K-best
  52. * Default = 0.01
  53. */
  54. void set_fcyc_epsilon(double epsilon_arg);