MAGMA  1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
get_nb_fermi.cpp
Go to the documentation of this file.
1 /*
2  -- clMAGMA (version 1.2.0) --
3  Univ. of Tennessee, Knoxville
4  Univ. of California, Berkeley
5  Univ. of Colorado, Denver
6  April 2012
7 */
8 
9 // ==== Definition of blocking sizes for Nvidia Fermi cards
10 #if (GPUSHMEM >= 200)
11 
12 /* ////////////////////////////////////////////////////////////////////////////
13  -- Return nb for potrf based on n
14 */
15 extern "C"
16 int magma_get_spotrf_nb(int n) {
17  if (n <= 1024)
18  return 160;
19  else
20  return 320;
21 }
22 
23 extern "C"
24 int magma_get_dpotrf_nb(int n) {
25  if (n <= 4256)
26  return 128;
27  else
28  return 256;
29 }
30 
31 extern "C"
32 int magma_get_cpotrf_nb(int n) {
33  return 128;
34 }
35 
36 extern "C"
37 int magma_get_zpotrf_nb(int n) {
38  return 64;
39 }
40 
41 /* ////////////////////////////////////////////////////////////////////////////
42  -- Return nb for geqrf based on m
43 */
44 extern "C"
45 int magma_get_sgeqrf_nb(int m) {
46  if (m < 2000)
47  return 96;
48  else
49  return 192;
50 }
51 
52 extern "C"
53 int magma_get_dgeqrf_nb(int m) {
54  if (m <= 2048)
55  return 64;
56  else
57  return 128;
58 }
59 
60 extern "C"
61 int magma_get_cgeqrf_nb(int m) {
62  if (m <= 2048)
63  return 32;
64  else if (m <= 4032)
65  return 64;
66  else
67  return 128;
68 }
69 
70 extern "C"
71 int magma_get_zgeqrf_nb(int m) {
72  if (m <= 2048)
73  return 32;
74  else if (m <= 4032)
75  return 64;
76  else
77  return 128;
78 }
79 
80 /* ////////////////////////////////////////////////////////////////////////////
81  -- Return nb for geqlf based on m
82 */
83 extern "C"
84 int magma_get_sgeqlf_nb(int m) {
85  return magma_get_sgeqrf_nb(m);
86 }
87 
88 extern "C"
89 int magma_get_dgeqlf_nb(int m) {
90  return magma_get_dgeqrf_nb(m);
91 }
92 
93 extern "C"
94 int magma_get_cgeqlf_nb(int m) {
95  if (m <= 2048)
96  return 32;
97  else if (m <= 4032)
98  return 64;
99  else
100  return 128;
101 }
102 
103 extern "C"
104 int magma_get_zgeqlf_nb(int m) {
105  if (m <= 1024)
106  return 64;
107  else
108  return 128;
109 }
110 
111 /* ////////////////////////////////////////////////////////////////////////////
112  -- Return nb for gelqf based on m
113 */
114 extern "C"
115 int magma_get_sgelqf_nb(int m) {
116  return magma_get_sgeqrf_nb(m);
117 }
118 
119 extern "C"
120 int magma_get_dgelqf_nb(int m) {
121  return magma_get_dgeqrf_nb(m);
122 }
123 
124 extern "C"
125 int magma_get_cgelqf_nb(int m) {
126  if (m <= 2048)
127  return 32;
128  else if (m <= 4032)
129  return 64;
130  else
131  return 128;
132 }
133 
134 extern "C"
135 int magma_get_zgelqf_nb(int m) {
136  if (m <= 1024)
137  return 64;
138  else
139  return 128;
140 }
141 
142 /* ////////////////////////////////////////////////////////////////////////////
143  -- Return nb for getrf based on m;
144  the return value should be multiple of 64
145 */
146 extern "C"
147 int magma_get_sgetrf_nb(int m) {
148  if (m <= 3200)
149  return 64;
150  else
151  return 192;
152 }
153 
154 extern "C"
155 int magma_get_dgetrf_nb(int m) {
156  if (m <= 2048)
157  return 64;
158  else if (m < 7200)
159  return 192;
160  else
161  return 256;
162 }
163 
164 extern "C"
165 int magma_get_cgetrf_nb(int m) {
166  if (m <= 2048)
167  return 64;
168  else
169  return 128;
170 }
171 
172 extern "C"
173 int magma_get_zgetrf_nb(int n) {
174  if (n <= 3072)
175  return 32;
176  else if (n <= 9024)
177  return 64;
178  else
179  return 128;
180 }
181 
182 /* ////////////////////////////////////////////////////////////////////////////
183  -- Return nb for gehrd based on m;
184  the return value should be a multiple of 32
185 */
186 extern "C"
187 int magma_get_sgehrd_nb(int m) {
188  if (m <= 1024)
189  return 32;
190  else
191  return 96;
192 }
193 
194 extern "C"
195 int magma_get_dgehrd_nb(int m) {
196  if (m <= 2048)
197  return 32;
198  else
199  return 64;
200 }
201 
202 extern "C"
203 int magma_get_cgehrd_nb(int m) {
204  if (m <= 1024)
205  return 32;
206  else
207  return 64;
208 }
209 
210 extern "C"
211 int magma_get_zgehrd_nb(int m) {
212  if (m <= 2048)
213  return 32;
214  else
215  return 64;
216 }
217 
218 /* ////////////////////////////////////////////////////////////////////////////
219  -- Return nb for sytrd based on m;
220  the return value should be a multiple of 32
221 */
222 extern "C"
223 int magma_get_ssytrd_nb(int m) {
224  return 32;
225  //if (m <= 1024)
226  // return 64;
227  //else
228  // return 64;
229 }
230 
231 extern "C"
232 int magma_get_dsytrd_nb(int m) {
233  return 32;
234  //return 64;
235  //if (m <= 1024)
236  // return 64;
237  //else
238  // return 64;
239 }
240 
241 extern "C"
242 int magma_get_chetrd_nb(int m) {
243  return 32;
244  //if (m <= 1024)
245  // return 64;
246  //else
247  // return 64;
248 }
249 
250 extern "C"
251 int magma_get_zhetrd_nb(int m) {
252  return 32;
253  //return 64;
254  //if (m <= 1024)
255  // return 64;
256  //else
257  // return 64;
258 }
259 
260 /* ////////////////////////////////////////////////////////////////////////////
261  -- Return nb for gebrd based on m;
262  the return value should be a multiple of 32
263 */
264 extern "C"
265 int magma_get_sgebrd_nb(int m) {
266  return 32;
267  //if (m <= 1024)
268  // return 64;
269  //else
270  // return 64;
271 }
272 
273 extern "C"
274 int magma_get_dgebrd_nb(int m) {
275  return 32;
276  //if (m <= 1024)
277  // return 64;
278  //else
279  // return 64;
280 }
281 
282 extern "C"
283 int magma_get_cgebrd_nb(int m) {
284  return 32;
285  //if (m <= 1024)
286  // return 64;
287  //else
288  // return 64;
289 }
290 
291 extern "C"
292 int magma_get_zgebrd_nb(int m) {
293  return 32;
294  //if (m <= 1024)
295  // return 64;
296  //else
297  // return 64;
298 }
299 
300 /* ////////////////////////////////////////////////////////////////////////////
301  -- Return nb for zhegst based on m;
302  the return value should be a multiple of 32
303 */
304 extern "C"
305 int magma_get_ssygst_nb(int m) {
306  return 64;
307 }
308 
309 extern "C"
310 int magma_get_dsygst_nb(int m) {
311  return 64;
312 }
313 
314 extern "C"
315 int magma_get_chegst_nb(int m) {
316  return 64;
317 }
318 
319 extern "C"
320 int magma_get_zhegst_nb(int m) {
321  return 64;
322 }
323 
324 /* ////////////////////////////////////////////////////////////////////////////
325  -- Return nb for getri based on m
326 */
327 extern "C"
328 int magma_get_sgetri_nb(int m) {
329  return 64;
330 }
331 
332 extern "C"
333 int magma_get_dgetri_nb(int m) {
334  return 64;
335 }
336 
337 extern "C"
338 int magma_get_cgetri_nb(int m) {
339  return 64;
340 }
341 
342 extern "C"
343 int magma_get_zgetri_nb(int m) {
344  return 64;
345 }
346 
347 #endif // HAVE_CUBLAS