[PD-cvs] externals/grill/flext/source flattr.cpp,1.28,1.29 flbuf.cpp,1.22,1.23 flmeth.cpp,1.13,1.14 flsimd.cpp,1.18,1.19 flsupport.cpp,1.43,1.44

Thomas Grill xovo at users.sourceforge.net
Thu Mar 10 05:56:44 CET 2005


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

Modified Files:
	flattr.cpp flbuf.cpp flmeth.cpp flsimd.cpp flsupport.cpp 
Log Message:
new lock-free lifo and fifo
fixed buggy unbinding of receive symbols
no more static assignment of symbols (problems with Metrowerks)
fixed bugs in SIMD code for non-power-of-2 lengths
Max: use high-priority click instead of qelem for message-posting
added method for clicks into object box


Index: flsimd.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsimd.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** flsimd.cpp	27 Jan 2005 04:57:26 -0000	1.18
--- flsimd.cpp	10 Mar 2005 04:56:40 -0000	1.19
***************
*** 430,436 ****
  
          int n = cnt>>4;
-         cnt -= n<<4;
- 
          if(!n) goto zero;
  
          __asm {
--- 430,435 ----
  
          int n = cnt>>4;
          if(!n) goto zero;
+         cnt -= n<<4;
  
          __asm {
***************
*** 536,540 ****
              }
          }
! zero:
          while(cnt--) *(dst++) = *(src++); 
      }
--- 535,541 ----
              }
          }
! 
!         src += n<<4,dst += n<<4;
! zero:   
          while(cnt--) *(dst++) = *(src++); 
      }
***************
*** 750,755 ****
  
          int n = cnt>>4;
-         cnt -= n<<4;
          if(!n) goto zero;
  
          __asm {
--- 751,756 ----
  
          int n = cnt>>4;
          if(!n) goto zero;
+         cnt -= n<<4;
  
          __asm {
***************
*** 788,791 ****
--- 789,794 ----
              }
          }
+ 
+         dst += n<<4;
  zero:
          while(cnt--) *(dst++) = s; 
***************
*** 831,837 ****
  
          int n = cnt>>4;
-         cnt -= n<<4;
- 
          if(!n) goto zero;
  
          __asm {
--- 834,839 ----
  
          int n = cnt>>4;
          if(!n) goto zero;
+         cnt -= n<<4;
  
          __asm {
***************
*** 906,909 ****
--- 908,913 ----
              }
          }
+ 
+         src += n<<4,dst += n<<4;
  zero:
          while(cnt--) *(dst++) = *(src++)*op; 
***************
*** 965,971 ****
          // single precision
          int n = cnt>>4;
-         cnt -= n<<4;
- 
          if(!n) goto zero;
  
          __asm {
--- 969,974 ----
          // single precision
          int n = cnt>>4;
          if(!n) goto zero;
+         cnt -= n<<4;
  
          __asm {
***************
*** 1134,1137 ****
--- 1137,1142 ----
              }
          }
+ 
+         src += n<<4,dst += n<<4,op += n<<4;
  zero:
          while(cnt--) *(dst++) = *(src++) * *(op++); 
***************
*** 1195,1198 ****
--- 1200,1204 ----
          // single precision
          int n = cnt>>4;
+         if(!n) goto zero;
          cnt -= n<<4;
  
***************
*** 1268,1271 ****
--- 1274,1279 ----
              }
          }
+         src += n<<4,dst += n<<4,op += n<<4;
+ zero:
          while(cnt--) *(dst++) = *(src++)+op; 
      }
***************
*** 1331,1334 ****
--- 1339,1343 ----
          // single precision
          int n = cnt>>4;
+         if(!n) goto zero;
          cnt -= n<<4;
  
***************
*** 1489,1492 ****
--- 1498,1504 ----
              }
          }
+ 
+         src += n<<4,dst += n<<4,op += n<<4;
+ zero:
          while(cnt--) *(dst++) = *(src++) + *(op++); 
      }
***************
*** 1551,1554 ****
--- 1563,1567 ----
          // single precision
          int n = cnt>>4;
+         if(!n) goto zero;
          cnt -= n<<4;
  
***************
*** 1634,1637 ****
--- 1647,1653 ----
              }
          }
+ 
+         src += n<<4,dst += n<<4;
+ zero:
          while(cnt--) *(dst++) = *(src++)*opmul+opadd; 
      }
***************
*** 1677,1680 ****
--- 1693,1697 ----
          // single precision
          int n = cnt>>4;
+         if(!n) goto zero;
          cnt -= n<<4;
  
***************
*** 1774,1777 ****
--- 1791,1797 ----
              }
          }
+ 
+         src += n<<4,dst += n<<4,opadd += n<<4;
+ zero:
          while(cnt--) *(dst++) = *(src++) * opmul + *(opadd++); 
      }
***************
*** 1829,1832 ****
--- 1849,1853 ----
          // single precision
          int n = cnt>>4;
+         if(!n) goto zero;
          cnt -= n<<4;
  
***************
*** 1939,1942 ****
--- 1960,1965 ----
              }
          }
+         src += n<<4,dst += n<<4,opmul += n<<4,opadd += n<<4;
+ zero:
          while(cnt--) *(dst++) = *(src++) * *(opmul++) + *(opadd++); 
      }

Index: flsupport.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** flsupport.cpp	28 Jan 2005 04:57:18 -0000	1.43
--- flsupport.cpp	10 Mar 2005 04:56:41 -0000	1.44
***************
*** 35,40 ****
--- 35,46 ----
  #if FLEXT_SYS != FLEXT_SYS_JMAX
  const t_symbol *flext::sym_anything = NULL;
+ 
+ const t_symbol *sym_buffer = NULL;
+ const t_symbol *sym_size = NULL;
  #endif
  
+ const t_symbol *sym_attributes = NULL;
+ const t_symbol *sym_methods = NULL;
+ 
  
  int flext::Version() { return FLEXT_VERSION; }
***************
*** 68,71 ****
--- 74,80 ----
  	sym_anything = gensym("anything");
  	sym_signal = gensym("signal");
+ 
+     sym_buffer = flext::MakeSymbol("buffer~");
+     sym_size = flext::MakeSymbol("size");
  #elif FLEXT_SYS == FLEXT_SYS_JMAX
  	sym__ = fts_new_symbol("");; // is there a static symbol for that?
***************
*** 79,82 ****
--- 88,94 ----
  #endif
  
+     sym_attributes = flext::MakeSymbol("attributes");
+     sym_methods = flext::MakeSymbol("methods");
+ 
  #ifdef FLEXT_THREADS
  	thrid = GetThreadId();

Index: flattr.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flattr.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** flattr.cpp	26 Jan 2005 05:01:24 -0000	1.28
--- flattr.cpp	10 Mar 2005 04:56:40 -0000	1.29
***************
*** 169,177 ****
  }
  
- static const t_symbol *sym_attributes = flext::MakeSymbol("attributes");
- 
  bool flext_base::ListAttrib() const
  {
      if(procattr) {
  		AtomList la;
  		ListAttrib(la);
--- 169,178 ----
  }
  
  bool flext_base::ListAttrib() const
  {
      if(procattr) {
+         // defined in flsupport.cpp
+         extern const t_symbol *sym_attributes;
+ 
  		AtomList la;
  		ListAttrib(la);

Index: flbuf.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbuf.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** flbuf.cpp	11 Jan 2005 04:58:12 -0000	1.22
--- flbuf.cpp	10 Mar 2005 04:56:40 -0000	1.23
***************
*** 29,34 ****
  
  #if FLEXT_SYS == FLEXT_SYS_MAX
! static const t_symbol *sym_buffer = NULL;
! static const t_symbol *sym_size = NULL;
  #endif
  
--- 29,34 ----
  
  #if FLEXT_SYS == FLEXT_SYS_MAX
! // defined in flsupport.cpp
! extern const t_symbol *sym_buffer,*sym_size;
  #endif
  
***************
*** 43,53 ****
      ticking = false;
      tick = clock_new(this,(t_method)cb_tick);
- #elif FLEXT_SYS == FLEXT_SYS_MAX
-     // for some strange reasons (maybe only on Mac) 
-     // static initializations are not processed
-     if(!sym_buffer) {
-         sym_buffer = flext::MakeSymbol("buffer~");
- 	    sym_size = flext::MakeSymbol("size");
-     }
  #endif
  
--- 43,46 ----

Index: flmeth.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmeth.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** flmeth.cpp	26 Jan 2005 05:01:58 -0000	1.13
--- flmeth.cpp	10 Mar 2005 04:56:40 -0000	1.14
***************
*** 123,131 ****
  }
  
- static const t_symbol *sym_methods = flext::MakeSymbol("methods");
- 
  bool flext_base::cb_ListMethods(flext_base *c,int argc,const t_atom *argv) 
  { 
      if(c->procattr && (argc == 0 || (argc == 1 && CanbeInt(argv[0])))) {
          int inlet = argc?GetAInt(argv[0]):0;
          AtomList la;
--- 123,132 ----
  }
  
  bool flext_base::cb_ListMethods(flext_base *c,int argc,const t_atom *argv) 
  { 
      if(c->procattr && (argc == 0 || (argc == 1 && CanbeInt(argv[0])))) {
+         // defined in flsupport.cpp
+         extern const t_symbol *sym_methods;
+ 
          int inlet = argc?GetAInt(argv[0]):0;
          AtomList la;





More information about the Pd-cvs mailing list