00001
00011
00012
00013
00014 #ifndef __SUPERLU_DCOMPLEX
00015 #define __SUPERLU_DCOMPLEX
00016
00017 #include <mpi.h>
00018
00019 typedef struct { double r, i; } doublecomplex;
00020
00021
00022
00023
00024
00025
00026 extern MPI_Datatype SuperLU_MPI_DOUBLE_COMPLEX;
00027
00028
00029
00030
00032 #define z_add(c, a, b) { (c)->r = (a)->r + (b)->r; \
00033 (c)->i = (a)->i + (b)->i; }
00034
00036 #define z_sub(c, a, b) { (c)->r = (a)->r - (b)->r; \
00037 (c)->i = (a)->i - (b)->i; }
00038
00040 #define zd_mult(c, a, b) { (c)->r = (a)->r * (b); \
00041 (c)->i = (a)->i * (b); }
00042
00044 #define zz_mult(c, a, b) { \
00045 double cr, ci; \
00046 cr = (a)->r * (b)->r - (a)->i * (b)->i; \
00047 ci = (a)->i * (b)->r + (a)->r * (b)->i; \
00048 (c)->r = cr; \
00049 (c)->i = ci; \
00050 }
00051
00053 #define z_eq(a, b) ( (a)->r == (b)->r && (a)->i == (b)->i )
00054
00055
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059
00060
00061 void slud_z_div(doublecomplex *, doublecomplex *, doublecomplex *);
00062 double slud_z_abs(doublecomplex *);
00063 double slud_z_abs1(doublecomplex *);
00064
00065
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069
00070
00071 #endif