[PD-cvs] pd/src m_simd.h, 1.1.4.1.2.1, 1.1.4.1.2.1.2.1 m_simd_sse_gcc.h, 1.1.4.8, NONE

Mathieu Bouchard matju at users.sourceforge.net
Wed Jul 11 19:38:36 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10227

Modified Files:
      Tag: desiredata
	m_simd.h 
Removed Files:
      Tag: desiredata
	m_simd_sse_gcc.h 
Log Message:
removed m_simd_sse_gcc.h (content is already in m_pd.h since a long time)


Index: m_simd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/m_simd.h,v
retrieving revision 1.1.4.1.2.1
retrieving revision 1.1.4.1.2.1.2.1
diff -C2 -d -r1.1.4.1.2.1 -r1.1.4.1.2.1.2.1
*** m_simd.h	19 Jul 2006 10:04:59 -0000	1.1.4.1.2.1
--- m_simd.h	11 Jul 2007 17:38:34 -0000	1.1.4.1.2.1.2.1
***************
*** 1,7 ****
! /* 
!     Definitions for SIMD functionality
!     added by T.Grill
! */
! 
  #ifndef __M_SIMD_H
  #define __M_SIMD_H
--- 1,3 ----
! /* Definitions for SIMD functionality; added by T.Grill */
  #ifndef __M_SIMD_H
  #define __M_SIMD_H
***************
*** 15,72 ****
  void testaddvec_8(t_float *dst,const t_float *src,int n);
  
! #ifdef DONTUSESIMD
! 
! /*     if SIMD shouldn't be used the checks will always return false */
!     #define SIMD_CHKCNT(n) ( 0 )
!     #define SIMD_CHKALIGN(ptr) ( 0 )
! 
!     #undef SIMD_BYTEALIGN
! 
!     #include "m_simd_def.h"
! 
  #else
! 
!     /* how many floats do we calculate in the loop of a SIMD codelet? */
!     #define SIMD_BLOCK 16  /* must be a power of 2 */
! 
!     #if defined(_MSC_VER) && defined(_M_IX86)  /* Visual C++ on Intel */
!         /* alignment for Intel SSE */
!         #define SIMD_BYTEALIGN (128/8)   /* align to 128 bits */
! 
!         #include "m_simd_sse_vc.h"
! 
!     #elif defined(__GNUC__)  && (defined(_X86_) || defined(__i386__) || defined(__i586__) || defined(__i686__) )
!         /* Intel SSE with GNU C */
!         #define SIMD_BYTEALIGN (128/8)   /* align to 128 bits */
! 
!         #include "m_simd_sse_gcc.h"
! 
!     #elif defined(__GNUC__) && defined(__POWERPC__) && defined(__ALTIVEC__)
!         /* Altivec with GNU C  ( -faltivec must be given as a compiler option! ) */
!         #define SIMD_BYTEALIGN (128/8)   /* align to 128 bits */
! 
!         #include "m_simd_ve_gcc.h"  
! 
!     #else
!         /* default */
! 
!         #define SIMD_BYTEALIGN (128/8)   /* assume 128 bits */
!         #include "m_simd_def.h"
!     #endif
! 
!     /* check if n meets the requirements for SIMD codelets */
!     #define SIMD_CHKCNT(n) ( ((n)&(SIMD_BLOCK-1)) == 0 )
!     /* check if a pointer is correctly aligned for SIMD codelets */
!     #define SIMD_CHKALIGN(ptr) ( ((size_t)(ptr) & (SIMD_BYTEALIGN-1)) == 0 )
! 
  #endif
  
  /* check n and 1 pointer at once */
! #define SIMD_CHECK1(n,ptr1) ( SIMD_CHKCNT(n) && SIMD_CHKALIGN(ptr1) && simd_runtime_check())
  /* check n and 2 pointers at once */
! #define SIMD_CHECK2(n,ptr1,ptr2) ( SIMD_CHKCNT(n) && SIMD_CHKALIGN(ptr1) && SIMD_CHKALIGN(ptr2) && simd_runtime_check() )
  /* check n and 3 pointers at once */
! #define SIMD_CHECK3(n,ptr1,ptr2,ptr3) ( SIMD_CHKCNT(n) && SIMD_CHKALIGN(ptr1) && SIMD_CHKALIGN(ptr2) && SIMD_CHKALIGN(ptr3) && simd_runtime_check() )
! 
  
  /* T.Grill - bit alignment for signal vectors (must be a multiple of 8!) */
--- 11,39 ----
  void testaddvec_8(t_float *dst,const t_float *src,int n);
  
! /* how many floats do we calculate in the loop of a SIMD codelet? */
! #define SIMD_BLOCK 16  /* must be a power of 2 */
! #if defined(__GNUC__)  && (defined(_X86_) || defined(__i386__) || defined(__i586__) || defined(__i686__))
!     /* Intel SSE with GNU C */
!     #define SIMD_BYTEALIGN (128/8)   /* align to 128 bits */
! #elif defined(__GNUC__) && defined(__POWERPC__) && defined(__ALTIVEC__)
!     /* Altivec with GNU C  ( -faltivec must be given as a compiler option! ) */
!     #define SIMD_BYTEALIGN (128/8)   /* align to 128 bits */
!     #include "m_simd_ve_gcc.h"
  #else
!     /* default */
!     #define SIMD_BYTEALIGN (128/8)   /* assume 128 bits */
!     #include "m_simd_def.h"
  #endif
+ /* check if n meets the requirements for SIMD codelets */
+ #define SIMD_CHKCNT(n) ( ((n)&(SIMD_BLOCK-1)) == 0 )
+ /* check if a pointer is correctly aligned for SIMD codelets */
+ #define SIMD_CHKALIGN(ptr) ( ((size_t)(ptr) & (SIMD_BYTEALIGN-1)) == 0 )
  
  /* check n and 1 pointer at once */
! #define SIMD_CHECK1(n,ptr1) (SIMD_CHKCNT(n) && SIMD_CHKALIGN(ptr1) && simd_runtime_check())
  /* check n and 2 pointers at once */
! #define SIMD_CHECK2(n,ptr1,ptr2) (SIMD_CHKCNT(n) && SIMD_CHKALIGN(ptr1) && SIMD_CHKALIGN(ptr2) && simd_runtime_check())
  /* check n and 3 pointers at once */
! #define SIMD_CHECK3(n,ptr1,ptr2,ptr3) (SIMD_CHKCNT(n) && SIMD_CHKALIGN(ptr1) && SIMD_CHKALIGN(ptr2) && SIMD_CHKALIGN(ptr3) && simd_runtime_check())
  
  /* T.Grill - bit alignment for signal vectors (must be a multiple of 8!) */

--- m_simd_sse_gcc.h DELETED ---





More information about the Pd-cvs mailing list