Amesos Package Browser (Single Doxygen Collection) Development
amesos_cholmod_template.h
Go to the documentation of this file.
00001 /* ========================================================================== */
00002 /* === Include/cholmod_template.h =========================================== */
00003 /* ========================================================================== */
00004 
00005 /* -------------------------------------------------------------------------- */
00006 /* undefine current xtype macros, and then define macros for current type */
00007 /* -------------------------------------------------------------------------- */
00008 
00009 #undef TEMPLATE
00010 #undef XTYPE
00011 #undef XTYPE2
00012 #undef XTYPE_OK
00013 #undef ENTRY_IS_NONZERO
00014 #undef ENTRY_IS_ZERO
00015 #undef ENTRY_IS_ONE
00016 #undef IMAG_IS_NONZERO
00017 
00018 #undef ASSEMBLE
00019 #undef ASSIGN
00020 #undef ASSIGN_CONJ
00021 #undef ASSIGN2
00022 #undef ASSIGN2_CONJ
00023 #undef ASSIGN_REAL
00024 #undef MULT
00025 #undef MULTADD
00026 #undef ADD
00027 #undef ADD_REAL
00028 #undef MULTSUB
00029 #undef MULTADDCONJ
00030 #undef MULTSUBCONJ
00031 #undef LLDOT
00032 #undef CLEAR
00033 #undef DIV
00034 #undef DIV_REAL
00035 #undef MULT_REAL
00036 #undef CLEAR_IMAG
00037 #undef LDLDOT
00038 #undef PREFIX
00039 
00040 #undef ENTRY_SIZE
00041 
00042 #undef XPRINT0
00043 #undef XPRINT1
00044 #undef XPRINT2
00045 #undef XPRINT3
00046 
00047 /* -------------------------------------------------------------------------- */
00048 /* pattern */
00049 /* -------------------------------------------------------------------------- */
00050 
00051 
00052 #ifdef PATTERN
00053 
00054 #define PREFIX            amesos_p_
00055 #define TEMPLATE(name)          P_TEMPLATE(name)
00056 #define XTYPE           CHOLMOD_PATTERN
00057 #define XTYPE2            CHOLMOD_REAL
00058 #define XTYPE_OK(type)          (TRUE)
00059 #define ENTRY_IS_NONZERO(ax,az,q)     (TRUE)
00060 #define ENTRY_IS_ZERO(ax,az,q)        (FALSE)
00061 #define ENTRY_IS_ONE(ax,az,q)       (TRUE)
00062 #define IMAG_IS_NONZERO(ax,az,q)      (FALSE)
00063 #define ENTRY_SIZE          0
00064 
00065 #define ASSEMBLE(x,z,p,ax,az,q)
00066 #define ASSIGN(x,z,p,ax,az,q)
00067 #define ASSIGN_CONJ(x,z,p,ax,az,q)
00068 #define ASSIGN2(x,z,p,ax,az,q)        P_ASSIGN2(x,z,p,ax,az,q)
00069 #define ASSIGN2_CONJ(x,z,p,ax,az,q)     P_ASSIGN2(x,z,p,ax,az,q)
00070 #define ASSIGN_REAL(x,p,ax,q)
00071 #define MULT(x,z,p,ax,az,q,bx,bz,pb)
00072 #define MULTADD(x,z,p,ax,az,q,bx,bz,pb)
00073 #define ADD(x,z,p,ax,az,q,bx,bz,pb)
00074 #define ADD_REAL(x,p, ax,q, bx,r)
00075 #define MULTSUB(x,z,p,ax,az,q,bx,bz,pb)
00076 #define MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb)
00077 #define MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb)
00078 #define LLDOT(x,p,ax,az,q)
00079 #define CLEAR(x,z,p)
00080 #define CLEAR_IMAG(x,z,p)
00081 #define DIV(x,z,p,ax,az,q)
00082 #define DIV_REAL(x,z,p, ax,az,q, bx,r)
00083 #define MULT_REAL(x,z,p, ax,az,q, bx,r)
00084 #define LDLDOT(x,p, ax,az,q, bx,r)
00085 
00086 #define XPRINT0(x,z,p)          P_PRINT(0,x,z,p)
00087 #define XPRINT1(x,z,p)          P_PRINT(1,x,z,p)
00088 #define XPRINT2(x,z,p)          P_PRINT(2,x,z,p)
00089 #define XPRINT3(x,z,p)          P_PRINT(3,x,z,p)
00090 
00091 /* -------------------------------------------------------------------------- */
00092 /* real */
00093 /* -------------------------------------------------------------------------- */
00094 
00095 #elif defined (REAL)
00096 
00097 #define PREFIX            amesos_r_
00098 #define TEMPLATE(name)          R_TEMPLATE(name)
00099 #define XTYPE           CHOLMOD_REAL
00100 #define XTYPE2            CHOLMOD_REAL
00101 #define XTYPE_OK(type)          R_XTYPE_OK(type)
00102 #define ENTRY_IS_NONZERO(ax,az,q)     R_IS_NONZERO(ax,az,q)
00103 #define ENTRY_IS_ZERO(ax,az,q)        R_IS_ZERO(ax,az,q)
00104 #define ENTRY_IS_ONE(ax,az,q)       R_IS_ONE(ax,az,q)
00105 #define IMAG_IS_NONZERO(ax,az,q)      (FALSE)
00106 #define ENTRY_SIZE          1
00107 
00108 #define ASSEMBLE(x,z,p,ax,az,q)       R_ASSEMBLE(x,z,p,ax,az,q) 
00109 #define ASSIGN(x,z,p,ax,az,q)       R_ASSIGN(x,z,p,ax,az,q)
00110 #define ASSIGN_CONJ(x,z,p,ax,az,q)      R_ASSIGN(x,z,p,ax,az,q)
00111 #define ASSIGN2(x,z,p,ax,az,q)        R_ASSIGN(x,z,p,ax,az,q)
00112 #define ASSIGN2_CONJ(x,z,p,ax,az,q)     R_ASSIGN(x,z,p,ax,az,q)
00113 #define ASSIGN_REAL(x,p,ax,q)       R_ASSIGN_REAL(x,p,ax,q)
00114 #define MULT(x,z,p,ax,az,q,bx,bz,pb)      R_MULT(x,z,p,ax,az,q,bx,bz,pb)
00115 #define MULTADD(x,z,p,ax,az,q,bx,bz,pb)     R_MULTADD(x,z,p,ax,az,q,bx,bz,pb)
00116 #define ADD(x,z,p,ax,az,q,bx,bz,pb)     R_ADD(x,z,p,ax,az,q,bx,bz,pb)
00117 #define ADD_REAL(x,p, ax,q, bx,r)     R_ADD_REAL(x,p, ax,q, bx,r)
00118 #define MULTSUB(x,z,p,ax,az,q,bx,bz,pb)     R_MULTSUB(x,z,p,ax,az,q,bx,bz,pb)
00119 #define MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb) \
00120     R_MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb)
00121 #define MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb) \
00122     R_MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb)
00123 #define LLDOT(x,p,ax,az,q)        R_LLDOT(x,p,ax,az,q)
00124 #define CLEAR(x,z,p)          R_CLEAR(x,z,p) 
00125 #define CLEAR_IMAG(x,z,p)       R_CLEAR_IMAG(x,z,p) 
00126 #define DIV(x,z,p,ax,az,q)        R_DIV(x,z,p,ax,az,q)
00127 #define DIV_REAL(x,z,p, ax,az,q, bx,r)      R_DIV_REAL(x,z,p, ax,az,q, bx,r)
00128 #define MULT_REAL(x,z,p, ax,az,q, bx,r)     R_MULT_REAL(x,z,p, ax,az,q, bx,r)
00129 #define LDLDOT(x,p, ax,az,q, bx,r)      R_LDLDOT(x,p, ax,az,q, bx,r)
00130 
00131 #define XPRINT0(x,z,p)          R_PRINT(0,x,z,p)
00132 #define XPRINT1(x,z,p)          R_PRINT(1,x,z,p)
00133 #define XPRINT2(x,z,p)          R_PRINT(2,x,z,p)
00134 #define XPRINT3(x,z,p)          R_PRINT(3,x,z,p)
00135 
00136 /* -------------------------------------------------------------------------- */
00137 /* complex */
00138 /* -------------------------------------------------------------------------- */
00139 
00140 #elif defined (COMPLEX)
00141 
00142 #define PREFIX            amesos_c_
00143 
00144 #ifdef NCONJUGATE
00145 #define TEMPLATE(name)          CT_TEMPLATE(name)
00146 #else
00147 #define TEMPLATE(name)          C_TEMPLATE(name)
00148 #endif
00149 
00150 #define ASSEMBLE(x,z,p,ax,az,q)       C_ASSEMBLE(x,z,p,ax,az,q) 
00151 #define ASSIGN(x,z,p,ax,az,q)       C_ASSIGN(x,z,p,ax,az,q)
00152 #define ASSIGN_CONJ(x,z,p,ax,az,q)      C_ASSIGN_CONJ(x,z,p,ax,az,q)
00153 #define ASSIGN2(x,z,p,ax,az,q)        C_ASSIGN(x,z,p,ax,az,q)
00154 #define ASSIGN2_CONJ(x,z,p,ax,az,q)     C_ASSIGN_CONJ(x,z,p,ax,az,q)
00155 #define ASSIGN_REAL(x,p,ax,q)       C_ASSIGN_REAL(x,p,ax,q)
00156 #define XTYPE           CHOLMOD_COMPLEX
00157 #define XTYPE2            CHOLMOD_COMPLEX
00158 #define XTYPE_OK(type)          C_XTYPE_OK(type)
00159 #define ENTRY_IS_NONZERO(ax,az,q)     C_IS_NONZERO(ax,az,q)
00160 #define ENTRY_IS_ZERO(ax,az,q)        C_IS_ZERO(ax,az,q)
00161 #define ENTRY_IS_ONE(ax,az,q)       C_IS_ONE(ax,az,q)
00162 #define IMAG_IS_NONZERO(ax,az,q)      C_IMAG_IS_NONZERO(ax,az,q)
00163 #define ENTRY_SIZE          2
00164 
00165 #define MULTADD(x,z,p,ax,az,q,bx,bz,pb)     C_MULTADD(x,z,p,ax,az,q,bx,bz,pb)
00166 #define MULT(x,z,p,ax,az,q,bx,bz,pb)      C_MULT(x,z,p,ax,az,q,bx,bz,pb)
00167 #define ADD(x,z,p,ax,az,q,bx,bz,pb)     C_ADD(x,z,p,ax,az,q,bx,bz,pb)
00168 #define ADD_REAL(x,p, ax,q, bx,r)     C_ADD_REAL(x,p, ax,q, bx,r)
00169 #define MULTSUB(x,z,p,ax,az,q,bx,bz,pb)     C_MULTSUB(x,z,p,ax,az,q,bx,bz,pb)
00170 #define MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb) \
00171     C_MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb)
00172 #define MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb) \
00173     C_MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb)
00174 #define LLDOT(x,p,ax,az,q)        C_LLDOT(x,p,ax,az,q)
00175 #define CLEAR(x,z,p)          C_CLEAR(x,z,p) 
00176 #define CLEAR_IMAG(x,z,p)       C_CLEAR_IMAG(x,z,p) 
00177 #define DIV(x,z,p,ax,az,q)        C_DIV(x,z,p,ax,az,q)
00178 #define DIV_REAL(x,z,p, ax,az,q, bx,r)      C_DIV_REAL(x,z,p, ax,az,q, bx,r)
00179 #define MULT_REAL(x,z,p, ax,az,q, bx,r)     C_MULT_REAL(x,z,p, ax,az,q, bx,r)
00180 #define LDLDOT(x,p, ax,az,q, bx,r)      C_LDLDOT(x,p, ax,az,q, bx,r)
00181 
00182 #define XPRINT0(x,z,p)          C_PRINT(0,x,z,p)
00183 #define XPRINT1(x,z,p)          C_PRINT(1,x,z,p)
00184 #define XPRINT2(x,z,p)          C_PRINT(2,x,z,p)
00185 #define XPRINT3(x,z,p)          C_PRINT(3,x,z,p)
00186 
00187 /* -------------------------------------------------------------------------- */
00188 /* zomplex */
00189 /* -------------------------------------------------------------------------- */
00190 
00191 #elif defined (ZOMPLEX)
00192 
00193 #define PREFIX            amesos_z_
00194 
00195 #ifdef NCONJUGATE
00196 #define TEMPLATE(name)          ZT_TEMPLATE(name)
00197 #else
00198 #define TEMPLATE(name)          Z_TEMPLATE(name)
00199 #endif
00200 
00201 #define ASSEMBLE(x,z,p,ax,az,q)       Z_ASSEMBLE(x,z,p,ax,az,q) 
00202 #define ASSIGN(x,z,p,ax,az,q)       Z_ASSIGN(x,z,p,ax,az,q)
00203 #define ASSIGN_CONJ(x,z,p,ax,az,q)      Z_ASSIGN_CONJ(x,z,p,ax,az,q)
00204 #define ASSIGN2(x,z,p,ax,az,q)        Z_ASSIGN(x,z,p,ax,az,q)
00205 #define ASSIGN2_CONJ(x,z,p,ax,az,q)     Z_ASSIGN_CONJ(x,z,p,ax,az,q)
00206 #define ASSIGN_REAL(x,p,ax,q)       Z_ASSIGN_REAL(x,p,ax,q)
00207 #define XTYPE           CHOLMOD_ZOMPLEX
00208 #define XTYPE2            CHOLMOD_ZOMPLEX
00209 #define XTYPE_OK(type)          Z_XTYPE_OK(type)
00210 #define ENTRY_IS_NONZERO(ax,az,q)     Z_IS_NONZERO(ax,az,q)
00211 #define ENTRY_IS_ZERO(ax,az,q)        Z_IS_ZERO(ax,az,q)
00212 #define ENTRY_IS_ONE(ax,az,q)       Z_IS_ONE(ax,az,q)
00213 #define IMAG_IS_NONZERO(ax,az,q)      Z_IMAG_IS_NONZERO(ax,az,q)
00214 #define ENTRY_SIZE          1
00215 
00216 #define MULTADD(x,z,p,ax,az,q,bx,bz,pb)     Z_MULTADD(x,z,p,ax,az,q,bx,bz,pb)
00217 #define MULT(x,z,p,ax,az,q,bx,bz,pb)      Z_MULT(x,z,p,ax,az,q,bx,bz,pb)
00218 #define ADD(x,z,p,ax,az,q,bx,bz,pb)     Z_ADD(x,z,p,ax,az,q,bx,bz,pb)
00219 #define ADD_REAL(x,p, ax,q, bx,r)     Z_ADD_REAL(x,p, ax,q, bx,r)
00220 #define MULTSUB(x,z,p,ax,az,q,bx,bz,pb)     Z_MULTSUB(x,z,p,ax,az,q,bx,bz,pb)
00221 #define MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb) \
00222     Z_MULTADDCONJ(x,z,p,ax,az,q,bx,bz,pb)
00223 #define MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb) \
00224     Z_MULTSUBCONJ(x,z,p,ax,az,q,bx,bz,pb)
00225 #define LLDOT(x,p,ax,az,q)        Z_LLDOT(x,p,ax,az,q)
00226 #define CLEAR(x,z,p)          Z_CLEAR(x,z,p) 
00227 #define CLEAR_IMAG(x,z,p)       Z_CLEAR_IMAG(x,z,p) 
00228 #define DIV(x,z,p,ax,az,q)        Z_DIV(x,z,p,ax,az,q)
00229 #define DIV_REAL(x,z,p, ax,az,q, bx,r)      Z_DIV_REAL(x,z,p, ax,az,q, bx,r)
00230 #define MULT_REAL(x,z,p, ax,az,q, bx,r)     Z_MULT_REAL(x,z,p, ax,az,q, bx,r)
00231 #define LDLDOT(x,p, ax,az,q, bx,r)      Z_LDLDOT(x,p, ax,az,q, bx,r)
00232 
00233 #define XPRINT0(x,z,p)          Z_PRINT(0,x,z,p)
00234 #define XPRINT1(x,z,p)          Z_PRINT(1,x,z,p)
00235 #define XPRINT2(x,z,p)          Z_PRINT(2,x,z,p)
00236 #define XPRINT3(x,z,p)          Z_PRINT(3,x,z,p)
00237 
00238 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines