1vpGetTimer(3) Library Functions Manual vpGetTimer(3)
2
3
4
6 vpGetTimer, vpClearTimer - interval timer facility
7
9 #include <volpack.h>
10
11 vpResult
12 vpGetTimer(vpc, option, iptr)
13 vpContext *vpc;
14 int option;
15 int *iptr;;
16
17 vpResult
18 vpClearTimer(vpc, option)
19 vpContext *vpc;
20 int option;
21
23 vpc VolPack context from vpCreateContext.
24
25 option Constant that specifies a particular timer.
26
27 iptr Location for storing the timer value.
28
30 These functions are used for measuring the performance of the VolPack
31 library. To use them, the library must be compiled with a special
32 flag: either -DHAVE_LORES_TIMER (for machine that support the gettime‐
33 ofday C library call) or -DHAVE_HIRES_TIMER (for SGI machines that sup‐
34 port high-resolution memory-mapped I/O timers; on a Challenge or ONYX,
35 the -DHAVE_64BIT_TIMER must also be specified). If one of these flags
36 is specified at compile time then VolPack maintains a table recording
37 the accumulated time spent in various operations. Note that some of
38 the operations can only be timed with a high-resolution timer; time
39 values will not be recorded and will appear to be zero if a low resolu‐
40 tion timer is specified at compile time.
41
42 vpGetTimer retrieves the accumulated time for a particular operation.
43 The option argument specifies which operation:
44
45 VPTIMER_SHADE
46 Time the routine that computes the contents of the shading
47 lookup table.
48
49 VPTIMER_RENDER
50 Time the routine that renders a volume (includes VPTI‐
51 MER_CLSFY_OCTREE, VPTIMER_COMPOSITE, VPTIMER_DEPTHCUE, and VPTI‐
52 MER_WARP).
53
54 VPTIMER_COMPOSITE
55 Time the routine that computes the intermediate image from the
56 volume (includes VPTIMER_CLEAR, VPTIMER_TRAVERSE_OCTREE, VPTI‐
57 MER_ERT, VPTIMER_TRAVERSE_RUNS, and VPTIMER_PROCESS_VOXELS).
58
59 VPTIMER_DEPTHCUE
60 Time the routine that performs the depth cueing fixup on the
61 intermediate image.
62
63 VPTIMER_WARP
64 Time the routine that warps the intermediate image into the
65 final image.
66
67 VPTIMER_TRAVERSE_RUNS
68 Time the portion of the compositing routine devoted to travers‐
69 ing the volume data structures.
70
71 VPTIMER_PROCESS_VOXELS
72 Time the portion of the compositing routine devoted to composit‐
73 ing voxels into the intermediate image.
74
75 VPTIMER_ERT
76 Time the early-ray termination checks during compositing.
77
78 VPTIMER_CLSFY_OCTREE
79 Time the octree classification stage.
80
81 VPTIMER_TRAVERSE_OCTREE
82 Time the portion of the compositing routine devoted to travers‐
83 ing the octree.
84
85 VPTIMER_CLEAR
86 Time the routine that clears the intermediate image at the
87 beginning of compositing.
88
89 The routine stores the accumulated time since the last call to
90 vpClearTimer (or since the beginning of the program) in the location
91 specified by iptr. The units of the value are microseconds.
92
93 vpClearTimer sets the specified timer value back to zero.
94
96 The normal return value is VP_OK. The following error return value is
97 possible:
98
99 VPERROR_BAD_OPTION
100 The option argument is invalid.
101
103 VolPack(3), vpCreateContext(3)
104
105
106
107VolPack vpGetTimer(3)