algebramix_doc 0.3
|
00001 00002 /****************************************************************************** 00003 * MODULE : kronecker_int.hpp 00004 * DESCRIPTION: Multiplication of integer polynomials 00005 * COPYRIGHT : (C) 2009 Joris van der Hoeven and 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_KRONECKER_INT_HPP 00014 #define __MMX_KRONECKER_INT_HPP 00015 #include <numerix/integer.hpp> 00016 00017 namespace mmx { 00018 00019 /****************************************************************************** 00020 * Low level Kronecker multiplication for hardware integers 00021 ******************************************************************************/ 00022 00023 #define DECLARE_HELPER(I) \ 00024 void encode_kronecker (integer& dest, const I* src, nat n, xnat bits); \ 00025 void decode_kronecker (I* dest, nat n, xnat bits, const integer& src); \ 00026 void mul_kronecker (I* dest, const I* src1, nat n1, const I* src2, nat n2); \ 00027 void square_kronecker (I* dest, const I* src1, nat n1); 00028 DECLARE_HELPER(signed char) 00029 DECLARE_HELPER(unsigned char) 00030 DECLARE_HELPER(short int) 00031 DECLARE_HELPER(unsigned short int) 00032 DECLARE_HELPER(int) 00033 DECLARE_HELPER(unsigned int) 00034 DECLARE_HELPER(long int) 00035 DECLARE_HELPER(unsigned long int) 00036 DECLARE_HELPER(long long int) 00037 DECLARE_HELPER(unsigned long long int) 00038 #undef DECLARE_HELPER 00039 00040 } // namespace mmx 00041 #endif // __MMX_KRONECKER_INT_HPP