numerix_doc 0.4
/Users/mourrain/Devel/mmx/numerix/include/numerix/simd.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : simd.hpp
00004 * DESCRIPTION: General support for SIMD instructions
00005 * COPYRIGHT  : (C) 2007  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_SIMD_HPP
00014 #define __MMX_SIMD_HPP
00015 #include <basix/fast_new.hpp>
00016 #include <numerix/numerix-config.hpp>
00017 
00018 #if ! (defined (NUMERIX_HAVE_STDINT_H) && defined (MMX_ENABLE_FAST_ALLOCATORS))
00019 #undef NUMERIX_ENABLE_SIMD
00020 #endif
00021 
00022 /******************************************************************************
00023 * Default simd helpers
00024 ******************************************************************************/
00025 
00026 namespace mmx {
00027 
00028 template<typename C> struct simd_helper {
00029   typedef C type;
00030   static const nat size = 1; };
00031 
00032 template<typename C> struct simd_base_helper {
00033   typedef C type; };
00034 
00035 #define Simd_type(C) simd_helper<C>::type
00036 #define Simd_size(C) simd_helper<C>::size
00037 #define Simd_base_type(C) simd_base_helper<C>::type
00038 
00039 } // namespace mmx
00040 
00041 #endif // __MMX_SIMD_HPP
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines