File: liboilclass-unstable.xml

package info (click to toggle)
liboil 0.3.15-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,032 kB
  • ctags: 5,929
  • sloc: ansic: 47,058; xml: 12,229; sh: 8,957; perl: 1,095; asm: 1,072; makefile: 748
file content (304 lines) | stat: -rw-r--r-- 15,507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
>
<refentry id="liboil-liboilclass-unstable">
<refmeta>
<refentrytitle role="top_of_page" id="liboil-liboilclass-unstable.top_of_page">OilFunctionClass</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBOIL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>OilFunctionClass</refname>
<refpurpose>Functions for manipulating function classes</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="liboil-liboilclass-unstable.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
                    <link linkend="OilFunctionClass">OilFunctionClass</link>;
#define             <link linkend="OIL-DECLARE-CLASS:CAPS">OIL_DECLARE_CLASS</link>                   (klass)
#define             <link linkend="OIL-DEFINE-CLASS-FULL:CAPS">OIL_DEFINE_CLASS_FULL</link>               (klass, string, test)
#define             <link linkend="OIL-DEFINE-CLASS:CAPS">OIL_DEFINE_CLASS</link>                    (klass, string)
<link linkend="OilFunctionClass">OilFunctionClass</link>*   <link linkend="oil-class-get-by-index">oil_class_get_by_index</link>              (<link linkend="int">int</link> i);
<link linkend="OilFunctionClass">OilFunctionClass</link>*   <link linkend="oil-class-get">oil_class_get</link>                       (const <link linkend="char">char</link> *class_name);
<link linkend="void">void</link>                <link linkend="oil-class-optimize">oil_class_optimize</link>                  (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass);
<link linkend="int">int</link>                 <link linkend="oil-class-get-n-classes">oil_class_get_n_classes</link>             (void);
<link linkend="void">void</link>                <link linkend="oil-class-choose-by-name">oil_class_choose_by_name</link>            (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass,
                                                         const <link linkend="char">char</link> *name);
<link linkend="void">void</link>                <link linkend="oil-class-register-impl-by-name">oil_class_register_impl_by_name</link>     (const <link linkend="char">char</link> *klass_name,
                                                         <link linkend="OilFunctionImpl">OilFunctionImpl</link> *impl);
<link linkend="void">void</link>                <link linkend="oil-class-register-impl">oil_class_register_impl</link>             (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass,
                                                         <link linkend="OilFunctionImpl">OilFunctionImpl</link> *impl);
<link linkend="void">void</link>                <link linkend="oil-class-register-impl-full">oil_class_register_impl_full</link>        (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass,
                                                         <link linkend="void">void</link> (funcvoid) (),
                                                         const <link linkend="char">char</link> *name,
                                                         unsigned <link linkend="int">int</link> flags);
</synopsis>
</refsynopsisdiv>









<refsect1 id="liboil-liboilclass-unstable.description" role="desc">
<title role="desc.title">Description</title>
<para>
<para>
Functions operate on arrays of data.  The arrays can be either source
arrays (input only), destination arrays (output only), or in-place
arrays (both input and output).
</para>
</para>
<para>
<para>
The interpretation of a parameter can usually be determined from its
name.  Parameters for arrays are of the form d1_1xn, where the first
character represents the direction (source, destination, or in-place),
the second represents the index for that particular direction, and
the characters after the underscore indicate the size of the array.
In this case, "1xn" represents an array that is 1 by N.  Note that
the index and the size can both be omitted, giving a default of 1
for the index and 1xn for the size.
</para>
</para>
<para>
<para>
Parameters that represent strides are of the form "d1s".  The
interpretation is similar to above, except that the s indicates
a stride parameter.
</para>
</para>
<para>
<para>
The exceptions to the above rule are "dest", "src", "dstr", "sstr", etc.
These are aliases for "d1", "s1", "d1s", and "s1s", respectively.  This
form is deprecated and will be removed in the 0.4 series.
</para>
</para>
<para>
<para>
Two special parameters are "n" and "m", which determine the size of
the arrays in other parameters.
</para>
</para>
<para>
<para>
Data arrays are laid out such that rows are separated by the number
of bytes given by the corresponding stride.  Elements in each row
are contiguous.  If there is no stride parameter corresponding to an
array, the rows of the array are contiguous.
</para></para>
<para>

</para>
</refsect1>

<refsect1 id="liboil-liboilclass-unstable.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="OilFunctionClass" role="struct">
<title>OilFunctionClass</title>
<indexterm zone="OilFunctionClass"><primary>OilFunctionClass</primary></indexterm><programlisting>typedef struct {
} OilFunctionClass;
</programlisting>
<para>
An opaque structure representing a function class.</para>
<para>

</para></refsect2>
<refsect2 id="OIL-DECLARE-CLASS:CAPS" role="macro">
<title>OIL_DECLARE_CLASS()</title>
<indexterm zone="OIL-DECLARE-CLASS:CAPS"><primary>OIL_DECLARE_CLASS</primary></indexterm><programlisting>#define             OIL_DECLARE_CLASS(klass)</programlisting>
<para>
Declares the Liboil function class <parameter>klass</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> the name of a function class (without the oil_ prefix)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="OIL-DEFINE-CLASS-FULL:CAPS" role="macro">
<title>OIL_DEFINE_CLASS_FULL()</title>
<indexterm zone="OIL-DEFINE-CLASS-FULL:CAPS"><primary>OIL_DEFINE_CLASS_FULL</primary></indexterm><programlisting>#define             OIL_DEFINE_CLASS_FULL(klass, string, test)</programlisting>
<para>
Defines a <link linkend="OilFunctionClass"><type>OilFunctionClass</type></link> structure for <parameter>klass</parameter>.  Classes
defined this way will be automatically at Liboil initialization
time.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> name of class to declare (without oil_ prefix)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> prototype of class
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>test</parameter>&nbsp;:</term>
<listitem><simpara> test function
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="OIL-DEFINE-CLASS:CAPS" role="macro">
<title>OIL_DEFINE_CLASS()</title>
<indexterm zone="OIL-DEFINE-CLASS:CAPS"><primary>OIL_DEFINE_CLASS</primary></indexterm><programlisting>#define             OIL_DEFINE_CLASS(klass, string)</programlisting>
<para>
Defines a <link linkend="OilFunctionClass"><type>OilFunctionClass</type></link> structure for <parameter>klass</parameter>.  Classes
defined this way will be automatically at Liboil initialization
time.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> name of class to declare (without oil_ prefix)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&nbsp;:</term>
<listitem><simpara> prototype of class
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-get-by-index" role="function">
<title>oil_class_get_by_index ()</title>
<indexterm zone="oil-class-get-by-index"><primary>oil_class_get_by_index</primary></indexterm><programlisting><link linkend="OilFunctionClass">OilFunctionClass</link>*   oil_class_get_by_index              (<link linkend="int">int</link> i);</programlisting>
<para>
Returns a pointer to the function class with index <parameter>i</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>i</parameter>&nbsp;:</term>
<listitem><simpara> index
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an <parameter>OilFunctionClass</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-get" role="function">
<title>oil_class_get ()</title>
<indexterm zone="oil-class-get"><primary>oil_class_get</primary></indexterm><programlisting><link linkend="OilFunctionClass">OilFunctionClass</link>*   oil_class_get                       (const <link linkend="char">char</link> *class_name);</programlisting>
<para>
Returns a pointer to the function class that has the given class
name.  If no such class is found, NULL is returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>class_name</parameter>&nbsp;:</term>
<listitem><simpara> the name of the function class
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to a function class
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-optimize" role="function">
<title>oil_class_optimize ()</title>
<indexterm zone="oil-class-optimize"><primary>oil_class_optimize</primary></indexterm><programlisting><link linkend="void">void</link>                oil_class_optimize                  (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass);</programlisting>
<para>
Tests and profiles each implementation for the given function
class.  Testing compares the output of running each implementation
on random input against the reference implementation for the
same input.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> a function class
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-get-n-classes" role="function">
<title>oil_class_get_n_classes ()</title>
<indexterm zone="oil-class-get-n-classes"><primary>oil_class_get_n_classes</primary></indexterm><programlisting><link linkend="int">int</link>                 oil_class_get_n_classes             (void);</programlisting>
<para>
Returns the number of function classes.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of function classes
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-choose-by-name" role="function">
<title>oil_class_choose_by_name ()</title>
<indexterm zone="oil-class-choose-by-name"><primary>oil_class_choose_by_name</primary></indexterm><programlisting><link linkend="void">void</link>                oil_class_choose_by_name            (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass,
                                                         const <link linkend="char">char</link> *name);</programlisting>
<para>
Sets the chosen implementation for the given function class to
the implementation with the given name.  If no implementation
having the given name is found, the chosen implementation is
not changed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> a function class
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the name of an implementation
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-register-impl-by-name" role="function">
<title>oil_class_register_impl_by_name ()</title>
<indexterm zone="oil-class-register-impl-by-name"><primary>oil_class_register_impl_by_name</primary></indexterm><programlisting><link linkend="void">void</link>                oil_class_register_impl_by_name     (const <link linkend="char">char</link> *klass_name,
                                                         <link linkend="OilFunctionImpl">OilFunctionImpl</link> *impl);</programlisting>
<para>
Adds <parameter>impl</parameter> to the list of implementations associated with
the function class given by <parameter>klass_name</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass_name</parameter>&nbsp;:</term>
<listitem><simpara> the name of the class
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>impl</parameter>&nbsp;:</term>
<listitem><simpara> an implementation
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-register-impl" role="function">
<title>oil_class_register_impl ()</title>
<indexterm zone="oil-class-register-impl"><primary>oil_class_register_impl</primary></indexterm><programlisting><link linkend="void">void</link>                oil_class_register_impl             (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass,
                                                         <link linkend="OilFunctionImpl">OilFunctionImpl</link> *impl);</programlisting>
<para>
Adds <parameter>impl</parameter> to the list of implementations associated with
the function class given by <parameter>klass</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> the class
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>impl</parameter>&nbsp;:</term>
<listitem><simpara> an implementation
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oil-class-register-impl-full" role="function">
<title>oil_class_register_impl_full ()</title>
<indexterm zone="oil-class-register-impl-full"><primary>oil_class_register_impl_full</primary></indexterm><programlisting><link linkend="void">void</link>                oil_class_register_impl_full        (<link linkend="OilFunctionClass">OilFunctionClass</link> *klass,
                                                         <link linkend="void">void</link> (funcvoid) (),
                                                         const <link linkend="char">char</link> *name,
                                                         unsigned <link linkend="int">int</link> flags);</programlisting>
<para>
Adds <parameter>func</parameter> to the list of implementations associated with
the function class given by <parameter>klass</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>klass</parameter>&nbsp;:</term>
<listitem><simpara> the class
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara> the function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> name of the function
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara> CPU flags
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>