SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
PBtools.h
Go to the documentation of this file.
1/* ---------------------------------------------------------------------
2*
3* -- PBLAS routine (version 2.0) --
4* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5* and University of California, Berkeley.
6* March 12, 2002
7*
8* ---------------------------------------------------------------------
9*/
10/*
11* This file includes PBLAS tools definitions. All PBLAS routines include
12* this file.
13*
14* ----------------------------------------------------------------------
15* #define macro constants
16* ---------------------------------------------------------------------
17*
18* Descriptor entries for type 1
19*/
20#define BLOCK_CYCLIC_2D 1
21
22#define DTYPE1_ 0 /* Descriptor Type */
23#define CTXT1_ 1 /* BLACS context */
24#define M1_ 2 /* Global Number of Rows */
25#define N1_ 3 /* Global Number of Columns */
26#define MB1_ 4 /* Row Blocking Size */
27#define NB1_ 5 /* Column Blocking Size */
28#define RSRC1_ 6 /* Starting Processor Row */
29#define CSRC1_ 7 /* Starting Processor Column */
30#define LLD1_ 8 /* Local Leading Dimension */
31#define DLEN1_ 9 /* Descriptor Length */
32/*
33* Descriptor entries for type 2
34*/
35#define BLOCK_CYCLIC_2D_INB 2
36
37#define DTYPE_ 0 /* Descriptor Type */
38#define CTXT_ 1 /* BLACS context */
39#define M_ 2 /* Global Number of Rows */
40#define N_ 3 /* Global Number of Columns */
41#define IMB_ 4 /* Initial Row Blocking Size */
42#define INB_ 5 /* Initial Column Blocking Size */
43#define MB_ 6 /* Row Blocking Size */
44#define NB_ 7 /* Column Blocking Size */
45#define RSRC_ 8 /* Starting Process Row */
46#define CSRC_ 9 /* Starting Process Column */
47#define LLD_ 10 /* Local Leading Dimension */
48#define DLEN_ 11 /* Descriptor Length */
49
50#define CPACKING 'P'
51#define CUNPACKING 'U'
52
53#define PACKING "P"
54#define UNPACKING "U"
55
56#define CGENERAL 'G'
57/* #define CSYMM 'S' */
58#define CHERM 'H'
59
60#define GENERAL "G"
61#define SYMM "S"
62#define HERM "H"
63
64#define ONE 1.0
65#define TWO 2.0
66#define ZERO 0.0
67 /* Input error checking related constants */
68#define DESCMULT 100
69#define BIGNUM 10000
70/*
71* ---------------------------------------------------------------------
72* #define macro functions
73* ---------------------------------------------------------------------
74*/
75#define ABS( a_ ) ( ( (a_) < 0 ) ? -(a_) : (a_) )
76#define MIN( a_, b_ ) ( ( (a_) < (b_) ) ? (a_) : (b_) )
77#define MAX( a_, b_ ) ( ( (a_) > (b_) ) ? (a_) : (b_) )
78
79#define FLOOR(a,b) (((a)>0) ? (((a)/(b))) : (-(((-(a))+(b)-1)/(b))))
80#define CEIL(a,b) ( ( (a)+(b)-1 ) / (b) )
81#define ICEIL(a,b) (((a)>0) ? ((((a)+(b)-1)/(b))) : (-((-(a))/(b))))
82
83#define Mupcase(C) (((C)>96 && (C)<123) ? (C) & 0xDF : (C))
84#define Mlowcase(C) (((C)>64 && (C)< 91) ? (C) | 32 : (C))
85/*
86* The following macros perform common modulo operations; All functions
87* except MPosMod assume arguments are < d (i.e., arguments are themsel-
88* ves within modulo range).
89*/
90 /* increment with mod */
91#define MModInc(I, d) if(++(I) == (d)) (I) = 0
92 /* decrement with mod */
93#define MModDec(I, d) if(--(I) == -1) (I) = (d)-1
94 /* positive modulo */
95#define MPosMod(I, d) ( (I) - ((I)/(d))*(d) )
96 /* add two numbers */
97#define MModAdd(I1, I2, d) \
98 ( ( (I1) + (I2) < (d) ) ? (I1) + (I2) : (I1) + (I2) - (d) )
99 /* add 1 to # */
100#define MModAdd1(I, d) ( ((I) != (d)-1) ? (I) + 1 : 0 )
101 /* subtract two numbers */
102#define MModSub(I1, I2, d) \
103 ( ( (I1) < (I2) ) ? (d) + (I1) - (I2) : (I1) - (I2) )
104 /* sub 1 from # */
105#define MModSub1(I, d) ( ((I)!=0) ? (I)-1 : (d)-1 )
106/*
107* DNROC computes maximum number of local rows or columns. This macro is
108* only used to compute the time estimates in the Level 3 PBLAS routines.
109*/
110
111#define DNROC( n_, nb_, p_ ) \
112 ((double)(((((n_)+(nb_)-1)/(nb_))+(p_)-1)/(p_))*(double)((nb_)))
113/*
114* Mptr returns a pointer to a_( i_, j_ ) for readability reasons and
115* also less silly errors ...
116*
117* There was some problems with the previous code which read:
118*
119* #define Mptr( a_, i_, j_, lda_, siz_ ) \
120* ( (a_) + ( ( (i_)+(j_)*(lda_) )*(siz_) ) )
121*
122* since it can overflow the 32-bit integer "easily".
123* The following code should fix the problem.
124* It uses the "off_t" command.
125*
126* Change made by Julien Langou on Sat. September 12, 2009.
127* Fix provided by John Moyard from CNES.
128*
129* JL :April 2011: Change off_t by long long
130* off_t is not supported under Windows
131*/
132#define Mptr( a_, i_, j_, lda_, siz_ ) \
133 ( (a_) + ( (long long) ( (long long)(i_)+ \
134 (long long)(j_)*(long long)(lda_))*(long long)(siz_) ) )
135/*
136* Mfirstnb and Mlastnb compute the global size of the first and last
137* block corresponding to the interval i_:i_+n_-1 of global indexes.
138*/
139#define Mfirstnb( inbt_, n_, i_, inb_, nb_ ) \
140 inbt_ = (inb_) - (i_); \
141 if( inbt_ <= 0 ) \
142 inbt_ = ( (-inbt_) / (nb_) + 1 ) * (nb_) + inbt_; \
143 inbt_ = MIN( inbt_, (n_) );
144
145#define Mlastnb( inbt_, n_, i_, inb_, nb_ ) \
146 inbt_ = (i_) + (n_) - (inb_); \
147 if( inbt_ > 0 ) \
148 { \
149 inbt_ = -( ( (nb_)+inbt_-1 )/(nb_)-1 )*(nb_) + inbt_; \
150 inbt_ = MIN( inbt_, (n_) ); \
151 } \
152 else { inbt_ = (n_); };
153/*
154* Does the index interval i_:i_+n_-1 spans more than one process rows
155* or columns ?
156*
157* Mspan returns 0 (false) when the data is replicated (srcproc_ < 0) or
158* when there is only one process row or column in the process grid.
159*/
160#define Mspan( n_, i_, inb_, nb_, srcproc_, nprocs_ ) \
161 ( ( (srcproc_) >= 0 ) && ( ( (nprocs_) > 1 ) && \
162 ( ( (i_) < (inb_) ) ? \
163 ( (i_) + (n_) > (inb_) ) : \
164 ( (i_) + (n_) > (inb_) + \
165 ( ( (i_) - (inb_) ) / (nb_) + 1 ) * (nb_) ) ) ) )
166/*
167* Mindxl2g computes the global index ig_ corresponding to the local
168* index il_ in process proc_.
169*/
170#define Mindxl2g( ig_, il_, inb_, nb_, proc_, srcproc_, nprocs_ ) \
171 { \
172 if( ( (srcproc_) >= 0 ) && ( (nprocs_) > 1 ) ) \
173 { \
174 if( (proc_) == (srcproc_) ) \
175 { \
176 if( (il_) < (inb_) ) ig_ = (il_); \
177 else ig_ = (il_) + \
178 (nb_)*((nprocs_)-1)*( ((il_)-(inb_)) / (nb_) + 1 ); \
179 } \
180 else if( (proc_) < (srcproc_) ) \
181 { \
182 ig_ = (il_) + (inb_) + \
183 (nb_)*( ((nprocs_)-1)*((il_)/(nb_)) + \
184 (proc_)-(srcproc_)-1+(nprocs_) ); \
185 } \
186 else \
187 { \
188 ig_ = (il_) + (inb_) + \
189 (nb_)*( ((nprocs_)-1)*((il_)/(nb_)) + \
190 (proc_)-(srcproc_)-1 ); \
191 } \
192 } \
193 else \
194 { \
195 ig_ = (il_); \
196 } \
197 }
198/*
199* Mindxg2p returns the process coodinate owning the entry globally
200* indexed by ig_.
201*/
202#define Mindxg2p( ig_, inb_, nb_, proc_, srcproc_, nprocs_ ) \
203 { \
204 if( ( (ig_) >= (inb_) ) && ( (srcproc_) >= 0 ) && \
205 ( (nprocs_) > 1 ) ) \
206 { \
207 proc_ = (srcproc_) + 1 + ( (ig_)-(inb_) ) / (nb_); \
208 proc_ -= ( proc_ / (nprocs_) ) * (nprocs_); \
209 } \
210 else \
211 { \
212 proc_ = (srcproc_); \
213 } \
214 }
215/*
216* Mnumroc computes the # of local indexes np_ residing in the process
217* of coordinate proc_ corresponding to the interval of global indexes
218* i_:i_+n_-1 assuming that the global index 0 resides in the process
219* srcproc_, and that the indexes are distributed from srcproc_ using
220* the parameters inb_, nb_ and nprocs_.
221*/
222#define Mnumroc( np_, n_, i_, inb_, nb_, proc_, srcproc_, nprocs_ ) \
223 { \
224 if( ( (srcproc_) >= 0 ) && ( (nprocs_) > 1 ) ) \
225 { \
226 Int inb__, mydist__, n__, nblk__, quot__, src__; \
227 if( ( inb__ = (inb_) - (i_) ) <= 0 ) \
228 { \
229 src__ = (srcproc_) + ( nblk__ = (-inb__) / (nb_) + 1 ); \
230 src__ -= ( src__ / (nprocs_) ) * (nprocs_); \
231 inb__ += nblk__*(nb_); \
232 if( ( n__ = (n_) - inb__ ) <= 0 ) \
233 { if( (proc_) == src__ ) np_ = (n_); else np_ = 0; } \
234 else \
235 { \
236 if( ( mydist__ = (proc_) - src__ ) < 0 ) \
237 mydist__ += (nprocs_); \
238 nblk__ = n__ / (nb_) + 1; \
239 mydist__ -= nblk__ - \
240 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
241 if( mydist__ < 0 ) \
242 { \
243 if( (proc_) != src__ ) \
244 np_ = (nb_) + (nb_) * quot__; \
245 else \
246 np_ = inb__ + (nb_) * quot__; \
247 } \
248 else if( mydist__ > 0 ) \
249 { \
250 np_ = (nb_) * quot__; \
251 } \
252 else \
253 { \
254 if( (proc_) != src__ ) \
255 np_ = n__ + (nb_) + (nb_) * ( quot__ - nblk__ ); \
256 else \
257 np_ = (n_) + (nb_) * ( quot__ - nblk__ ); \
258 } \
259 } \
260 } \
261 else \
262 { \
263 if( ( n__ = (n_) - inb__ ) <= 0 ) \
264 { if( (proc_) == (srcproc_) ) np_ = (n_); else np_ = 0; } \
265 else \
266 { \
267 if( ( mydist__ = (proc_) - (srcproc_) ) < 0 ) \
268 mydist__ += (nprocs_); \
269 nblk__ = n__ / (nb_) + 1; \
270 mydist__ -= nblk__ - \
271 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
272 if( mydist__ < 0 ) \
273 { \
274 if( (proc_) != (srcproc_) ) \
275 np_ = (nb_) + (nb_) * quot__; \
276 else \
277 np_ = inb__ + (nb_) * quot__; \
278 } \
279 else if( mydist__ > 0 ) \
280 { \
281 np_ = (nb_) * quot__; \
282 } \
283 else \
284 { \
285 if( (proc_) != (srcproc_) ) \
286 np_ = n__ + (nb_) + (nb_) * ( quot__ - nblk__ ); \
287 else \
288 np_ = (n_) + (nb_) * ( quot__ - nblk__ ); \
289 } \
290 } \
291 } \
292 } \
293 else \
294 { \
295 np_ = (n_); \
296 } \
297 }
298
299#define Mnpreroc( np_, n_, i_, inb_, nb_, proc_, srcproc_, nprocs_ ) \
300 { \
301 if( ( (srcproc_) >= 0 ) && ( (nprocs_) > 1 ) ) \
302 { \
303 Int inb__, mydist__, n__, nblk__, quot__, rem__, src__; \
304 if( ( inb__ = (inb_) - (i_) ) <= 0 ) \
305 { \
306 src__ = (srcproc_) + ( nblk__ = (-inb__) / (nb_) + 1 ); \
307 src__ -= ( src__ / (nprocs_) ) * (nprocs_); \
308 if( (proc_) != src__ ) \
309 { \
310 inb__ += nblk__*(nb_); \
311 if( ( n__ = (n_) - inb__ ) <= 0 ) { np_ = (n_); } \
312 else \
313 { \
314 if( ( mydist__ = (proc_) - src__ ) < 0 ) \
315 mydist__ += (nprocs_); \
316 nblk__ = n__ / (nb_) + 1; \
317 rem__ = nblk__ - \
318 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
319 if( mydist__ <= rem__ ) \
320 { \
321 np_ = inb__ - (nb_) + \
322 ( quot__ + 1 ) * mydist__ * (nb_); \
323 } \
324 else \
325 { \
326 np_ = (n_) + \
327 ( mydist__ - (nprocs_) ) * quot__ * (nb_); \
328 } \
329 } \
330 } \
331 else \
332 { \
333 np_ = 0; \
334 } \
335 } \
336 else \
337 { \
338 if( (proc_) != (srcproc_) ) \
339 { \
340 if( ( n__ = (n_) - inb__ ) <= 0 ) { np_ = (n_); } \
341 else \
342 { \
343 if( ( mydist__ = (proc_) - (srcproc_) ) < 0 ) \
344 mydist__ += (nprocs_); \
345 nblk__ = n__ / (nb_) + 1; \
346 rem__ = nblk__ - \
347 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
348 if( mydist__ <= rem__ ) \
349 { \
350 np_ = inb__ - (nb_) + \
351 ( quot__ + 1 ) * mydist__ * (nb_); \
352 } \
353 else \
354 { \
355 np_ = (n_) + \
356 ( mydist__ - (nprocs_) ) * quot__ * (nb_); \
357 } \
358 } \
359 } \
360 else \
361 { \
362 np_ = 0; \
363 } \
364 } \
365 } \
366 else \
367 { \
368 np_ = 0; \
369 } \
370 }
371
372#define Mnnxtroc( np_, n_, i_, inb_, nb_, proc_, srcproc_, nprocs_ ) \
373 { \
374 if( ( (srcproc_) >= 0 ) && ( (nprocs_) > 1 ) ) \
375 { \
376 Int inb__, mydist__, n__, nblk__, quot__, rem__, src__; \
377 if( ( inb__ = (inb_) - (i_) ) <= 0 ) \
378 { \
379 src__ = (srcproc_) + ( nblk__ = (-inb__) / (nb_) + 1 ); \
380 src__ -= ( src__ / (nprocs_) ) * (nprocs_); \
381 inb__ += nblk__*(nb_); \
382 if( ( n__ = (n_) - inb__ ) <= 0 ) { np_ = 0; } \
383 else \
384 { \
385 if( ( mydist__ = (proc_) - src__ ) < 0 ) \
386 mydist__ += (nprocs_); \
387 nblk__ = n__ / (nb_) + 1; \
388 rem__ = nblk__ - \
389 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
390 if( mydist__ < rem__ ) \
391 { \
392 np_ = n__ - ( quot__ * mydist__ + \
393 quot__ + mydist__ ) * (nb_); \
394 } \
395 else \
396 { \
397 np_ = ( (nprocs_) - 1 - mydist__ ) * quot__ * (nb_); \
398 } \
399 } \
400 } \
401 else \
402 { \
403 if( ( n__ = (n_) - inb__ ) <= 0 ) { np_ = 0; } \
404 else \
405 { \
406 if( ( mydist__ = (proc_) - (srcproc_) ) < 0 ) \
407 mydist__ += (nprocs_); \
408 nblk__ = n__ / (nb_) + 1; \
409 rem__ = nblk__ - \
410 ( quot__ = ( nblk__ / (nprocs_) ) ) * (nprocs_); \
411 if( mydist__ < rem__ ) \
412 { \
413 np_ = n__ - ( quot__ * mydist__ + \
414 quot__ + mydist__ ) * (nb_); \
415 } \
416 else \
417 { \
418 np_ = ( (nprocs_) - 1 - mydist__ ) * quot__ * (nb_); \
419 } \
420 } \
421 } \
422 } \
423 else \
424 { np_ = 0; } \
425 }
426
427
428#define Minfog2l( i_, j_, desc_, nr_, nc_, r_, c_, ii_, jj_, pr_, pc_ ) \
429 { \
430 Int quot__, i__, imb__, inb__, j__, mb__, mydist__, \
431 nb__, nblk__, src__; \
432 imb__ = desc_[IMB_]; mb__ = desc_[MB_]; pr_ = desc_[RSRC_]; \
433 if( ( pr_ >= 0 ) && ( nr_ > 1 ) ) \
434 { \
435 if( ( i__ = (i_) - imb__ ) < 0 ) \
436 { ii_ = ( r_ == pr_ ? (i_) : 0 ); } \
437 else \
438 { \
439 src__ = pr_; \
440 pr_ += ( nblk__ = i__ / mb__ + 1 ); \
441 pr_ -= ( pr_ / nr_ ) * nr_; \
442 if( ( mydist__ = r_ - src__ ) < 0 ) mydist__ += nr_; \
443 if( mydist__ >= nblk__ - ( quot__ = nblk__ / nr_ ) * nr_ ) \
444 { \
445 if( r_ != src__ ) ii_ = mb__; \
446 else ii_ = imb__; \
447 if( r_ != pr_ ) \
448 ii_ += ( quot__ - 1 ) * mb__; \
449 else \
450 ii_ += i__ + ( quot__ - nblk__ ) * mb__; \
451 } \
452 else \
453 { \
454 if( r_ != src__ ) ii_ = mb__ + quot__ * mb__; \
455 else ii_ = imb__ + quot__ * mb__; \
456 } \
457 } \
458 } \
459 else \
460 { \
461 ii_ = (i_); \
462 } \
463 inb__ = desc_[INB_]; nb__ = desc_[NB_]; pc_ = desc_[CSRC_]; \
464 if( ( pc_ >= 0 ) && ( nc_ > 1 ) ) \
465 { \
466 if( ( j__ = (j_) - inb__ ) < 0 ) \
467 { jj_ = ( c_ == pc_ ? (j_) : 0 ); } \
468 else \
469 { \
470 src__ = pc_; \
471 pc_ += ( nblk__ = j__ / nb__ + 1 ); \
472 pc_ -= ( pc_ / nc_ ) * nc_; \
473 if( ( mydist__ = c_ - src__ ) < 0 ) mydist__ += nc_; \
474 if( mydist__ >= nblk__ - ( quot__ = nblk__ / nc_ ) * nc_ ) \
475 { \
476 if( c_ != src__ ) jj_ = nb__; \
477 else jj_ = inb__; \
478 if( c_ != pc_ ) \
479 jj_ += ( quot__ - 1 ) * nb__; \
480 else \
481 jj_ += j__ + ( quot__ - nblk__ ) * nb__; \
482 } \
483 else \
484 { \
485 if( c_ != src__ ) jj_ = nb__ + quot__ * nb__; \
486 else jj_ = inb__ + quot__ * nb__; \
487 } \
488 } \
489 } \
490 else \
491 { \
492 jj_ = (j_); \
493 } \
494 }
495
496/*
497* The following macros initialize or translate descriptors.
498*/
499#define MDescSet( desc, m, n, imb, inb, mb, nb, rsrc, csrc, ictxt, lld ) \
500 { \
501 (desc)[DTYPE_] = BLOCK_CYCLIC_2D_INB; \
502 (desc)[CTXT_ ] = (ictxt); \
503 (desc)[M_ ] = (m); \
504 (desc)[N_ ] = (n); \
505 (desc)[IMB_ ] = (imb); \
506 (desc)[INB_ ] = (inb); \
507 (desc)[MB_ ] = (mb); \
508 (desc)[NB_ ] = (nb); \
509 (desc)[RSRC_ ] = (rsrc); \
510 (desc)[CSRC_ ] = (csrc); \
511 (desc)[LLD_ ] = (lld); \
512 }
513
514#define MDescCopy(DescIn, DescOut) \
515 { \
516 (DescOut)[DTYPE_] = (DescIn)[DTYPE_]; \
517 (DescOut)[M_ ] = (DescIn)[M_ ]; \
518 (DescOut)[N_ ] = (DescIn)[N_ ]; \
519 (DescOut)[IMB_ ] = (DescIn)[IMB_ ]; \
520 (DescOut)[INB_ ] = (DescIn)[INB_ ]; \
521 (DescOut)[MB_ ] = (DescIn)[MB_ ]; \
522 (DescOut)[NB_ ] = (DescIn)[NB_ ]; \
523 (DescOut)[RSRC_ ] = (DescIn)[RSRC_ ]; \
524 (DescOut)[CSRC_ ] = (DescIn)[CSRC_ ]; \
525 (DescOut)[CTXT_ ] = (DescIn)[CTXT_ ]; \
526 (DescOut)[LLD_ ] = (DescIn)[LLD_ ]; \
527 }
528
529#define MDescTrans(DescIn, DescOut) \
530 { \
531 if ( (DescIn)[DTYPE_] == BLOCK_CYCLIC_2D ) \
532 { \
533 (DescOut)[DTYPE_] = BLOCK_CYCLIC_2D_INB; \
534 (DescOut)[M_ ] = (DescIn)[M1_ ]; \
535 (DescOut)[N_ ] = (DescIn)[N1_ ]; \
536 (DescOut)[IMB_ ] = (DescIn)[MB1_ ]; \
537 (DescOut)[INB_ ] = (DescIn)[NB1_ ]; \
538 (DescOut)[MB_ ] = (DescIn)[MB1_ ]; \
539 (DescOut)[NB_ ] = (DescIn)[NB1_ ]; \
540 (DescOut)[RSRC_ ] = (DescIn)[RSRC1_ ]; \
541 (DescOut)[CSRC_ ] = (DescIn)[CSRC1_ ]; \
542 (DescOut)[CTXT_ ] = (DescIn)[CTXT1_ ]; \
543 (DescOut)[LLD_ ] = (DescIn)[LLD1_ ]; \
544 } \
545 else if ( (DescIn)[DTYPE_] == BLOCK_CYCLIC_2D_INB ) \
546 { \
547 (DescOut)[DTYPE_] = BLOCK_CYCLIC_2D_INB; \
548 (DescOut)[M_ ] = (DescIn)[M_ ]; \
549 (DescOut)[N_ ] = (DescIn)[N_ ]; \
550 (DescOut)[IMB_ ] = (DescIn)[IMB_ ]; \
551 (DescOut)[INB_ ] = (DescIn)[INB_ ]; \
552 (DescOut)[MB_ ] = (DescIn)[MB_ ]; \
553 (DescOut)[NB_ ] = (DescIn)[NB_ ]; \
554 (DescOut)[RSRC_ ] = (DescIn)[RSRC_ ]; \
555 (DescOut)[CSRC_ ] = (DescIn)[CSRC_ ]; \
556 (DescOut)[CTXT_ ] = (DescIn)[CTXT_ ]; \
557 (DescOut)[LLD_ ] = (DescIn)[LLD_ ]; \
558 } \
559 else \
560 { \
561 (DescOut)[DTYPE_] = (DescIn)[0]; \
562 (DescOut)[CTXT_ ] = (DescIn)[1]; \
563 (DescOut)[M_ ] = 0; \
564 (DescOut)[N_ ] = 0; \
565 (DescOut)[IMB_ ] = 1; \
566 (DescOut)[INB_ ] = 1; \
567 (DescOut)[MB_ ] = 1; \
568 (DescOut)[NB_ ] = 1; \
569 (DescOut)[RSRC_ ] = 0; \
570 (DescOut)[CSRC_ ] = 0; \
571 (DescOut)[LLD_ ] = 1; \
572 } \
573 }
574
575#define MIndxTrans( I, J, i, j ) \
576 { \
577 i = *I - 1; \
578 j = *J - 1; \
579 }
580
581#if( _F2C_CALL_ == _F2C_ADD_ )
582/*
583* These defines set up the naming scheme required to have a FORTRAN
584* routine called by a C routine. No redefinition is necessary to have
585* the following FORTRAN to C interface:
586*
587* FORTRAN DECLARATION C CALL
588* SUBROUTINE PDFOO(...) pdfoo_(...)
589*
590* This is the PBLAS default.
591*/
592
593#endif
594
595#if( _F2C_CALL_ == _F2C_F77ISF2C )
596/*
597* These defines set up the naming scheme required to have a FORTRAN
598* routine called by a C routine for systems where the FORTRAN compiler
599* is actually f2c (a FORTRAN to C conversion utility).
600*
601* FORTRAN DECLARATION C CALL
602* SUBROUTINE PDFOO(...) pdfoo__(...)
603*/
604
605#endif
606
607#if( _F2C_CALL_ == _F2C_UPCASE )
608/*
609* These defines set up the naming scheme required to have a FORTRAN
610* routine called by a C routine with the following FORTRAN to C inter-
611* face:
612*
613* FORTRAN DECLARATION C CALL
614* SUBROUTINE PDFOO(...) PDFOO(...)
615*/
616#define immadd_ IMMADD
617#define smmadd_ SMMADD
618#define dmmadd_ DMMADD
619#define cmmadd_ CMMADD
620#define zmmadd_ ZMMADD
621
622#define immtadd_ IMMTADD
623#define smmtadd_ SMMTADD
624#define dmmtadd_ DMMTADD
625#define cmmtadd_ CMMTADD
626#define zmmtadd_ ZMMTADD
627
628#define smmcadd_ SMMCADD
629#define dmmcadd_ DMMCADD
630#define cmmcadd_ CMMCADD
631#define zmmcadd_ ZMMCADD
632
633#define smmtcadd_ SMMTCADD
634#define dmmtcadd_ DMMTCADD
635#define cmmtcadd_ CMMTCADD
636#define zmmtcadd_ ZMMTCADD
637
638#define immdda_ IMMDDA
639#define smmdda_ SMMDDA
640#define dmmdda_ DMMDDA
641#define cmmdda_ CMMDDA
642#define zmmdda_ ZMMDDA
643
644#define smmddac_ SMMDDAC
645#define dmmddac_ DMMDDAC
646#define cmmddac_ CMMDDAC
647#define zmmddac_ ZMMDDAC
648
649#define immddat_ IMMDDAT
650#define smmddat_ SMMDDAT
651#define dmmddat_ DMMDDAT
652#define cmmddat_ CMMDDAT
653#define zmmddat_ ZMMDDAT
654
655#define smmddact_ SMMDDACT
656#define dmmddact_ DMMDDACT
657#define cmmddact_ CMMDDACT
658#define zmmddact_ ZMMDDACT
659
660#define sasqrtb_ SASQRTB
661#define dasqrtb_ DASQRTB
662
663#define sset_ SSET
664#define dset_ DSET
665#define cset_ CSET
666#define zset_ ZSET
667
668#define svasum_ SVASUM
669#define dvasum_ DVASUM
670#define scvasum_ SCVASUM
671#define dzvasum_ DZVASUM
672
673#define sascal_ SASCAL
674#define dascal_ DASCAL
675
676#define scshft_ SCSHFT
677#define dcshft_ DCSHFT
678#define ccshft_ CCSHFT
679#define zcshft_ ZCSHFT
680
681#define srshft_ SRSHFT
682#define drshft_ DRSHFT
683#define crshft_ CRSHFT
684#define zrshft_ ZRSHFT
685
686#define svvdot_ SVVDOT
687#define dvvdot_ DVVDOT
688#define cvvdotc_ CVVDOTC
689#define cvvdotu_ CVVDOTU
690#define zvvdotc_ ZVVDOTC
691#define zvvdotu_ ZVVDOTU
692
693#define stzpad_ STZPAD
694#define dtzpad_ DTZPAD
695#define ctzpad_ CTZPAD
696#define ztzpad_ ZTZPAD
697
698#define stzpadcpy_ STZPADCPY
699#define dtzpadcpy_ DTZPADCPY
700#define ctzpadcpy_ CTZPADCPY
701#define ztzpadcpy_ ZTZPADCPY
702
703#define stzscal_ STZSCAL
704#define dtzscal_ DTZSCAL
705#define ctzscal_ CTZSCAL
706#define ztzscal_ ZTZSCAL
707
708#define chescal_ CHESCAL
709#define zhescal_ ZHESCAL
710
711#define ctzcnjg_ CTZCNJG
712#define ztzcnjg_ ZTZCNJG
713
714#define sagemv_ SAGEMV
715#define dagemv_ DAGEMV
716#define cagemv_ CAGEMV
717#define zagemv_ ZAGEMV
718
719#define sasymv_ SASYMV
720#define dasymv_ DASYMV
721#define casymv_ CASYMV
722#define zasymv_ ZASYMV
723#define cahemv_ CAHEMV
724#define zahemv_ ZAHEMV
725
726#define satrmv_ SATRMV
727#define datrmv_ DATRMV
728#define catrmv_ CATRMV
729#define zatrmv_ ZATRMV
730
731#define csymv_ CSYMV
732#define zsymv_ ZSYMV
733
734#define csyr_ CSYR
735#define zsyr_ ZSYR
736
737#define csyr2_ CSYR2
738#define zsyr2_ ZSYR2
739
740#endif
741
742#if( _F2C_CALL_ == _F2C_NOCHANGE )
743/*
744* These defines set up the naming scheme required to have a FORTRAN
745* routine called by a C routine with the following FORTRAN to C inter-
746* face:
747*
748* FORTRAN DECLARATION C CALL
749* SUBROUTINE PDFOO(...) pdfoo(...)
750*/
751#define immadd_ immadd
752#define smmadd_ smmadd
753#define dmmadd_ dmmadd
754#define cmmadd_ cmmadd
755#define zmmadd_ zmmadd
756
757#define immtadd_ immtadd
758#define smmtadd_ smmtadd
759#define dmmtadd_ dmmtadd
760#define cmmtadd_ cmmtadd
761#define zmmtadd_ zmmtadd
762
763#define smmcadd_ smmcadd
764#define dmmcadd_ dmmcadd
765#define cmmcadd_ cmmcadd
766#define zmmcadd_ zmmcadd
767
768#define smmtcadd_ smmtcadd
769#define dmmtcadd_ dmmtcadd
770#define cmmtcadd_ cmmtcadd
771#define zmmtcadd_ zmmtcadd
772
773#define immdda_ immdda
774#define smmdda_ smmdda
775#define dmmdda_ dmmdda
776#define cmmdda_ cmmdda
777#define zmmdda_ zmmdda
778
779#define smmddac_ smmddac
780#define dmmddac_ dmmddac
781#define cmmddac_ cmmddac
782#define zmmddac_ zmmddac
783
784#define immddat_ immddat
785#define smmddat_ smmddat
786#define dmmddat_ dmmddat
787#define cmmddat_ cmmddat
788#define zmmddat_ zmmddat
789
790#define smmddact_ smmddact
791#define dmmddact_ dmmddact
792#define cmmddact_ cmmddact
793#define zmmddact_ zmmddact
794
795#define sasqrtb_ sasqrtb
796#define dasqrtb_ dasqrtb
797
798#define sset_ sset
799#define dset_ dset
800#define cset_ cset
801#define zset_ zset
802
803#define svasum_ svasum
804#define dvasum_ dvasum
805#define scvasum_ scvasum
806#define dzvasum_ dzvasum
807
808#define sascal_ sascal
809#define dascal_ dascal
810
811#define scshft_ scshft
812#define dcshft_ dcshft
813#define ccshft_ ccshft
814#define zcshft_ zcshft
815
816#define srshft_ srshft
817#define drshft_ drshft
818#define crshft_ crshft
819#define zrshft_ zrshft
820
821#define svvdot_ svvdot
822#define dvvdot_ dvvdot
823#define cvvdotc_ cvvdotc
824#define cvvdotu_ cvvdotu
825#define zvvdotc_ zvvdotc
826#define zvvdotu_ zvvdotu
827
828#define stzpad_ stzpad
829#define dtzpad_ dtzpad
830#define ctzpad_ ctzpad
831#define ztzpad_ ztzpad
832
833#define stzpadcpy_ stzpadcpy
834#define dtzpadcpy_ dtzpadcpy
835#define ctzpadcpy_ ctzpadcpy
836#define ztzpadcpy_ ztzpadcpy
837
838#define stzscal_ stzscal
839#define dtzscal_ dtzscal
840#define ctzscal_ ctzscal
841#define ztzscal_ ztzscal
842
843#define chescal_ chescal
844#define zhescal_ zhescal
845
846#define ctzcnjg_ ctzcnjg
847#define ztzcnjg_ ztzcnjg
848
849#define sagemv_ sagemv
850#define dagemv_ dagemv
851#define cagemv_ cagemv
852#define zagemv_ zagemv
853
854#define sasymv_ sasymv
855#define dasymv_ dasymv
856#define casymv_ casymv
857#define zasymv_ zasymv
858#define cahemv_ cahemv
859#define zahemv_ zahemv
860
861#define satrmv_ satrmv
862#define datrmv_ datrmv
863#define catrmv_ catrmv
864#define zatrmv_ zatrmv
865
866#define csymv_ csymv
867#define zsymv_ zsymv
868
869#define csyr_ csyr
870#define zsyr_ zsyr
871
872#define csyr2_ csyr2
873#define zsyr2_ zsyr2
874
875#endif
876/*
877* ---------------------------------------------------------------------
878* Function prototypes
879* ---------------------------------------------------------------------
880*/
881#ifdef __STDC__
882
883F_VOID_FCT immadd_ ( Int *, Int *, char *,
884 char *, Int *, char *,
885 char *, Int * );
886F_VOID_FCT smmadd_ ( Int *, Int *, char *,
887 char *, Int *, char *,
888 char *, Int * );
889F_VOID_FCT dmmadd_ ( Int *, Int *, char *,
890 char *, Int *, char *,
891 char *, Int * );
892F_VOID_FCT cmmadd_ ( Int *, Int *, char *,
893 char *, Int *, char *,
894 char *, Int * );
895F_VOID_FCT zmmadd_ ( Int *, Int *, char *,
896 char *, Int *, char *,
897 char *, Int * );
898
899F_VOID_FCT smmcadd_ ( Int *, Int *, char *,
900 char *, Int *, char *,
901 char *, Int * );
902F_VOID_FCT dmmcadd_ ( Int *, Int *, char *,
903 char *, Int *, char *,
904 char *, Int * );
905F_VOID_FCT cmmcadd_ ( Int *, Int *, char *,
906 char *, Int *, char *,
907 char *, Int * );
908F_VOID_FCT zmmcadd_ ( Int *, Int *, char *,
909 char *, Int *, char *,
910 char *, Int * );
911
912F_VOID_FCT immtadd_ ( Int *, Int *, char *,
913 char *, Int *, char *,
914 char *, Int * );
915F_VOID_FCT smmtadd_ ( Int *, Int *, char *,
916 char *, Int *, char *,
917 char *, Int * );
918F_VOID_FCT dmmtadd_ ( Int *, Int *, char *,
919 char *, Int *, char *,
920 char *, Int * );
921F_VOID_FCT cmmtadd_ ( Int *, Int *, char *,
922 char *, Int *, char *,
923 char *, Int * );
924F_VOID_FCT zmmtadd_ ( Int *, Int *, char *,
925 char *, Int *, char *,
926 char *, Int * );
927
928F_VOID_FCT smmtcadd_ ( Int *, Int *, char *,
929 char *, Int *, char *,
930 char *, Int * );
931F_VOID_FCT dmmtcadd_ ( Int *, Int *, char *,
932 char *, Int *, char *,
933 char *, Int * );
934F_VOID_FCT cmmtcadd_ ( Int *, Int *, char *,
935 char *, Int *, char *,
936 char *, Int * );
937F_VOID_FCT zmmtcadd_ ( Int *, Int *, char *,
938 char *, Int *, char *,
939 char *, Int * );
940
941F_VOID_FCT immdda_ ( Int *, Int *, char *,
942 char *, Int *, char *,
943 char *, Int * );
944F_VOID_FCT smmdda_ ( Int *, Int *, char *,
945 char *, Int *, char *,
946 char *, Int * );
947F_VOID_FCT dmmdda_ ( Int *, Int *, char *,
948 char *, Int *, char *,
949 char *, Int * );
950F_VOID_FCT cmmdda_ ( Int *, Int *, char *,
951 char *, Int *, char *,
952 char *, Int * );
953F_VOID_FCT zmmdda_ ( Int *, Int *, char *,
954 char *, Int *, char *,
955 char *, Int * );
956
957F_VOID_FCT smmddac_ ( Int *, Int *, char *,
958 char *, Int *, char *,
959 char *, Int * );
960F_VOID_FCT dmmddac_ ( Int *, Int *, char *,
961 char *, Int *, char *,
962 char *, Int * );
963F_VOID_FCT cmmddac_ ( Int *, Int *, char *,
964 char *, Int *, char *,
965 char *, Int * );
966F_VOID_FCT zmmddac_ ( Int *, Int *, char *,
967 char *, Int *, char *,
968 char *, Int * );
969
970F_VOID_FCT immddat_ ( Int *, Int *, char *,
971 char *, Int *, char *,
972 char *, Int * );
973F_VOID_FCT smmddat_ ( Int *, Int *, char *,
974 char *, Int *, char *,
975 char *, Int * );
976F_VOID_FCT dmmddat_ ( Int *, Int *, char *,
977 char *, Int *, char *,
978 char *, Int * );
979F_VOID_FCT cmmddat_ ( Int *, Int *, char *,
980 char *, Int *, char *,
981 char *, Int * );
982F_VOID_FCT zmmddat_ ( Int *, Int *, char *,
983 char *, Int *, char *,
984 char *, Int * );
985
986F_VOID_FCT smmddact_ ( Int *, Int *, char *,
987 char *, Int *, char *,
988 char *, Int * );
989F_VOID_FCT dmmddact_ ( Int *, Int *, char *,
990 char *, Int *, char *,
991 char *, Int * );
992F_VOID_FCT cmmddact_ ( Int *, Int *, char *,
993 char *, Int *, char *,
994 char *, Int * );
995F_VOID_FCT zmmddact_ ( Int *, Int *, char *,
996 char *, Int *, char *,
997 char *, Int * );
998
999F_VOID_FCT sasqrtb_ ( float *, float *, float * );
1000F_VOID_FCT dasqrtb_ ( double *, double *, double * );
1001
1002F_VOID_FCT sset_ ( Int *, char *, char *,
1003 Int * );
1004F_VOID_FCT dset_ ( Int *, char *, char *,
1005 Int * );
1006F_VOID_FCT cset_ ( Int *, char *, char *,
1007 Int * );
1008F_VOID_FCT zset_ ( Int *, char *, char *,
1009 Int * );
1010
1011F_VOID_FCT svasum_ ( Int *, char *, char *,
1012 Int * );
1013F_VOID_FCT dvasum_ ( Int *, char *, char *,
1014 Int * );
1015F_VOID_FCT scvasum_ ( Int *, char *, char *,
1016 Int * );
1017F_VOID_FCT dzvasum_ ( Int *, char *, char *,
1018 Int * );
1019
1020F_VOID_FCT sascal_ ( Int *, char *, char *,
1021 Int * );
1022F_VOID_FCT dascal_ ( Int *, char *, char *,
1023 Int * );
1024
1025F_VOID_FCT scshft_ ( Int *, Int *, Int *,
1026 char *, Int * );
1027F_VOID_FCT dcshft_ ( Int *, Int *, Int *,
1028 char *, Int * );
1029F_VOID_FCT ccshft_ ( Int *, Int *, Int *,
1030 char *, Int * );
1031F_VOID_FCT zcshft_ ( Int *, Int *, Int *,
1032 char *, Int * );
1033
1034F_VOID_FCT srshft_ ( Int *, Int *, Int *,
1035 char *, Int * );
1036F_VOID_FCT drshft_ ( Int *, Int *, Int *,
1037 char *, Int * );
1038F_VOID_FCT crshft_ ( Int *, Int *, Int *,
1039 char *, Int * );
1040F_VOID_FCT zrshft_ ( Int *, Int *, Int *,
1041 char *, Int * );
1042
1043F_VOID_FCT svvdot_ ( Int *, char *, char *,
1044 Int *, char *, Int * );
1045F_VOID_FCT dvvdot_ ( Int *, char *, char *,
1046 Int *, char *, Int * );
1047F_VOID_FCT cvvdotu_ ( Int *, char *, char *,
1048 Int *, char *, Int * );
1049F_VOID_FCT cvvdotc_ ( Int *, char *, char *,
1050 Int *, char *, Int * );
1051F_VOID_FCT zvvdotu_ ( Int *, char *, char *,
1052 Int *, char *, Int * );
1053F_VOID_FCT zvvdotc_ ( Int *, char *, char *,
1054 Int *, char *, Int * );
1055
1057 Int *, Int *, char *,
1058 char *, char *, Int * );
1060 Int *, Int *, char *,
1061 char *, char *, Int * );
1063 Int *, Int *, char *,
1064 char *, char *, Int * );
1066 Int *, Int *, char *,
1067 char *, char *, Int * );
1068
1070 Int *, Int *, char *,
1071 Int *, char *, Int * );
1073 Int *, Int *, char *,
1074 Int *, char *, Int * );
1076 Int *, Int *, char *,
1077 Int *, char *, Int * );
1079 Int *, Int *, char *,
1080 Int *, char *, Int * );
1081
1083 Int *, char *, char *,
1084 Int * );
1086 Int *, char *, char *,
1087 Int * );
1089 Int *, char *, char *,
1090 Int * );
1092 Int *, char *, char *,
1093 Int * );
1094
1096 Int *, char *, char *,
1097 Int * );
1099 Int *, char *, char *,
1100 Int * );
1101
1103 Int *, char *, char *,
1104 Int * );
1106 Int *, char *, char *,
1107 Int * );
1108
1110 char *, char *, Int *,
1111 char *, Int *, char *,
1112 char *, Int * );
1114 char *, char *, Int *,
1115 char *, Int *, char *,
1116 char *, Int * );
1118 char *, char *, Int *,
1119 char *, Int *, char *,
1120 char *, Int * );
1122 char *, char *, Int *,
1123 char *, Int *, char *,
1124 char *, Int * );
1125
1126F_VOID_FCT sasymv_ ( F_CHAR_T, Int *, char *,
1127 char *, Int *, char *,
1128 Int *, char *, char *,
1129 Int * );
1130F_VOID_FCT dasymv_ ( F_CHAR_T, Int *, char *,
1131 char *, Int *, char *,
1132 Int *, char *, char *,
1133 Int * );
1134F_VOID_FCT casymv_ ( F_CHAR_T, Int *, char *,
1135 char *, Int *, char *,
1136 Int *, char *, char *,
1137 Int * );
1138F_VOID_FCT zasymv_ ( F_CHAR_T, Int *, char *,
1139 char *, Int *, char *,
1140 Int *, char *, char *,
1141 Int * );
1142F_VOID_FCT cahemv_ ( F_CHAR_T, Int *, char *,
1143 char *, Int *, char *,
1144 Int *, char *, char *,
1145 Int * );
1146F_VOID_FCT zahemv_ ( F_CHAR_T, Int *, char *,
1147 char *, Int *, char *,
1148 Int *, char *, char *,
1149 Int * );
1150
1152 Int *, char *, char *,
1153 Int *, char *, Int *,
1154 char *, char *, Int * );
1156 Int *, char *, char *,
1157 Int *, char *, Int *,
1158 char *, char *, Int * );
1160 Int *, char *, char *,
1161 Int *, char *, Int *,
1162 char *, char *, Int * );
1164 Int *, char *, char *,
1165 Int *, char *, Int *,
1166 char *, char *, Int * );
1167
1168F_VOID_FCT csymv_ ( F_CHAR_T, Int *, char *,
1169 char *, Int *, char *,
1170 Int *, char *, char *,
1171 Int * );
1172F_VOID_FCT zsymv_ ( F_CHAR_T, Int *, char *,
1173 char *, Int *, char *,
1174 Int *, char *, char *,
1175 Int * );
1176
1177F_VOID_FCT csyr_ ( F_CHAR_T, Int *, char *,
1178 char *, Int *, char *,
1179 Int * );
1180F_VOID_FCT zsyr_ ( F_CHAR_T, Int *, char *,
1181 char *, Int *, char *,
1182 Int * );
1183
1184F_VOID_FCT csyr2_ ( F_CHAR_T, Int *, char *,
1185 char *, Int *, char *,
1186 Int *, char *, Int * );
1187F_VOID_FCT zsyr2_ ( F_CHAR_T, Int *, char *,
1188 char *, Int *, char *,
1189 Int *, char *, Int * );
1190
1191void PB_Ctzsyr ( PBTYP_T *, char *, Int,
1192 Int, Int, Int,
1193 char *, char *, Int,
1194 char *, Int, char *,
1195 Int );
1196void PB_Ctzher ( PBTYP_T *, char *, Int,
1197 Int, Int, Int,
1198 char *, char *, Int,
1199 char *, Int, char *,
1200 Int );
1201void PB_Ctzsyr2 ( PBTYP_T *, char *, Int,
1202 Int, Int, Int,
1203 char *, char *, Int,
1204 char *, Int, char *,
1205 Int, char *, Int,
1206 char *, Int );
1207void PB_Ctzher2 ( PBTYP_T *, char *, Int,
1208 Int, Int, Int,
1209 char *, char *, Int,
1210 char *, Int, char *,
1211 Int, char *, Int,
1212 char *, Int );
1213void PB_Ctztrmv ( PBTYP_T *, char *, char *,
1214 char *, char *, Int,
1215 Int, Int, Int,
1216 char *, char *, Int,
1217 char *, Int, char *,
1218 Int );
1219void PB_Ctzatrmv ( PBTYP_T *, char *, char *,
1220 char *, char *, Int,
1221 Int, Int, Int,
1222 char *, char *, Int,
1223 char *, Int, char *,
1224 Int );
1225void PB_Ctzsymv ( PBTYP_T *, char *, char *,
1226 Int, Int, Int,
1227 Int, char *, char *,
1228 Int, char *, Int,
1229 char *, Int, char *,
1230 Int, char *, Int );
1231void PB_Ctzhemv ( PBTYP_T *, char *, char *,
1232 Int, Int, Int,
1233 Int, char *, char *,
1234 Int, char *, Int,
1235 char *, Int, char *,
1236 Int, char *, Int );
1237void PB_Ctzasymv ( PBTYP_T *, char *, char *,
1238 Int, Int, Int,
1239 Int, char *, char *,
1240 Int, char *, Int,
1241 char *, Int, char *,
1242 Int, char *, Int );
1243void PB_Ctzahemv ( PBTYP_T *, char *, char *,
1244 Int, Int, Int,
1245 Int, char *, char *,
1246 Int, char *, Int,
1247 char *, Int, char *,
1248 Int, char *, Int );
1249
1250void PB_Ctzsyrk ( PBTYP_T *, char *, Int,
1251 Int, Int, Int,
1252 char *, char *, Int,
1253 char *, Int, char *,
1254 Int );
1255void PB_Ctzherk ( PBTYP_T *, char *, Int,
1256 Int, Int, Int,
1257 char *, char *, Int,
1258 char *, Int, char *,
1259 Int );
1260void PB_Ctzsyr2k ( PBTYP_T *, char *, Int,
1261 Int, Int, Int,
1262 char *, char *, Int,
1263 char *, Int, char *,
1264 Int, char *, Int,
1265 char *, Int );
1266void PB_Ctzher2k ( PBTYP_T *, char *, Int,
1267 Int, Int, Int,
1268 char *, char *, Int,
1269 char *, Int, char *,
1270 Int, char *, Int,
1271 char *, Int );
1272void PB_Ctztrmm ( PBTYP_T *, char *, char *,
1273 char *, char *, Int,
1274 Int, Int, Int,
1275 char *, char *, Int,
1276 char *, Int, char *,
1277 Int );
1278void PB_Ctzsymm ( PBTYP_T *, char *, char *,
1279 Int, Int, Int,
1280 Int, char *, char *,
1281 Int, char *, Int,
1282 char *, Int, char *,
1283 Int, char *, Int );
1284void PB_Ctzhemm ( PBTYP_T *, char *, char *,
1285 Int, Int, Int,
1286 Int, char *, char *,
1287 Int, char *, Int,
1288 char *, Int, char *,
1289 Int, char *, Int );
1290
1291void PB_CpswapNN ( PBTYP_T *, Int, char *,
1292 Int, Int, Int *,
1293 Int, char *, Int,
1294 Int, Int *, Int );
1295void PB_CpswapND ( PBTYP_T *, Int, char *,
1296 Int, Int, Int *,
1297 Int, char *, Int,
1298 Int, Int *, Int );
1299void PB_Cpdot11 ( PBTYP_T *, Int, char *,
1300 char *, Int, Int,
1301 Int *, Int, char *,
1302 Int, Int, Int *,
1303 Int, VVDOT_T );
1304void PB_CpdotNN ( PBTYP_T *, Int, char *,
1305 char *, Int, Int,
1306 Int *, Int, char *,
1307 Int, Int, Int *,
1308 Int, VVDOT_T );
1309void PB_CpdotND ( PBTYP_T *, Int, char *,
1310 char *, Int, Int,
1311 Int *, Int, char *,
1312 Int, Int, Int *,
1313 Int, VVDOT_T );
1314void PB_CpaxpbyNN ( PBTYP_T *, char *, Int,
1315 Int, char *, char *,
1316 Int, Int, Int *,
1317 char *, char *, char *,
1318 Int, Int, Int *,
1319 char * );
1320void PB_CpaxpbyND ( PBTYP_T *, char *, Int,
1321 Int, char *, char *,
1322 Int, Int, Int *,
1323 char *, char *, char *,
1324 Int, Int, Int *,
1325 char * );
1326void PB_CpaxpbyDN ( PBTYP_T *, char *, Int,
1327 Int, char *, char *,
1328 Int, Int, Int *,
1329 char *, char *, char *,
1330 Int, Int, Int *,
1331 char * );
1332void PB_Cpaxpby ( PBTYP_T *, char *, Int,
1333 Int, char *, char *,
1334 Int, Int, Int *,
1335 char *, char *, char *,
1336 Int, Int, Int *,
1337 char * );
1338
1339void PB_Cpsyr ( PBTYP_T *, char *, Int,
1340 Int, char *, char *,
1341 Int, char *, Int,
1342 char *, Int, Int,
1343 Int *, TZSYR_T );
1344void PB_Cpsyr2 ( PBTYP_T *, char *, Int,
1345 Int, char *, char *,
1346 Int, char *, Int,
1347 char *, Int, char *,
1348 Int, char *, Int,
1349 Int, Int *, TZSYR2_T );
1350void PB_Cptrm ( PBTYP_T *, PBTYP_T *, char *,
1351 char *, char *, char *,
1352 Int, Int, char *,
1353 char *, Int, Int,
1354 Int *, char *, Int,
1355 char *, Int, TZTRM_T );
1356void PB_Cpsym ( PBTYP_T *, PBTYP_T *, char *,
1357 char *, Int, Int,
1358 char *, char *, Int,
1359 Int, Int *, char *,
1360 Int, char *, Int,
1361 char *, Int, char *,
1362 Int, TZSYM_T );
1363void PB_Cpgeadd ( PBTYP_T *, char *, char *,
1364 char *, Int, Int,
1365 char *, char *, Int,
1366 Int, Int *, char *,
1367 char *, Int, Int,
1368 Int * );
1369void PB_Cptradd ( PBTYP_T *, char *, char *,
1370 char *, Int, Int,
1371 char *, char *, Int,
1372 Int, Int *, char *,
1373 char *, Int, Int,
1374 Int * );
1375void PB_Cptran ( PBTYP_T *, char *, Int,
1376 Int, char *, char *,
1377 Int, Int, Int *,
1378 char *, char *, Int,
1379 Int, Int * );
1380void PB_Cptrsv ( PBTYP_T *, Int, char *,
1381 char *, char *, Int,
1382 char *, Int, Int,
1383 Int *, char *, Int,
1384 char *, Int );
1385void PB_Cptrsm ( PBTYP_T *, Int, char *,
1386 char *, char *, char *,
1387 Int, Int, char *,
1388 char *, Int, Int,
1389 Int *, char *, Int,
1390 char *, Int );
1391
1392void PB_CpgemmAB ( PBTYP_T *, char *, char *,
1393 char *, char *, Int,
1394 Int, Int, char *,
1395 char *, Int, Int,
1396 Int *, char *, Int,
1397 Int, Int *, char *,
1398 char *, Int, Int,
1399 Int * );
1400void PB_CpgemmAC ( PBTYP_T *, char *, char *,
1401 char *, char *, Int,
1402 Int, Int, char *,
1403 char *, Int, Int,
1404 Int *, char *, Int,
1405 Int, Int *, char *,
1406 char *, Int, Int,
1407 Int * );
1408void PB_CpgemmBC ( PBTYP_T *, char *, char *,
1409 char *, char *, Int,
1410 Int, Int, char *,
1411 char *, Int, Int,
1412 Int *, char *, Int,
1413 Int, Int *, char *,
1414 char *, Int, Int,
1415 Int * );
1416void PB_CpsymmAB ( PBTYP_T *, char *, char *,
1417 char *, char *, Int,
1418 Int, char *, char *,
1419 Int, Int, Int *,
1420 char *, Int, Int,
1421 Int *, char *, char *,
1422 Int, Int, Int * );
1423void PB_CpsymmBC ( PBTYP_T *, char *, char *,
1424 char *, char *, Int,
1425 Int, char *, char *,
1426 Int, Int, Int *,
1427 char *, Int, Int,
1428 Int *, char *, char *,
1429 Int, Int, Int * );
1430void PB_CpsyrkA ( PBTYP_T *, char *, char *,
1431 char *, char *, Int,
1432 Int, char *, char *,
1433 Int, Int, Int *,
1434 char *, char *, Int,
1435 Int, Int * );
1436void PB_CpsyrkAC ( PBTYP_T *, char *, char *,
1437 char *, char *, Int,
1438 Int, char *, char *,
1439 Int, Int, Int *,
1440 char *, char *, Int,
1441 Int, Int * );
1442void PB_Cpsyr2kA ( PBTYP_T *, char *, char *,
1443 char *, char *, Int,
1444 Int, char *, char *,
1445 Int, Int, Int *,
1446 char *, Int, Int,
1447 Int *, char *, char *,
1448 Int, Int, Int * );
1449void PB_Cpsyr2kAC ( PBTYP_T *, char *, char *,
1450 char *, char *, Int,
1451 Int, char *, char *,
1452 Int, Int, Int *,
1453 char *, Int, Int,
1454 Int *, char *, char *,
1455 Int, Int, Int * );
1456void PB_CptrmmAB ( PBTYP_T *, char *, char *,
1457 char *, char *, char *,
1458 Int, Int, char *,
1459 char *, Int, Int,
1460 Int *, char *, Int,
1461 Int, Int * );
1462void PB_CptrmmB ( PBTYP_T *, char *, char *,
1463 char *, char *, char *,
1464 Int, Int, char *,
1465 char *, Int, Int,
1466 Int *, char *, Int,
1467 Int, Int * );
1468void PB_CptrsmAB ( PBTYP_T *, char *, char *,
1469 char *, char *, char *,
1470 Int, Int, char *,
1471 char *, Int, Int,
1472 Int *, char *, Int,
1473 Int, Int * );
1474void PB_CptrsmAB0 ( PBTYP_T *, char *, char *,
1475 char *, Int, Int,
1476 char *, char *, Int,
1477 Int, Int *, char *,
1478 Int, Int, Int *,
1479 char * *, Int *, Int * );
1480void PB_CptrsmAB1 ( PBTYP_T *, char *, char *,
1481 char *, char *, Int,
1482 Int, char *, char *,
1483 Int, Int, Int *,
1484 char *, Int, Int,
1485 Int *, char *, Int * );
1486void PB_CptrsmB ( PBTYP_T *, char *, char *,
1487 char *, char *, char *,
1488 Int, Int, char *,
1489 char *, Int, Int,
1490 Int *, char *, Int,
1491 Int, Int * );
1492#else
1493
1499
1504
1510
1515
1521
1526
1532
1537
1540
1541F_VOID_FCT sset_ ();
1542F_VOID_FCT dset_ ();
1543F_VOID_FCT cset_ ();
1544F_VOID_FCT zset_ ();
1545
1550
1553
1558
1563
1570
1575
1580
1585
1588
1591
1596
1603
1608
1611
1612F_VOID_FCT csyr_ ();
1613F_VOID_FCT zsyr_ ();
1614
1617
1635
1645
1646void PB_Cpsyr ();
1648void PB_Cptrm ();
1649void PB_Cpsym ();
1655
1671
1672#endif
1673 /* TOOLS */
1674#ifdef __STDC__
1675
1676Int PB_Cgcd ( Int, Int );
1677Int PB_Clcm ( Int, Int );
1678
1679void PB_Cdescset ( Int *, Int, Int,
1680 Int, Int, Int,
1681 Int, Int, Int,
1682 Int, Int );
1683void PB_Cdescribe ( Int, Int, Int,
1684 Int, Int *, Int,
1685 Int, Int, Int,
1686 Int *, Int *, Int *,
1687 Int *, Int *, Int *,
1688 Int *, Int *, Int *,
1689 Int * );
1690void PB_CargFtoC ( Int, Int, Int *,
1691 Int *, Int *, Int * );
1693 Int );
1695 Int );
1696Int PB_Cspan ( Int, Int, Int,
1697 Int, Int, Int );
1698
1699void PB_Cainfog2l ( Int, Int, Int,
1700 Int, Int *, Int,
1701 Int, Int, Int,
1702 Int *, Int *, Int *,
1703 Int *, Int *, Int *,
1704 Int *, Int *, Int *,
1705 Int * );
1706void PB_Cinfog2l ( Int, Int, Int *,
1707 Int, Int, Int,
1708 Int, Int *, Int *,
1709 Int *, Int * );
1711 Int, Int, Int );
1713 Int, Int, Int );
1715 Int, Int, Int,
1716 Int );
1718 Int, Int, Int,
1719 Int );
1721 Int, Int, Int,
1722 Int );
1723
1724void PB_Cconjg ( PBTYP_T *, char *, char * );
1725
1726
1727void PB_Cwarn ( Int, Int, char *,
1728 char *, ... );
1729void PB_Cabort ( Int, char *, Int );
1730void PB_Cchkmat ( Int, char *, char *,
1731 Int, Int, Int,
1732 Int, Int, Int,
1733 Int *, Int, Int * );
1734void PB_Cchkvec ( Int, char *, char *,
1735 Int, Int , Int ,
1736 Int, Int *, Int,
1737 Int, Int * );
1738
1739char * PB_Cmalloc ( Int );
1740char * PB_Cgetbuf ( char *, Int );
1741
1742PBTYP_T * PB_Citypeset ( void );
1743PBTYP_T * PB_Cstypeset ( void );
1744PBTYP_T * PB_Cdtypeset ( void );
1745PBTYP_T * PB_Cctypeset ( void );
1746PBTYP_T * PB_Cztypeset ( void );
1747
1748Int pilaenv_ ( Int *, F_CHAR_T );
1749char * PB_Ctop ( Int *, char *, char *,
1750 char * );
1751
1752void PB_CVMinit ( PB_VM_T *, Int, Int,
1753 Int, Int, Int,
1754 Int, Int, Int,
1755 Int, Int, Int,
1756 Int );
1757Int PB_CVMnpq ( PB_VM_T * );
1758void PB_CVMcontig ( PB_VM_T *, Int *, Int *,
1759 Int *, Int * );
1760Int PB_CVMloc ( PBTYP_T *, PB_VM_T *, char *,
1761 char *, char *, char *,
1762 Int, Int, char *,
1763 char *, Int, char *,
1764 char *, Int );
1765Int PB_CVMswp ( PBTYP_T *, PB_VM_T *, char *,
1766 char *, char *, Int,
1767 char *, Int, char *,
1768 Int );
1769Int PB_CVMpack ( PBTYP_T *, PB_VM_T *, char *,
1770 char *, char *, char *,
1771 Int, Int, char *,
1772 char *, Int, char *,
1773 char *, Int );
1774void PB_CVMupdate ( PB_VM_T *, Int, Int *,
1775 Int * );
1776
1777void PB_Cbinfo ( Int, Int, Int,
1778 Int, Int, Int,
1779 Int, Int, Int,
1780 Int *, Int *, Int *,
1781 Int *, Int *, Int *,
1782 Int *, Int *, Int *,
1783 Int *, Int * );
1784
1785void PB_Cplaprnt ( PBTYP_T *, Int, Int,
1786 char *, Int, Int,
1787 Int *, Int, Int,
1788 char * );
1789void PB_Cplaprn2 ( PBTYP_T *, Int, Int,
1790 char *, Int, Int,
1791 Int *, Int, Int,
1792 char *, Int, Int );
1793void PB_Cprnt ( char, Int, Int,
1794 Int, char *, Int,
1795 Int, char * );
1796
1797void PB_Cplapad ( PBTYP_T *, char *, char *,
1798 Int, Int, char *,
1799 char *, char *, Int,
1800 Int, Int * );
1801void PB_Cplapd2 ( PBTYP_T *, char *, char *,
1802 Int, Int, char *,
1803 char *, char *, Int,
1804 Int, Int * );
1805void PB_Cplascal ( PBTYP_T *, char *, char *,
1806 Int, Int, char *,
1807 char *, Int, Int,
1808 Int * );
1809void PB_Cplasca2 ( PBTYP_T *, char *, char *,
1810 Int, Int, char *,
1811 char *, Int, Int,
1812 Int * );
1813void PB_Cplacnjg ( PBTYP_T *, Int, Int,
1814 char *, char *, Int,
1815 Int, Int * );
1816
1817void PB_CInV ( PBTYP_T *, char *, char *,
1818 Int, Int, Int *,
1819 Int, char *, Int,
1820 Int, Int *, char *,
1821 char * *, Int *, Int * );
1822void PB_CInV2 ( PBTYP_T *, char *, char *,
1823 Int, Int, Int *,
1824 Int, char *, Int,
1825 Int, Int *, char *,
1826 char *, Int, Int * );
1827void PB_CInOutV ( PBTYP_T *, char *, Int,
1828 Int, Int *, Int,
1829 char *, char *, Int,
1830 Int, Int *, char *,
1831 char * *, char * *, Int *,
1832 Int *, Int *, Int * );
1833void PB_CInOutV2 ( PBTYP_T *, char *, char *,
1834 Int, Int, Int,
1835 Int *, Int, char *,
1836 Int, Int, Int *,
1837 char *, char * *, Int *,
1838 Int *, Int *, Int * );
1839void PB_COutV ( PBTYP_T *, char *, char *,
1840 Int, Int, Int *,
1841 Int, char * *, Int *,
1842 Int *, Int * );
1843void PB_CGatherV ( PBTYP_T *, char *, char *,
1844 Int, Int, char *,
1845 Int, Int, Int *,
1846 char *, char * *, Int *,
1847 Int * );
1848void PB_CScatterV ( PBTYP_T *, char *, Int,
1849 Int, char *, Int,
1850 Int, Int *, char *,
1851 char *, char *, Int,
1852 Int, Int *, char * );
1853#else
1854
1857
1864
1872
1874
1875void PB_Cwarn ();
1879
1880char * PB_Cmalloc ();
1881char * PB_Cgetbuf ();
1882
1888
1890char * PB_Ctop ();
1891
1899
1901
1904void PB_Cprnt ();
1905
1911
1912void PB_CInV ();
1913void PB_CInV2 ();
1916void PB_COutV ();
1919
1920#endif
#define Int
Definition Bconfig.h:22
void(* TZSYR2_T)()
Definition pblas.h:430
F_VOID_FCT(* VVDOT_T)()
Definition pblas.h:290
#define F_VOID_FCT
Definition pblas.h:127
void(* TZTRM_T)()
Definition pblas.h:431
void(* TZSYR_T)()
Definition pblas.h:429
char * F_CHAR_T
Definition pblas.h:122
void(* TZSYM_T)()
Definition pblas.h:432
#define cagemv_
Definition PBtools.h:716
void PB_Cplapd2()
#define zsyr2_
Definition PBtools.h:738
#define dzvasum_
Definition PBtools.h:671
void PB_CpsyrkAC()
void PB_CVMinit()
#define zmmtadd_
Definition PBtools.h:626
void PB_Ctztrmv()
Int PB_Cfirstnb()
#define smmddac_
Definition PBtools.h:644
void PB_Ctzhemv()
void PB_Cplaprnt()
void PB_Cpsym()
void PB_Ctzsymm()
void PB_Cabort()
#define zmmddac_
Definition PBtools.h:647
void PB_CptrmmB()
#define datrmv_
Definition PBtools.h:727
#define chescal_
Definition PBtools.h:708
void PB_Cpsyr()
#define smmddat_
Definition PBtools.h:650
void PB_CpaxpbyDN()
void PB_Cchkvec()
void PB_CInV2()
#define crshft_
Definition PBtools.h:683
#define ccshft_
Definition PBtools.h:678
#define ztzscal_
Definition PBtools.h:706
void PB_CptrmmAB()
char * PB_Cmalloc()
#define cmmddat_
Definition PBtools.h:652
#define ztzpad_
Definition PBtools.h:696
void PB_Ctzherk()
void PB_Cinfog2l()
#define zsymv_
Definition PBtools.h:732
void PB_CptrsmB()
void PB_CpsyrkA()
void PB_Cptradd()
void PB_Ctzher2()
void PB_Cptrm()
#define catrmv_
Definition PBtools.h:728
void PB_Ctzhemm()
#define sasqrtb_
Definition PBtools.h:660
#define zrshft_
Definition PBtools.h:684
void PB_Cptran()
#define dtzpad_
Definition PBtools.h:694
void PB_CpaxpbyND()
#define cmmcadd_
Definition PBtools.h:630
#define stzpad_
Definition PBtools.h:693
void PB_Ctzasymv()
#define zmmtcadd_
Definition PBtools.h:636
void PB_Cchkmat()
#define ztzcnjg_
Definition PBtools.h:712
void PB_CptrsmAB1()
#define zahemv_
Definition PBtools.h:724
void PB_Cpdot11()
void PB_Cbinfo()
#define dvasum_
Definition PBtools.h:669
Int PB_Cnnxtroc()
#define satrmv_
Definition PBtools.h:726
void PB_Ctzsyr2k()
#define cmmdda_
Definition PBtools.h:641
#define zmmadd_
Definition PBtools.h:620
void PB_Cwarn()
#define zset_
Definition PBtools.h:666
#define sascal_
Definition PBtools.h:673
#define csyr2_
Definition PBtools.h:737
void PB_CGatherV()
#define dvvdot_
Definition PBtools.h:687
Int PB_Cnumroc()
#define dmmdda_
Definition PBtools.h:640
Int PB_CVMpack()
Int pilaenv_()
#define zvvdotu_
Definition PBtools.h:691
Int PB_Clastnb()
void PB_Ctztrmm()
char * PB_Ctop()
void PB_CpdotNN()
#define dmmddact_
Definition PBtools.h:656
void PB_CInV()
#define immadd_
Definition PBtools.h:616
#define cahemv_
Definition PBtools.h:723
PBTYP_T * PB_Cztypeset()
#define cmmddact_
Definition PBtools.h:657
#define dasqrtb_
Definition PBtools.h:661
#define svvdot_
Definition PBtools.h:686
void PB_CScatterV()
void PB_Cplapad()
void PB_Ctzsymv()
void PB_Cpsyr2kA()
PBTYP_T * PB_Cstypeset()
void PB_Cplascal()
void PB_CVMupdate()
void PB_CInOutV()
#define dasymv_
Definition PBtools.h:720
Int PB_Cgcd()
void PB_CInOutV2()
void PB_Cplacnjg()
#define smmdda_
Definition PBtools.h:639
void PB_Ctzatrmv()
#define drshft_
Definition PBtools.h:682
#define zsyr_
Definition PBtools.h:735
#define casymv_
Definition PBtools.h:721
#define zmmcadd_
Definition PBtools.h:631
void PB_CpswapNN()
#define cvvdotc_
Definition PBtools.h:688
#define smmcadd_
Definition PBtools.h:628
void PB_Cpgeadd()
void PB_Cdescset()
void PB_COutV()
void PB_Cplaprn2()
#define zmmddat_
Definition PBtools.h:653
#define cmmadd_
Definition PBtools.h:619
#define cset_
Definition PBtools.h:665
#define cmmddac_
Definition PBtools.h:646
void PB_Cplasca2()
#define smmadd_
Definition PBtools.h:617
#define immdda_
Definition PBtools.h:638
PBTYP_T * PB_Citypeset()
void PB_CpsymmBC()
void PB_Ctzher()
#define stzscal_
Definition PBtools.h:703
void PB_CpsymmAB()
#define cmmtadd_
Definition PBtools.h:625
#define zvvdotc_
Definition PBtools.h:690
#define smmddact_
Definition PBtools.h:655
Int PB_CVMnpq()
void PB_CpdotND()
void PB_CargFtoC()
void PB_Ctzsyr()
#define cmmtcadd_
Definition PBtools.h:635
void PB_CptrsmAB0()
#define dmmtcadd_
Definition PBtools.h:634
void PB_Cptrsv()
#define zhescal_
Definition PBtools.h:709
void PB_Ctzher2k()
void PB_Cptrsm()
PBTYP_T * PB_Cctypeset()
#define ctzcnjg_
Definition PBtools.h:711
#define cvvdotu_
Definition PBtools.h:689
void PB_Ctzsyr2()
Int PB_Clcm()
void PB_Ctzsyrk()
#define zatrmv_
Definition PBtools.h:729
void PB_CpgemmAB()
#define csyr_
Definition PBtools.h:734
void PB_Cainfog2l()
#define zasymv_
Definition PBtools.h:722
#define dascal_
Definition PBtools.h:674
PBTYP_T * PB_Cdtypeset()
void PB_CpgemmAC()
#define immddat_
Definition PBtools.h:649
void PB_CpswapND()
Int PB_Cindxg2p()
Int PB_Cg2lrem()
#define dmmcadd_
Definition PBtools.h:629
char * PB_Cgetbuf()
#define dmmtadd_
Definition PBtools.h:624
void PB_CpgemmBC()
#define scshft_
Definition PBtools.h:676
#define dmmddat_
Definition PBtools.h:651
#define smmtcadd_
Definition PBtools.h:633
void PB_Cpsyr2()
#define csymv_
Definition PBtools.h:731
#define ctzpad_
Definition PBtools.h:695
#define ztzpadcpy_
Definition PBtools.h:701
void PB_Ctzahemv()
#define zcshft_
Definition PBtools.h:679
Int PB_CVMloc()
#define dtzpadcpy_
Definition PBtools.h:699
#define zmmddact_
Definition PBtools.h:658
#define dagemv_
Definition PBtools.h:715
#define svasum_
Definition PBtools.h:668
void PB_Cconjg()
#define ctzpadcpy_
Definition PBtools.h:700
#define dtzscal_
Definition PBtools.h:704
Int PB_CVMswp()
#define zagemv_
Definition PBtools.h:717
#define dmmadd_
Definition PBtools.h:618
void PB_CpaxpbyNN()
Int PB_Cnpreroc()
#define ctzscal_
Definition PBtools.h:705
#define dmmddac_
Definition PBtools.h:645
#define scvasum_
Definition PBtools.h:670
#define stzpadcpy_
Definition PBtools.h:698
void PB_Cprnt()
void PB_CptrsmAB()
#define sasymv_
Definition PBtools.h:719
#define dset_
Definition PBtools.h:664
void PB_CVMcontig()
#define sagemv_
Definition PBtools.h:714
void PB_Cpaxpby()
Int PB_Cspan()
void PB_Cdescribe()
#define srshft_
Definition PBtools.h:681
#define zmmdda_
Definition PBtools.h:642
#define smmtadd_
Definition PBtools.h:623
#define immtadd_
Definition PBtools.h:622
#define dcshft_
Definition PBtools.h:677
void PB_Cpsyr2kAC()
#define sset_
Definition PBtools.h:663