1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
---|
2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
---|
3 | <compounddef id="blas__test_8m" kind="file"> |
---|
4 | <compoundname>blas_test.m</compoundname> |
---|
5 | <sectiondef kind="var"> |
---|
6 | <memberdef kind="variable" id="blas__test_8m_12130b3fad43c13477bb8661bb22f90aa" prot="public" static="no" mutable="no"> |
---|
7 | <type>function test</type> |
---|
8 | <definition>vn</definition> |
---|
9 | <argsstring></argsstring> |
---|
10 | <name>vn</name> |
---|
11 | <initializer> [5,50,200,500] |
---|
12 | if 0 |
---|
13 | et =zeros(1,4)</initializer> |
---|
14 | <briefdescription> |
---|
15 | </briefdescription> |
---|
16 | <detaileddescription> |
---|
17 | </detaileddescription> |
---|
18 | <inbodydescription> |
---|
19 | </inbodydescription> |
---|
20 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="5" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="3" bodyend="-1"/> |
---|
21 | </memberdef> |
---|
22 | <memberdef kind="variable" id="blas__test_8m_1faae8a8c8b5cb8c570f99a90d0b1a7a2" prot="public" static="no" mutable="no"> |
---|
23 | <type></type> |
---|
24 | <definition>et2</definition> |
---|
25 | <argsstring></argsstring> |
---|
26 | <name>et2</name> |
---|
27 | <initializer>zeros(1,4)</initializer> |
---|
28 | <briefdescription> |
---|
29 | </briefdescription> |
---|
30 | <detaileddescription> |
---|
31 | </detaileddescription> |
---|
32 | <inbodydescription> |
---|
33 | </inbodydescription> |
---|
34 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="6" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="6" bodyend="-1"/> |
---|
35 | </memberdef> |
---|
36 | <memberdef kind="variable" id="blas__test_8m_17d4c6cf9e8823d396182dc827145cf0f" prot="public" static="no" mutable="no"> |
---|
37 | <type></type> |
---|
38 | <definition>idn</definition> |
---|
39 | <argsstring></argsstring> |
---|
40 | <name>idn</name> |
---|
41 | <initializer> 1</initializer> |
---|
42 | <briefdescription> |
---|
43 | </briefdescription> |
---|
44 | <detaileddescription> |
---|
45 | </detaileddescription> |
---|
46 | <inbodydescription> |
---|
47 | </inbodydescription> |
---|
48 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="8" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="8" bodyend="-1"/> |
---|
49 | </memberdef> |
---|
50 | <memberdef kind="variable" id="blas__test_8m_19d3d9048db16a7eee539e93e3618cbe7" prot="public" static="no" mutable="no"> |
---|
51 | <type></type> |
---|
52 | <definition>B</definition> |
---|
53 | <argsstring></argsstring> |
---|
54 | <name>B</name> |
---|
55 | <initializer>rand(n)</initializer> |
---|
56 | <briefdescription> |
---|
57 | </briefdescription> |
---|
58 | <detaileddescription> |
---|
59 | </detaileddescription> |
---|
60 | <inbodydescription> |
---|
61 | </inbodydescription> |
---|
62 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="11" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="11" bodyend="-1"/> |
---|
63 | </memberdef> |
---|
64 | <memberdef kind="variable" id="blas__test_8m_1aa53ca0b650dfd85c4f59fa156f7a2cc" prot="public" static="no" mutable="no"> |
---|
65 | <type></type> |
---|
66 | <definition>C</definition> |
---|
67 | <argsstring></argsstring> |
---|
68 | <name>C</name> |
---|
69 | <initializer>rand(n)</initializer> |
---|
70 | <briefdescription> |
---|
71 | </briefdescription> |
---|
72 | <detaileddescription> |
---|
73 | </detaileddescription> |
---|
74 | <inbodydescription> |
---|
75 | </inbodydescription> |
---|
76 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="11" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="11" bodyend="-1"/> |
---|
77 | </memberdef> |
---|
78 | <memberdef kind="variable" id="blas__test_8m_18fb092330ecda60587643305d0d9738a" prot="public" static="no" mutable="no"> |
---|
79 | <type></type> |
---|
80 | <definition>tic</definition> |
---|
81 | <argsstring></argsstring> |
---|
82 | <name>tic</name> |
---|
83 | <briefdescription> |
---|
84 | </briefdescription> |
---|
85 | <detaileddescription> |
---|
86 | </detaileddescription> |
---|
87 | <inbodydescription> |
---|
88 | </inbodydescription> |
---|
89 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="12" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="12" bodyend="-1"/> |
---|
90 | </memberdef> |
---|
91 | <memberdef kind="variable" id="blas__test_8m_16f6ccfcf58b31cb6412107d9d5281426" prot="public" static="no" mutable="no"> |
---|
92 | <type>for</type> |
---|
93 | <definition>for i</definition> |
---|
94 | <argsstring></argsstring> |
---|
95 | <name>i</name> |
---|
96 | <initializer>1:10 |
---|
97 | C=matmult(A,B)</initializer> |
---|
98 | <briefdescription> |
---|
99 | </briefdescription> |
---|
100 | <detaileddescription> |
---|
101 | </detaileddescription> |
---|
102 | <inbodydescription> |
---|
103 | </inbodydescription> |
---|
104 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="14" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="13" bodyend="-1"/> |
---|
105 | </memberdef> |
---|
106 | <memberdef kind="variable" id="blas__test_8m_1e578c3c92b65b0d474de55c0de5d3c1c" prot="public" static="no" mutable="no"> |
---|
107 | <type></type> |
---|
108 | <definition>exec_times_b</definition> |
---|
109 | <argsstring></argsstring> |
---|
110 | <name>exec_times_b</name> |
---|
111 | <briefdescription> |
---|
112 | </briefdescription> |
---|
113 | <detaileddescription> |
---|
114 | </detaileddescription> |
---|
115 | <inbodydescription> |
---|
116 | </inbodydescription> |
---|
117 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="38" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="38" bodyend="-1"/> |
---|
118 | </memberdef> |
---|
119 | <memberdef kind="variable" id="blas__test_8m_1dbe064225003a4d1c1803bae5526584a" prot="public" static="no" mutable="no"> |
---|
120 | <type></type> |
---|
121 | <definition>XScale</definition> |
---|
122 | <argsstring></argsstring> |
---|
123 | <name>XScale</name> |
---|
124 | <briefdescription> |
---|
125 | </briefdescription> |
---|
126 | <detaileddescription> |
---|
127 | </detaileddescription> |
---|
128 | <inbodydescription> |
---|
129 | </inbodydescription> |
---|
130 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="44" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="44" bodyend="-1"/> |
---|
131 | </memberdef> |
---|
132 | <memberdef kind="variable" id="blas__test_8m_11c73327b2882639bc9f5e416bb3cc7ac" prot="public" static="no" mutable="no"> |
---|
133 | <type>for</type> |
---|
134 | <definition>for k</definition> |
---|
135 | <argsstring></argsstring> |
---|
136 | <name>k</name> |
---|
137 | <initializer>1:size(A,2) |
---|
138 | sum=sum+A(i,k)*B(k,j)</initializer> |
---|
139 | <briefdescription> |
---|
140 | </briefdescription> |
---|
141 | <detaileddescription> |
---|
142 | </detaileddescription> |
---|
143 | <inbodydescription> |
---|
144 | </inbodydescription> |
---|
145 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="55" bodyfile="/home/smidl/work/git/mixpp/matlab/blas_test.m" bodystart="54" bodyend="-1"/> |
---|
146 | </memberdef> |
---|
147 | </sectiondef> |
---|
148 | <sectiondef kind="func"> |
---|
149 | <memberdef kind="function" id="blas__test_8m_17259bae7a24c307ccbd999852c3c3f0b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
150 | <type>end</type> |
---|
151 | <definition>end et</definition> |
---|
152 | <argsstring>(idn)</argsstring> |
---|
153 | <name>et</name> |
---|
154 | <param> |
---|
155 | <type>idn</type> |
---|
156 | </param> |
---|
157 | <briefdescription> |
---|
158 | </briefdescription> |
---|
159 | <detaileddescription> |
---|
160 | </detaileddescription> |
---|
161 | <inbodydescription> |
---|
162 | </inbodydescription> |
---|
163 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="16"/> |
---|
164 | </memberdef> |
---|
165 | <memberdef kind="function" id="blas__test_8m_1813cbdb0e2c76fbccef2eb27809f79b7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
166 | <type>end</type> |
---|
167 | <definition>end et2</definition> |
---|
168 | <argsstring>(idn)</argsstring> |
---|
169 | <name>et2</name> |
---|
170 | <param> |
---|
171 | <type>idn</type> |
---|
172 | </param> |
---|
173 | <briefdescription> |
---|
174 | </briefdescription> |
---|
175 | <detaileddescription> |
---|
176 | </detaileddescription> |
---|
177 | <inbodydescription> |
---|
178 | </inbodydescription> |
---|
179 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="22"/> |
---|
180 | </memberdef> |
---|
181 | <memberdef kind="function" id="blas__test_8m_113dba1318100ed909305716d755c5fad" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
182 | <type>end save blas_test else load blas_test end</type> |
---|
183 | <definition>end save blas_test else load blas_test end itload</definition> |
---|
184 | <argsstring>('../blas_test.it') figure plot(vn</argsstring> |
---|
185 | <name>itload</name> |
---|
186 | <param> |
---|
187 | <type>'../blas_test.it'</type> |
---|
188 | </param> |
---|
189 | <briefdescription> |
---|
190 | </briefdescription> |
---|
191 | <detaileddescription> |
---|
192 | </detaileddescription> |
---|
193 | <inbodydescription> |
---|
194 | </inbodydescription> |
---|
195 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="34"/> |
---|
196 | </memberdef> |
---|
197 | <memberdef kind="function" id="blas__test_8m_1dbb8dd47de0f380303cb10e5533a7be3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
198 | <type>end save blas_test else load blas_test end et hold on</type> |
---|
199 | <definition>end save blas_test else load blas_test end et hold on plot</definition> |
---|
200 | <argsstring>(vn, et2,'r')</argsstring> |
---|
201 | <name>plot</name> |
---|
202 | <param> |
---|
203 | <type>vn</type> |
---|
204 | </param> |
---|
205 | <param> |
---|
206 | <type>et2</type> |
---|
207 | </param> |
---|
208 | <param> |
---|
209 | <type>'r'</type> |
---|
210 | </param> |
---|
211 | <briefdescription> |
---|
212 | </briefdescription> |
---|
213 | <detaileddescription> |
---|
214 | </detaileddescription> |
---|
215 | <inbodydescription> |
---|
216 | </inbodydescription> |
---|
217 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="36"/> |
---|
218 | </memberdef> |
---|
219 | <memberdef kind="function" id="blas__test_8m_14af69a1d5e44121cbcc4dc2db70aa2c8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
220 | <type></type> |
---|
221 | <definition>plot</definition> |
---|
222 | <argsstring>(vn, exec_times,'--') plot(vn</argsstring> |
---|
223 | <name>plot</name> |
---|
224 | <param> |
---|
225 | <type>vn</type> |
---|
226 | </param> |
---|
227 | <param> |
---|
228 | <type>exec_times</type> |
---|
229 | </param> |
---|
230 | <param> |
---|
231 | <type>'--'</type> |
---|
232 | </param> |
---|
233 | <briefdescription> |
---|
234 | </briefdescription> |
---|
235 | <detaileddescription> |
---|
236 | </detaileddescription> |
---|
237 | <inbodydescription> |
---|
238 | </inbodydescription> |
---|
239 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="38"/> |
---|
240 | </memberdef> |
---|
241 | <memberdef kind="function" id="blas__test_8m_1fafd47aa0d35aa70b077df30314d010a" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> |
---|
242 | <type>'For cycle vs.BLAS'</type> |
---|
243 | <definition>'For cycle vs. BLAS' title</definition> |
---|
244 | <argsstring>()</argsstring> |
---|
245 | <name>title</name> |
---|
246 | <briefdescription> |
---|
247 | </briefdescription> |
---|
248 | <detaileddescription> |
---|
249 | </detaileddescription> |
---|
250 | <inbodydescription> |
---|
251 | </inbodydescription> |
---|
252 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="40"/> |
---|
253 | </memberdef> |
---|
254 | <memberdef kind="function" id="blas__test_8m_1deee4e8a013af7477b9161ee6319b2e1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
255 | <type></type> |
---|
256 | <definition>ylabel</definition> |
---|
257 | <argsstring>('execution time')</argsstring> |
---|
258 | <name>ylabel</name> |
---|
259 | <param> |
---|
260 | <type>'execution time'</type> |
---|
261 | </param> |
---|
262 | <briefdescription> |
---|
263 | </briefdescription> |
---|
264 | <detaileddescription> |
---|
265 | </detaileddescription> |
---|
266 | <inbodydescription> |
---|
267 | </inbodydescription> |
---|
268 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="41"/> |
---|
269 | </memberdef> |
---|
270 | <memberdef kind="function" id="blas__test_8m_174d0130845cc181e5a192017be025ebc" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
271 | <type></type> |
---|
272 | <definition>xlabel</definition> |
---|
273 | <argsstring>('matrix size')</argsstring> |
---|
274 | <name>xlabel</name> |
---|
275 | <param> |
---|
276 | <type>'matrix size'</type> |
---|
277 | </param> |
---|
278 | <briefdescription> |
---|
279 | </briefdescription> |
---|
280 | <detaileddescription> |
---|
281 | </detaileddescription> |
---|
282 | <inbodydescription> |
---|
283 | </inbodydescription> |
---|
284 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="42"/> |
---|
285 | </memberdef> |
---|
286 | <memberdef kind="function" id="blas__test_8m_1af91eb79abc9ac412d1d91f58815ec67" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
287 | <type></type> |
---|
288 | <definition>set</definition> |
---|
289 | <argsstring>(gca,'YScale','log') set(gca</argsstring> |
---|
290 | <name>set</name> |
---|
291 | <param> |
---|
292 | <type>gca</type> |
---|
293 | </param> |
---|
294 | <param> |
---|
295 | <type>'YScale'</type> |
---|
296 | </param> |
---|
297 | <param> |
---|
298 | <type>'log'</type> |
---|
299 | </param> |
---|
300 | <briefdescription> |
---|
301 | </briefdescription> |
---|
302 | <detaileddescription> |
---|
303 | </detaileddescription> |
---|
304 | <inbodydescription> |
---|
305 | </inbodydescription> |
---|
306 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="44"/> |
---|
307 | </memberdef> |
---|
308 | <memberdef kind="function" id="blas__test_8m_1a31ca403c5d9830bfec8020f97b49f29" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
309 | <type>log</type> |
---|
310 | <definition>set</definition> |
---|
311 | <argsstring>(gcf,'PaperPositionMode','auto')</argsstring> |
---|
312 | <name>set</name> |
---|
313 | <param> |
---|
314 | <type>gcf</type> |
---|
315 | </param> |
---|
316 | <param> |
---|
317 | <type>'PaperPositionMode'</type> |
---|
318 | </param> |
---|
319 | <param> |
---|
320 | <type>'auto'</type> |
---|
321 | </param> |
---|
322 | <briefdescription> |
---|
323 | </briefdescription> |
---|
324 | <detaileddescription> |
---|
325 | </detaileddescription> |
---|
326 | <inbodydescription> |
---|
327 | </inbodydescription> |
---|
328 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="45"/> |
---|
329 | </memberdef> |
---|
330 | <memberdef kind="function" id="blas__test_8m_140f1ff81e146b59be9e0e751c5999e9e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
331 | <type></type> |
---|
332 | <definition>legend</definition> |
---|
333 | <argsstring>('matlab for','matlab blas','IT++for','IT++blas','C array') function C</argsstring> |
---|
334 | <name>legend</name> |
---|
335 | <param> |
---|
336 | <type>'matlab for'</type> |
---|
337 | </param> |
---|
338 | <param> |
---|
339 | <type>'matlab blas'</type> |
---|
340 | </param> |
---|
341 | <param> |
---|
342 | <type>'IT++for'</type> |
---|
343 | </param> |
---|
344 | <param> |
---|
345 | <type>'IT++blas'</type> |
---|
346 | </param> |
---|
347 | <param> |
---|
348 | <type>'C array'</type> |
---|
349 | </param> |
---|
350 | <briefdescription> |
---|
351 | </briefdescription> |
---|
352 | <detaileddescription> |
---|
353 | </detaileddescription> |
---|
354 | <inbodydescription> |
---|
355 | </inbodydescription> |
---|
356 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="53"/> |
---|
357 | </memberdef> |
---|
358 | <memberdef kind="function" id="blas__test_8m_12e886bc4c32028e9eace6190eae03c42" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
---|
359 | <type>end</type> |
---|
360 | <definition>end C</definition> |
---|
361 | <argsstring>(i, j)</argsstring> |
---|
362 | <name>C</name> |
---|
363 | <param> |
---|
364 | <type>i</type> |
---|
365 | </param> |
---|
366 | <param> |
---|
367 | <type>j</type> |
---|
368 | </param> |
---|
369 | <briefdescription> |
---|
370 | </briefdescription> |
---|
371 | <detaileddescription> |
---|
372 | </detaileddescription> |
---|
373 | <inbodydescription> |
---|
374 | </inbodydescription> |
---|
375 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m" line="57"/> |
---|
376 | </memberdef> |
---|
377 | </sectiondef> |
---|
378 | <briefdescription> |
---|
379 | </briefdescription> |
---|
380 | <detaileddescription> |
---|
381 | </detaileddescription> |
---|
382 | <programlisting> |
---|
383 | <codeline lineno="1"><highlight class="normal">function<sp/>test</highlight></codeline> |
---|
384 | <codeline lineno="2"><highlight class="normal"></highlight></codeline> |
---|
385 | <codeline lineno="3"><highlight class="normal">vn<sp/>=<sp/></highlight></codeline> |
---|
386 | <codeline lineno="4"><highlight class="normal"></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>0</highlight></codeline> |
---|
387 | <codeline lineno="5"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>et<sp/>=zeros(1,4);</highlight></codeline> |
---|
388 | <codeline lineno="6"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>et2<sp/>=zeros(1,4);</highlight></codeline> |
---|
389 | <codeline lineno="7"><highlight class="normal"></highlight></codeline> |
---|
390 | <codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>idn<sp/>=<sp/>1;</highlight></codeline> |
---|
391 | <codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vn<sp/>=<sp/></highlight></codeline> |
---|
392 | <codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>n=<sp/>vn</highlight></codeline> |
---|
393 | <codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>A=rand(n);B=rand(n);C=rand(n);</highlight></codeline> |
---|
394 | <codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tic;</highlight></codeline> |
---|
395 | <codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>i=1:10</highlight></codeline> |
---|
396 | <codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C=matmult(A,B);</highlight></codeline> |
---|
397 | <codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
398 | <codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>et(idn)<sp/>=<sp/>toc;</highlight></codeline> |
---|
399 | <codeline lineno="17"><highlight class="normal"></highlight></codeline> |
---|
400 | <codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tic;</highlight></codeline> |
---|
401 | <codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>i=1:10</highlight></codeline> |
---|
402 | <codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C=A*B;</highlight></codeline> |
---|
403 | <codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
404 | <codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>et2(idn)<sp/>=<sp/>toc;</highlight></codeline> |
---|
405 | <codeline lineno="23"><highlight class="normal"></highlight></codeline> |
---|
406 | <codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>idn<sp/>=idn+1;</highlight></codeline> |
---|
407 | <codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
408 | <codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>save<sp/>blas_test</highlight></codeline> |
---|
409 | <codeline lineno="27"><highlight class="normal"></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> |
---|
410 | <codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>load<sp/>blas_test</highlight></codeline> |
---|
411 | <codeline lineno="29"><highlight class="normal">end</highlight></codeline> |
---|
412 | <codeline lineno="30"><highlight class="normal"></highlight></codeline> |
---|
413 | <codeline lineno="31"><highlight class="normal">itload(</highlight><highlight class="stringliteral">'../blas_test.it'</highlight><highlight class="normal">)</highlight></codeline> |
---|
414 | <codeline lineno="32"><highlight class="normal"></highlight></codeline> |
---|
415 | <codeline lineno="33"><highlight class="normal">figure</highlight></codeline> |
---|
416 | <codeline lineno="34"><highlight class="normal">plot(vn,et)</highlight></codeline> |
---|
417 | <codeline lineno="35"><highlight class="normal">hold<sp/>on</highlight></codeline> |
---|
418 | <codeline lineno="36"><highlight class="normal">plot(vn,et2,'r');</highlight></codeline> |
---|
419 | <codeline lineno="37"><highlight class="normal">plot(vn,exec_times,'--')</highlight></codeline> |
---|
420 | <codeline lineno="38"><highlight class="normal">plot(vn,exec_times_b,'r--')</highlight></codeline> |
---|
421 | <codeline lineno="39"><highlight class="normal">plot(vn,exec_times_c,'g--')</highlight></codeline> |
---|
422 | <codeline lineno="40"><highlight class="normal">title('For<sp/>cycle<sp/>vs.<sp/>BLAS');</highlight></codeline> |
---|
423 | <codeline lineno="41"><highlight class="normal">ylabel('execution<sp/>time');</highlight></codeline> |
---|
424 | <codeline lineno="42"><highlight class="normal">xlabel('matrix<sp/>size');</highlight></codeline> |
---|
425 | <codeline lineno="43"><highlight class="normal">set(gca,'YScale','log')</highlight></codeline> |
---|
426 | <codeline lineno="44"><highlight class="normal">set(gca,'XScale','log')</highlight></codeline> |
---|
427 | <codeline lineno="45"><highlight class="normal">set(gcf,'PaperPositionMode','auto');</highlight></codeline> |
---|
428 | <codeline lineno="46"><highlight class="normal"></highlight></codeline> |
---|
429 | <codeline lineno="47"><highlight class="normal">legend('matlab<sp/>for','matlab<sp/>blas','IT++<sp/>for','IT++<sp/>blas','C<sp/>array')</highlight></codeline> |
---|
430 | <codeline lineno="48"><highlight class="normal"></highlight></codeline> |
---|
431 | <codeline lineno="49"><highlight class="normal"></highlight></codeline> |
---|
432 | <codeline lineno="50"><highlight class="normal">function<sp/>C=matmult(A,B)</highlight></codeline> |
---|
433 | <codeline lineno="51"><highlight class="normal">for<sp/>i=1:size(A,1)</highlight></codeline> |
---|
434 | <codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>j=1:size(A,2)</highlight></codeline> |
---|
435 | <codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sum=0;</highlight></codeline> |
---|
436 | <codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>k=1:size(A,2)</highlight></codeline> |
---|
437 | <codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sum=sum+A(i,k)*B(k,j);</highlight></codeline> |
---|
438 | <codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
439 | <codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>C(i,j)=sum;</highlight></codeline> |
---|
440 | <codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>end</highlight></codeline> |
---|
441 | <codeline lineno="59"><highlight class="normal">end</highlight></codeline> |
---|
442 | </programlisting> |
---|
443 | <location file="/home/smidl/work/git/mixpp/matlab/blas_test.m"/> |
---|
444 | </compounddef> |
---|
445 | </doxygen> |
---|