ScaLAPACK 2.1  2.1
ScaLAPACK: Scalable Linear Algebra PACKage
PB_Cconjg.c
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------
2 *
3 * -- PBLAS auxiliary routine (version 2.0) --
4 * University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5 * and University of California, Berkeley.
6 * April 1, 1998
7 *
8 * ---------------------------------------------------------------------
9 */
10 /*
11 * Include files
12 */
13 #include "../pblas.h"
14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
18 
19 #ifdef __STDC__
20 void PB_Cconjg( PBTYP_T * TYPE, char * ALPHA, char * CALPHA )
21 #else
22 void PB_Cconjg( TYPE, ALPHA, CALPHA )
23 /*
24 * .. Scalar Arguments ..
25 */
26  char * ALPHA, * CALPHA;
27  PBTYP_T * TYPE;
28 #endif
29 {
30 /*
31 * Purpose
32 * =======
33 *
34 * PB_Cconjg conjugates of the scalar alpha.
35 *
36 * Arguments
37 * =========
38 *
39 * TYPE (local input) pointer to a PBTYP_T structure
40 * On entry, TYPE is a pointer to a structure of type PBTYP_T,
41 * that contains type information (See pblas.h).
42 *
43 * ALPHA (local input) pointer to CHAR
44 * On entry, ALPHA specifies the scalar alpha.
45 *
46 * CALPHA (local output) pointer to CHAR
47 * On exit, CALPHA contains the conjugate of the scalar alpha.
48 *
49 * -- Written on April 1, 1998 by
50 * Antoine Petitet, University of Tennessee, Knoxville 37996, USA.
51 *
52 * ---------------------------------------------------------------------
53 */
54 /* ..
55 * .. Executable Statements ..
56 *
57 */
58  switch( TYPE->type )
59  {
60  case SCPLX:
61  ((float*)(CALPHA))[REAL_PART] = ((float*)(ALPHA))[REAL_PART];
62  ((float*)(CALPHA))[IMAG_PART] = -((float*)(ALPHA))[IMAG_PART];
63  break;
64  case DCPLX:
65  ((double*)(CALPHA))[REAL_PART] = ((double*)(ALPHA))[REAL_PART];
66  ((double*)(CALPHA))[IMAG_PART] = -((double*)(ALPHA))[IMAG_PART];
67  break;
68  case SREAL:
69  ((float*)(CALPHA))[REAL_PART] = ((float*)(ALPHA))[REAL_PART];
70  break;
71  case DREAL:
72  ((double*)(CALPHA))[REAL_PART] = ((double*)(ALPHA))[REAL_PART];
73  break;
74  case INT:
75  *((int*)(CALPHA)) = *((int*)(ALPHA));
76  break;
77  default: ;
78  }
79 /*
80 * End of PB_Cconjg
81 */
82 }
PB_Cconjg
void PB_Cconjg(PBTYP_T *TYPE, char *ALPHA, char *CALPHA)
Definition: PB_Cconjg.c:22
TYPE
#define TYPE
Definition: clamov.c:7
REAL_PART
#define REAL_PART
Definition: pblas.h:135
DCPLX
#define DCPLX
Definition: pblas.h:472
INT
#define INT
Definition: pblas.h:468
SREAL
#define SREAL
Definition: pblas.h:469
DREAL
#define DREAL
Definition: pblas.h:470
PBTYP_T
Definition: pblas.h:325
IMAG_PART
#define IMAG_PART
Definition: pblas.h:136
SCPLX
#define SCPLX
Definition: pblas.h:471