Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
141 Kevin 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
 
10
/* The test function takes a generic pointer as input */
11
typedef void (*test_funct)(void *);
12
 
13
/* Compute number of cycles used by test function f */
14
double fcyc(test_funct f, void* argp);
15
 
16
/*********************************************************
17
 * Set the various parameters used by measurement routines 
18
 *********************************************************/
19
 
20
/* 
21
 * set_fcyc_clear_cache - When set, will run code to clear cache 
22
 *     before each measurement. 
23
 *     Default = 0
24
 */
25
void set_fcyc_clear_cache(int clear);
26
 
27
/* 
28
 * set_fcyc_cache_size - Set size of cache to use when clearing cache 
29
 *     Default = 1<<19 (512KB)
30
 */
31
void set_fcyc_cache_size(int bytes);
32
 
33
/* 
34
 * set_fcyc_cache_block - Set size of cache block 
35
 *     Default = 32
36
 */
37
void set_fcyc_cache_block(int bytes);
38
 
39
/* 
40
 * set_fcyc_compensate- When set, will attempt to compensate for 
41
 *     timer interrupt overhead 
42
 *     Default = 0
43
 */
44
void set_fcyc_compensate(int compensate_arg);
45
 
46
/* 
47
 * set_fcyc_k - Value of K in K-best measurement scheme
48
 *     Default = 3
49
 */
50
void set_fcyc_k(int k);
51
 
52
/* 
53
 * set_fcyc_maxsamples - Maximum number of samples attempting to find 
54
 *     K-best within some tolerance.
55
 *     When exceeded, just return best sample found.
56
 *     Default = 20
57
 */
58
void set_fcyc_maxsamples(int maxsamples_arg);
59
 
60
/* 
61
 * set_fcyc_epsilon - Tolerance required for K-best
62
 *     Default = 0.01
63
 */
64
void set_fcyc_epsilon(double epsilon_arg);
65
 
66
 
67
 
68