[PD-cvs] pd/src m_simd.h,1.1.4.1.2.1.2.2,1.1.4.1.2.1.2.3

Mathieu Bouchard matju at users.sourceforge.net
Wed Jul 11 20:17:58 CEST 2007


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

Modified Files:
      Tag: desiredata
	m_simd.h 
Log Message:
fixed problems of previous commit.


Index: m_simd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/m_simd.h,v
retrieving revision 1.1.4.1.2.1.2.2
retrieving revision 1.1.4.1.2.1.2.3
diff -C2 -d -r1.1.4.1.2.1.2.2 -r1.1.4.1.2.1.2.3
*** m_simd.h	11 Jul 2007 17:41:05 -0000	1.1.4.1.2.1.2.2
--- m_simd.h	11 Jul 2007 18:17:56 -0000	1.1.4.1.2.1.2.3
***************
*** 11,27 ****
  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 */
  
      /* This is used when there's no implementation of SIMD code for the current platform and/or compiler */
      /* These are the functions that can be coded for SIMD */
--- 11,35 ----
  void testaddvec_8(t_float *dst,const t_float *src,int n);
  
+ #define SIMD_BYTEALIGN (128/8)
+ 
  /* 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__))
! #ifdef SIMD_SSE /* Intel SSE with GNU C */ /* ought to add this in configure.in */
! t_int *sigwrap_perf_simd(t_int *w);
! void line_tilde_slope_simd(t_float* out, t_int n, t_float* value, t_float* slopes, t_float* slopestep);
! float env_tilde_accum_simd(t_float* in, t_float* hp, t_int n);
! t_int* sigsqrt_perf_simd(t_int *w);
! t_int* sigrsqrt_perf_simd(t_int *w);
! float peakvec_simd(t_float* vec, t_int n, t_float cur_max);
! #endif
! 
! //#if defined(__GNUC__) && defined(__POWERPC__) && defined(__ALTIVEC__)
! #ifdef SIMD_ALTIVEC /* Altivec with GNU C  ( -faltivec must be given as a compiler option! ) */ /* ought to add this in configure.in */
      #include "m_simd_ve_gcc.h"
! #endif
  
+ #ifdef DONTUSESIMD
      /* This is used when there's no implementation of SIMD code for the current platform and/or compiler */
      /* These are the functions that can be coded for SIMD */
***************
*** 52,60 ****
      /* #define sum_vecsimd                sumvec_8 */
  #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())
--- 60,68 ----
      /* #define sum_vecsimd                sumvec_8 */
  #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())





More information about the Pd-cvs mailing list