[PD-cvs] externals/grill/flext/source flsimd.cpp,1.20,1.21

Thomas Grill xovo at users.sourceforge.net
Fri Sep 2 01:29:55 CEST 2005


Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13886/source

Modified Files:
	flsimd.cpp 
Log Message:
fixed severe Altivec bug


Index: flsimd.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsimd.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** flsimd.cpp	12 Mar 2005 04:56:34 -0000	1.20
--- flsimd.cpp	1 Sep 2005 23:29:52 -0000	1.21
***************
*** 336,343 ****
      vector unsigned char permuteVector = vec_lvsl( 0, (int*) v );
      vector unsigned char low = vec_ld( 0, v );
!     vector unsigned char high = vec_ld( 16, v );
      return vec_perm( low, high, permuteVector );
  }
  
  //! Store a vector to an unaligned location in memory
  inline void StoreUnaligned( vector unsigned char v, vector unsigned char *where)
--- 336,344 ----
      vector unsigned char permuteVector = vec_lvsl( 0, (int*) v );
      vector unsigned char low = vec_ld( 0, v );
!     vector unsigned char high = vec_ld( 15, v );
      return vec_perm( low, high, permuteVector );
  }
  
+ /*
  //! Store a vector to an unaligned location in memory
  inline void StoreUnaligned( vector unsigned char v, vector unsigned char *where)
***************
*** 362,365 ****
--- 363,367 ----
      vec_st( high, 16, where );
  }
+ */
  
  inline vector float LoadUnaligned(const float *v )
***************
*** 368,375 ****
--- 370,379 ----
  }
  
+ /*
  inline void StoreUnaligned( vector float v,float *where)
  {
      return StoreUnaligned((vector unsigned char)v,(vector unsigned char *)where);
  }
+ */
  
  inline bool IsVectorAligned(const void *where) 
***************
*** 404,408 ****
  inline vector float LoadValue(const float &f)
  {
!     return IsVectorAligned(&f)?vec_splat(vec_ld(0,(vector float *)&f),0):LoadUnaligned(&f);
  }
  #endif
--- 408,412 ----
  inline vector float LoadValue(const float &f)
  {
!     return vec_splat(IsVectorAligned(&f)?vec_ld(0,(vector float *)&f):LoadUnaligned(&f),0);
  }
  #endif





More information about the Pd-cvs mailing list