00001 00002 /****************************************************************************** 00003 * MODULE : matrix_double.hpp 00004 * DESCRIPTION: matrices with (complex) double coefficients 00005 * COPYRIGHT : (C) 2007 Joris van der Hoeven 00006 ******************************************************************************* 00007 * This software falls under the GNU general public license and comes WITHOUT 00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details. 00009 * If you don't have this file, write to the Free Software Foundation, Inc., 00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00011 ******************************************************************************/ 00012 00013 #ifndef __MMX_MATRIX_DOUBLE_HPP 00014 #define __MMX_MATRIX_DOUBLE_HPP 00015 #include <numerix/complex_double.hpp> 00016 #include <algebramix/vector_unrolled.hpp> 00017 #include <algebramix/vector_simd.hpp> 00018 #include <algebramix/matrix_strassen.hpp> 00019 #include <algebramix/matrix_threads.hpp> 00020 #include <algebramix/matrix_simd.hpp> 00021 #include <algebramix/matrix_complex.hpp> 00022 namespace mmx { 00023 00024 /****************************************************************************** 00025 * Variant 00026 ******************************************************************************/ 00027 00028 DEFINE_VARIANT (matrix_double, 00029 matrix_strassen< 00030 matrix_threads< 00031 Matrix_simd_variant(double)> >) 00032 00033 STMPL 00034 struct matrix_variant_helper<double> { 00035 typedef matrix_double MV; 00036 }; 00037 00038 /****************************************************************************** 00039 * Pivoting strategy for doubles 00040 ******************************************************************************/ 00041 00042 STMPL 00043 struct pivot_helper<double> { 00044 static inline bool 00045 better (const double& x1, const double& x2) { 00046 return abs (x1) > abs (x2); } 00047 }; 00048 00049 STMPL 00050 struct pivot_helper<complex<double> > { 00051 static inline bool 00052 better (const complex<double>& x1, const complex<double>& x2) { 00053 return abs (x1) > abs (x2); } 00054 }; 00055 00056 } 00057 #endif // __MMX_MATRIX_DOUBLE_HPP