Git init
[external/liboil.git] / doc / html / liboil-liboilprofile.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>OilProfile</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7 <link rel="home" href="index.html" title="Liboil Reference Manual">
8 <link rel="up" href="ch02.html" title="Liboil Unstable API">
9 <link rel="prev" href="liboil-liboilparameter.html" title="OilParameter">
10 <link rel="next" href="liboil-liboilprototype.html" title="OilPrototype">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="ch01.html" title="Liboil Stable API">
14 <link rel="chapter" href="ch02.html" title="Liboil Unstable API">
15 </head>
16 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
17 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
18 <tr valign="middle">
19 <td><a accesskey="p" href="liboil-liboilparameter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
20 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
22 <th width="100%" align="center">Liboil Reference Manual</th>
23 <td><a accesskey="n" href="liboil-liboilprototype.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24 </tr>
25 <tr><td colspan="5" class="shortcuts">
26 <a href="#liboil-liboilprofile.synopsis" class="shortcut">Top</a>
27                  | 
28                 <a href="#liboil-liboilprofile.description" class="shortcut">Description</a>
29 </td></tr>
30 </table>
31 <div class="refentry" title="OilProfile">
32 <a name="liboil-liboilprofile"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="liboil-liboilprofile.top_of_page"></a>OilProfile</span></h2>
36 <p>OilProfile — Measuring the length of time needed to execute Liboil functions.</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv" title="Synopsis">
41 <a name="liboil-liboilprofile.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">
43                     <a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a>;
44 #define             <a class="link" href="liboil-liboilprofile.html#OIL-PROFILE-HIST-LENGTH--CAPS" title="OIL_PROFILE_HIST_LENGTH">OIL_PROFILE_HIST_LENGTH</a>
45 unsigned long       <a class="link" href="liboil-liboilprofile.html#oil-profile-stamp" title="oil_profile_stamp ()">oil_profile_stamp</a>                   (void);
46 void                <a class="link" href="liboil-liboilprofile.html#oil-profile-init" title="oil_profile_init ()">oil_profile_init</a>                    (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);
47 void                <a class="link" href="liboil-liboilprofile.html#oil-profile-stop-handle" title="oil_profile_stop_handle ()">oil_profile_stop_handle</a>             (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);
48 void                <a class="link" href="liboil-liboilprofile.html#oil-profile-get-ave-std" title="oil_profile_get_ave_std ()">oil_profile_get_ave_std</a>             (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof,
49                                                          double *ave_p,
50                                                          double *std_p);
51 #define             <a class="link" href="liboil-liboilprofile.html#oil-profile-start" title="oil_profile_start()">oil_profile_start</a>                   (x)
52 #define             <a class="link" href="liboil-liboilprofile.html#oil-profile-stop" title="oil_profile_stop()">oil_profile_stop</a>                    (x)
53 </pre>
54 </div>
55 <div class="refsect1" title="Description">
56 <a name="liboil-liboilprofile.description"></a><h2>Description</h2>
57 <p>
58 </p>
59 <p>
60 </p>
61 </div>
62 <div class="refsect1" title="Details">
63 <a name="liboil-liboilprofile.details"></a><h2>Details</h2>
64 <div class="refsect2" title="OilProfile">
65 <a name="OilProfile"></a><h3>OilProfile</h3>
66 <pre class="programlisting">typedef struct {
67 } OilProfile;
68 </pre>
69 <p>
70 An opaque structure representing profiling information.</p>
71 <p>
72 </p>
73 </div>
74 <hr>
75 <div class="refsect2" title="OIL_PROFILE_HIST_LENGTH">
76 <a name="OIL-PROFILE-HIST-LENGTH--CAPS"></a><h3>OIL_PROFILE_HIST_LENGTH</h3>
77 <pre class="programlisting">#define OIL_PROFILE_HIST_LENGTH 10
78 </pre>
79 <p>
80 Internal definition of the number of histogram entries in <a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile"><span class="type">OilProfile</span></a>.</p>
81 <p>
82 </p>
83 </div>
84 <hr>
85 <div class="refsect2" title="oil_profile_stamp ()">
86 <a name="oil-profile-stamp"></a><h3>oil_profile_stamp ()</h3>
87 <pre class="programlisting">unsigned long       oil_profile_stamp                   (void);</pre>
88 <p>
89 Creates a timestamp based on a CPU-specific high-frequency
90 counter, if available.</p>
91 <p>
92 </p>
93 <div class="variablelist"><table border="0">
94 <col align="left" valign="top">
95 <tbody><tr>
96 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
97 <td> a timestamp
98 </td>
99 </tr></tbody>
100 </table></div>
101 </div>
102 <hr>
103 <div class="refsect2" title="oil_profile_init ()">
104 <a name="oil-profile-init"></a><h3>oil_profile_init ()</h3>
105 <pre class="programlisting">void                oil_profile_init                    (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);</pre>
106 <p>
107 Initializes a profiling structure.</p>
108 <p>
109 </p>
110 <div class="variablelist"><table border="0">
111 <col align="left" valign="top">
112 <tbody><tr>
113 <td><p><span class="term"><em class="parameter"><code>prof</code></em> :</span></p></td>
114 <td> the OilProfile structure
115 </td>
116 </tr></tbody>
117 </table></div>
118 </div>
119 <hr>
120 <div class="refsect2" title="oil_profile_stop_handle ()">
121 <a name="oil-profile-stop-handle"></a><h3>oil_profile_stop_handle ()</h3>
122 <pre class="programlisting">void                oil_profile_stop_handle             (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof);</pre>
123 <p>
124 Handles post-processing of a single profiling run.
125 </p>
126 <p>
127 FIXME: need more info</p>
128 <p>
129 </p>
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
132 <tbody><tr>
133 <td><p><span class="term"><em class="parameter"><code>prof</code></em> :</span></p></td>
134 <td> the OilProfile structure
135 </td>
136 </tr></tbody>
137 </table></div>
138 </div>
139 <hr>
140 <div class="refsect2" title="oil_profile_get_ave_std ()">
141 <a name="oil-profile-get-ave-std"></a><h3>oil_profile_get_ave_std ()</h3>
142 <pre class="programlisting">void                oil_profile_get_ave_std             (<a class="link" href="liboil-liboilprofile.html#OilProfile" title="OilProfile">OilProfile</a> *prof,
143                                                          double *ave_p,
144                                                          double *std_p);</pre>
145 <p>
146 Calculates the average and standard deviation of a number of
147 profiling runs, and places the results in the locations
148 provided by <em class="parameter"><code>ave_p</code></em> and <em class="parameter"><code>std_p</code></em>.  Either <em class="parameter"><code>ave_p</code></em> and <em class="parameter"><code>std_p</code></em> may
149 be NULL, in which case the values will not be written.</p>
150 <p>
151 </p>
152 <div class="variablelist"><table border="0">
153 <col align="left" valign="top">
154 <tbody>
155 <tr>
156 <td><p><span class="term"><em class="parameter"><code>prof</code></em> :</span></p></td>
157 <td> the OilProfile structure
158 </td>
159 </tr>
160 <tr>
161 <td><p><span class="term"><em class="parameter"><code>ave_p</code></em> :</span></p></td>
162 <td> pointer to average
163 </td>
164 </tr>
165 <tr>
166 <td><p><span class="term"><em class="parameter"><code>std_p</code></em> :</span></p></td>
167 <td> pointer to standard deviation
168 </td>
169 </tr>
170 </tbody>
171 </table></div>
172 </div>
173 <hr>
174 <div class="refsect2" title="oil_profile_start()">
175 <a name="oil-profile-start"></a><h3>oil_profile_start()</h3>
176 <pre class="programlisting">#define             oil_profile_start(x)</pre>
177 <p>
178 Starts a profiling run by obtaining a timestamp via <a class="link" href="liboil-liboilprofile.html#oil-profile-stamp" title="oil_profile_stamp ()"><code class="function">oil_profile_stamp()</code></a>
179 and writing it into <em class="parameter"><code>x</code></em>.</p>
180 <p>
181 </p>
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
184 <tbody><tr>
185 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
186 <td> a pointer to an OilProfile structure
187 </td>
188 </tr></tbody>
189 </table></div>
190 </div>
191 <hr>
192 <div class="refsect2" title="oil_profile_stop()">
193 <a name="oil-profile-stop"></a><h3>oil_profile_stop()</h3>
194 <pre class="programlisting">#define             oil_profile_stop(x)</pre>
195 <p>
196 Stops a profiling run by obtaining a timestamp via <a class="link" href="liboil-liboilprofile.html#oil-profile-stamp" title="oil_profile_stamp ()"><code class="function">oil_profile_stamp()</code></a>
197 and writing it into <em class="parameter"><code>x</code></em>.  It then calls <a class="link" href="liboil-liboilprofile.html#oil-profile-stop-handle" title="oil_profile_stop_handle ()"><code class="function">oil_profile_stop_handle()</code></a> to
198 handle post-processing of the profiling run.</p>
199 <p>
200 </p>
201 <div class="variablelist"><table border="0">
202 <col align="left" valign="top">
203 <tbody><tr>
204 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
205 <td> a pointer to an OilProfile structure
206 </td>
207 </tr></tbody>
208 </table></div>
209 </div>
210 </div>
211 </div>
212 <div class="footer">
213 <hr>
214           Generated by GTK-Doc V1.11</div>
215 </body>
216 </html>