00001
00002
00003
00004
00005 #ifndef CoinAbcCommonFactorization_H
00006 #define CoinAbcCommonFactorization_H
00007
00008
00009
00010
00011
00012
00013 #include "CoinAbcCommon.hpp"
00014
00015
00016
00017 #define INITIAL_AVERAGE 1.0
00018 #define INITIAL_AVERAGE2 1.0
00019 #define AVERAGE_SCALE_BACK 0.8
00020
00021 #ifndef SWITCHABLE_STATISTICS
00022 #define setStatistics(x)
00023 #define factorizationStatistics() (true)
00024 #else
00025 #define setStatistics(x) collectStatistics_=x
00026 #define factorizationStatistics() (collectStatistics_)
00027 #endif
00028 #include "CoinAbcDenseFactorization.hpp"
00029 class CoinPackedMatrix;
00030 class CoinFactorization;
00031 #define FACTORIZATION_STATISTICS 0 //1
00032 typedef struct {
00033 double countInput_;
00034 double countAfterL_;
00035 double countAfterR_;
00036 double countAfterU_;
00037 double averageAfterL_;
00038 double averageAfterR_;
00039 double averageAfterU_;
00040 #if FACTORIZATION_STATISTICS
00041 double twiddleFactor1_;
00042 double twiddleFactor2_;
00043 #endif
00044 CoinSimplexInt numberCounts_;
00045 } CoinAbcStatistics;
00046 #if FACTORIZATION_STATISTICS
00047 #define twiddleFactor1S() (statistics.twiddleFactor1_)
00048 #define twiddleFactor2S() (statistics.twiddleFactor2_)
00049 #define twiddleFtranFactor1() (ftranTwiddleFactor1_)
00050 #define twiddleFtranFTFactor1() (ftranFTTwiddleFactor1_)
00051 #define twiddleBtranFactor1() (btranTwiddleFactor1_)
00052 #define twiddleFtranFactor2() (ftranTwiddleFactor2_)
00053 #define twiddleFtranFTFactor2() (ftranFTTwiddleFactor2_)
00054 #define twiddleBtranFactor2() (btranTwiddleFactor2_)
00055 #define twiddleBtranFullFactor1() (btranFullTwiddleFactor1_)
00056 #else
00057 #define twiddleFactor1S() (1.0)
00058 #define twiddleFactor2S() (1.0)
00059 #define twiddleFtranFactor1() (1.0)
00060 #define twiddleFtranFTFactor1() (1.0)
00061 #define twiddleBtranFactor1() (1.0)
00062 #define twiddleFtranFactor2() (1.0)
00063 #define twiddleFtranFTFactor2() (1.0)
00064 #define twiddleBtranFactor2() (1.0)
00065 #define twiddleBtranFullFactor1() (1.0)
00066 #endif
00067 #define ABC_FAC_GOT_LCOPY 4
00068 #define ABC_FAC_GOT_RCOPY 8
00069 #define ABC_FAC_GOT_UCOPY 16
00070 #define ABC_FAC_GOT_SPARSE 32
00071 typedef struct {
00072 CoinBigIndex next;
00073 CoinBigIndex start;
00074 CoinSimplexUnsignedInt stack;
00075 } CoinAbcStack;
00076 void CoinAbcDgetrs(char trans,int m, double * a, double * work);
00077 int CoinAbcDgetrf(int m, int n, double * a, int lda, int * ipiv
00078 #if ABC_PARALLEL==2
00079 ,int parallelMode
00080 #endif
00081 );
00082 void CoinAbcDgetrs(char trans,int m, long double * a, long double * work);
00083 int CoinAbcDgetrf(int m, int n, long double * a, int lda, int * ipiv
00084 #if ABC_PARALLEL==2
00085 ,int parallelMode
00086 #endif
00087 );
00088 #define SWAP_FACTOR 2
00089 #define BLOCKING8 8
00090 #define BLOCKING8X8 BLOCKING8*BLOCKING8
00091 #endif