algebramix_doc 0.3
|
00001 00002 /****************************************************************************** 00003 * MODULE : matrix_int.hpp 00004 * DESCRIPTION: matrices over hardware integers 00005 * COPYRIGHT : (C) 2009 Gregoire Lecerf 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_INT_HPP 00014 #define __MMX_MATRIX_INT_HPP 00015 #include <algebramix/vector_unrolled.hpp> 00016 #include <algebramix/vector_simd.hpp> 00017 #include <algebramix/matrix_strassen.hpp> 00018 #include <algebramix/matrix_threads.hpp> 00019 #include <algebramix/matrix_simd.hpp> 00020 namespace mmx { 00021 00022 /****************************************************************************** 00023 * Roughly 'optimized' variants for an '__SSE2__' Intel processor 00024 ******************************************************************************/ 00025 00026 DEFINE_VARIANT_1 (typename I, I, matrix_int_simd, 00027 matrix_strassen< 00028 typename Matrix_simd_variant(I) >) 00029 00030 DEFINE_VARIANT (matrix_int, 00031 matrix_strassen< 00032 matrix_unrolled<16> >) 00033 00034 STMPL 00035 struct matrix_variant_helper<signed char> { 00036 typedef matrix_int_simd<signed char> MV; }; 00037 STMPL 00038 struct matrix_variant_helper<unsigned char> { 00039 typedef matrix_int_simd<unsigned char> MV; }; 00040 STMPL 00041 struct matrix_variant_helper<short int> { 00042 typedef matrix_int_simd<short int> MV; }; 00043 STMPL 00044 struct matrix_variant_helper<unsigned short int> { 00045 typedef matrix_int_simd<unsigned short int> MV; }; 00046 STMPL 00047 struct matrix_variant_helper<int> { 00048 typedef matrix_int MV; }; 00049 STMPL 00050 struct matrix_variant_helper<unsigned int> { 00051 typedef matrix_int MV; }; 00052 STMPL 00053 struct matrix_variant_helper<long int> { 00054 typedef matrix_int MV; }; 00055 STMPL 00056 struct matrix_variant_helper<unsigned long int> { 00057 typedef matrix_int MV; }; 00058 STMPL 00059 struct matrix_variant_helper<long long int> { 00060 typedef matrix_int MV; }; 00061 STMPL 00062 struct matrix_variant_helper<unsigned long long int> { 00063 typedef matrix_int MV; }; 00064 } 00065 #endif // __MMX_MATRIX_INT_HPP