diff options
-rw-r--r-- | externals/grill/flext/flext.vcproj | 1 | ||||
-rw-r--r-- | externals/grill/flext/source/flattr.cpp | 5 | ||||
-rw-r--r-- | externals/grill/flext/source/flbuf.cpp | 11 | ||||
-rwxr-xr-x | externals/grill/flext/source/flmeth.cpp | 5 | ||||
-rwxr-xr-x | externals/grill/flext/source/flsimd.cpp | 39 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.cpp | 12 |
6 files changed, 52 insertions, 21 deletions
diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj index b948179c..b110ed08 100644 --- a/externals/grill/flext/flext.vcproj +++ b/externals/grill/flext/flext.vcproj @@ -233,6 +233,7 @@ PrecompiledHeaderThrough="flext.h" WarningLevel="3" SuppressStartupBanner="TRUE" + DebugInformationFormat="3" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> diff --git a/externals/grill/flext/source/flattr.cpp b/externals/grill/flext/source/flattr.cpp index c1a98ecf..a7e35b18 100644 --- a/externals/grill/flext/source/flattr.cpp +++ b/externals/grill/flext/source/flattr.cpp @@ -168,11 +168,12 @@ bool flext_base::InitAttrib(int argc,const t_atom *argv) return true; } -static const t_symbol *sym_attributes = flext::MakeSymbol("attributes"); - bool flext_base::ListAttrib() const { if(procattr) { + // defined in flsupport.cpp + extern const t_symbol *sym_attributes; + AtomList la; ListAttrib(la); ToOutAnything(GetOutAttr(),sym_attributes,la.Count(),la.Atoms()); diff --git a/externals/grill/flext/source/flbuf.cpp b/externals/grill/flext/source/flbuf.cpp index 1d2ff839..4aafacfe 100644 --- a/externals/grill/flext/source/flbuf.cpp +++ b/externals/grill/flext/source/flbuf.cpp @@ -28,8 +28,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif #if FLEXT_SYS == FLEXT_SYS_MAX -static const t_symbol *sym_buffer = NULL; -static const t_symbol *sym_size = NULL; +// defined in flsupport.cpp +extern const t_symbol *sym_buffer,*sym_size; #endif flext::buffer::buffer(const t_symbol *bn,bool delayed): @@ -42,13 +42,6 @@ flext::buffer::buffer(const t_symbol *bn,bool delayed): isdirty = false; 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 if(bn) Set(bn,delayed); diff --git a/externals/grill/flext/source/flmeth.cpp b/externals/grill/flext/source/flmeth.cpp index 4eceb612..5de2083a 100755 --- a/externals/grill/flext/source/flmeth.cpp +++ b/externals/grill/flext/source/flmeth.cpp @@ -122,11 +122,12 @@ void flext_base::ListMethods(AtomList &la,int inlet) const SetSymbol(la[ix++],it.data()); } -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])))) { + // defined in flsupport.cpp + extern const t_symbol *sym_methods; + int inlet = argc?GetAInt(argv[0]):0; AtomList la; c->ListMethods(la,inlet); diff --git a/externals/grill/flext/source/flsimd.cpp b/externals/grill/flext/source/flsimd.cpp index fdb9c2d2..efeae6e3 100755 --- a/externals/grill/flext/source/flsimd.cpp +++ b/externals/grill/flext/source/flsimd.cpp @@ -429,9 +429,8 @@ void flext::CopySamples(t_sample *dst,const t_sample *src,int cnt) // single precision int n = cnt>>4; - cnt -= n<<4; - if(!n) goto zero; + cnt -= n<<4; __asm { mov eax,dword ptr [src] @@ -535,7 +534,9 @@ loopuu: } } } -zero: + + src += n<<4,dst += n<<4; +zero: while(cnt--) *(dst++) = *(src++); } else @@ -749,8 +750,8 @@ void flext::SetSamples(t_sample *dst,int cnt,t_sample s) // single precision int n = cnt>>4; - cnt -= n<<4; if(!n) goto zero; + cnt -= n<<4; __asm { movss xmm0,xmmword ptr [s] @@ -787,6 +788,8 @@ loopu: loop loopu } } + + dst += n<<4; zero: while(cnt--) *(dst++) = s; } @@ -830,9 +833,8 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) __m128 a = _mm_load1_ps(&op); int n = cnt>>4; - cnt -= n<<4; - if(!n) goto zero; + cnt -= n<<4; __asm { mov eax,dword ptr [src] @@ -905,6 +907,8 @@ loopu: loop loopu } } + + src += n<<4,dst += n<<4; zero: while(cnt--) *(dst++) = *(src++)*op; } @@ -964,9 +968,8 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int if(GetSIMDCapabilities()&simd_sse) { // single precision int n = cnt>>4; - cnt -= n<<4; - if(!n) goto zero; + cnt -= n<<4; __asm { mov eax,[src] @@ -1133,6 +1136,8 @@ loopuu: } } } + + src += n<<4,dst += n<<4,op += n<<4; zero: while(cnt--) *(dst++) = *(src++) * *(op++); } @@ -1194,6 +1199,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) if(GetSIMDCapabilities()&simd_sse) { // single precision int n = cnt>>4; + if(!n) goto zero; cnt -= n<<4; __asm { @@ -1267,6 +1273,8 @@ loopu: loop loopu } } + src += n<<4,dst += n<<4,op += n<<4; +zero: while(cnt--) *(dst++) = *(src++)+op; } else @@ -1330,6 +1338,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int // single precision int n = cnt>>4; + if(!n) goto zero; cnt -= n<<4; if(VectorsAligned(src,dst)) { @@ -1488,6 +1497,9 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int } } } + + src += n<<4,dst += n<<4,op += n<<4; +zero: while(cnt--) *(dst++) = *(src++) + *(op++); } else @@ -1550,6 +1562,7 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,t_samp if(GetSIMDCapabilities()&simd_sse) { // single precision int n = cnt>>4; + if(!n) goto zero; cnt -= n<<4; __asm { @@ -1633,6 +1646,9 @@ loopu: loop loopu } } + + src += n<<4,dst += n<<4; +zero: while(cnt--) *(dst++) = *(src++)*opmul+opadd; } else @@ -1676,6 +1692,7 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,const if(GetSIMDCapabilities()&simd_sse) { // single precision int n = cnt>>4; + if(!n) goto zero; cnt -= n<<4; __asm { @@ -1773,6 +1790,9 @@ loopu: loop loopu } } + + src += n<<4,dst += n<<4,opadd += n<<4; +zero: while(cnt--) *(dst++) = *(src++) * opmul + *(opadd++); } else @@ -1828,6 +1848,7 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,const t_sample *opmul if(GetSIMDCapabilities()&simd_sse) { // single precision int n = cnt>>4; + if(!n) goto zero; cnt -= n<<4; __asm { @@ -1938,6 +1959,8 @@ loopu: loop loopu } } + src += n<<4,dst += n<<4,opmul += n<<4,opadd += n<<4; +zero: while(cnt--) *(dst++) = *(src++) * *(opmul++) + *(opadd++); } else diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index 2748c0d1..86187025 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -34,8 +34,14 @@ const t_symbol *flext::sym_signal = NULL; #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; } const char *flext::VersionStr() { return FLEXT_VERSTR; } @@ -67,6 +73,9 @@ void flext::Setup() sym_list = gensym("list"); 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? sym_int = fts_s_int; @@ -78,6 +87,9 @@ void flext::Setup() #else #endif + sym_attributes = flext::MakeSymbol("attributes"); + sym_methods = flext::MakeSymbol("methods"); + #ifdef FLEXT_THREADS thrid = GetThreadId(); StartHelper(); |