Update of /cvsroot/pure-data/externals/iem/iem_adaptfilt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14783
Modified Files: NLMSCC~.c NLMS~.c iemlib.h n_CLNLMS~.c n_CNLMS~.c Log Message: some t_int to int
Index: NLMS~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iem_adaptfilt/src/NLMS~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NLMS~.c 11 Jan 2007 17:40:10 -0000 1.1 --- NLMS~.c 8 Nov 2007 13:56:44 -0000 1.2 *************** *** 50,54 **** static t_float *NLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! t_int n_points; t_garray *a; t_float *vec; --- 50,54 ---- static t_float *NLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! int n_points; t_garray *a; t_float *vec;
Index: n_CNLMS~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iem_adaptfilt/src/n_CNLMS~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** n_CNLMS~.c 11 Jan 2007 17:40:10 -0000 1.1 --- n_CNLMS~.c 8 Nov 2007 13:56:44 -0000 1.2 *************** *** 68,72 **** static t_float *n_CNLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! t_int n_points; t_garray *a; t_float *vec; --- 68,72 ---- static t_float *n_CNLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! int n_points; t_garray *a; t_float *vec; *************** *** 389,393 **** t_n_CNLMS_tilde *x = (t_n_CNLMS_tilde *)pd_new(n_CNLMS_tilde_class); char buffer[400]; ! t_int i, n_order=39, n_io=1; t_symbol *w_name; t_float beta=0.1f; --- 389,394 ---- t_n_CNLMS_tilde *x = (t_n_CNLMS_tilde *)pd_new(n_CNLMS_tilde_class); char buffer[400]; ! int i; ! t_int n_order=39, n_io=1; t_symbol *w_name; t_float beta=0.1f;
Index: iemlib.h =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iem_adaptfilt/src/iemlib.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** iemlib.h 17 Jan 2007 18:28:56 -0000 1.2 --- iemlib.h 8 Nov 2007 13:56:44 -0000 1.3 *************** *** 2,6 **** * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
#ifndef __IEMLIB_H__ --- 2,6 ---- * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#ifndef __IEMLIB_H__ *************** *** 16,21 **** #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
! #ifdef NT int sys_noloadbang; //t_symbol *iemgui_key_sym=0; --- 16,26 ---- #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
+ /* now miller's code starts : + for 4 point interpolation + for lookup tables + for denormal floats + */
! #ifdef MSW int sys_noloadbang; //t_symbol *iemgui_key_sym=0; *************** *** 31,72 **** #define SAMPBLK 4
- #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
! /* machine-dependent definitions. These ifdefs really ! should have been by CPU type and not by operating system! */ #ifdef IRIX ! /* big-endian. Most significant byte is at low address in memory */ #define HIOFFSET 0 /* word offset to find MSB */ #define LOWOFFSET 1 /* word offset to find LSB */ #define int32 long /* a data type that has 32 bits */ ! #else #ifdef MSW ! /* little-endian; most significant byte is at highest address */ #define HIOFFSET 1 #define LOWOFFSET 0 #define int32 long ! #else ! #ifdef __FreeBSD__ #include <machine/endian.h> - #if BYTE_ORDER == LITTLE_ENDIAN - #define HIOFFSET 1 - #define LOWOFFSET 0 - #else - #define HIOFFSET 0 /* word offset to find MSB */ - #define LOWOFFSET 1 /* word offset to find LSB */ - #endif /* BYTE_ORDER */ - #include <sys/types.h> - #define int32 int32_t #endif - #ifdef __linux__
#include <endian.h>
! #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) #error No byte order defined #endif
! #if __BYTE_ORDER == __LITTLE_ENDIAN #define HIOFFSET 1 #define LOWOFFSET 0 --- 36,71 ---- #define SAMPBLK 4
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
! /* machine-dependent definitions. These ifdefs really ! should have been by CPU type and not by operating system! */ #ifdef IRIX ! /* big-endian. Most significant byte is at low address in memory */ #define HIOFFSET 0 /* word offset to find MSB */ #define LOWOFFSET 1 /* word offset to find LSB */ #define int32 long /* a data type that has 32 bits */ ! #endif /* IRIX */ ! #ifdef MSW ! /* little-endian; most significant byte is at highest address */ #define HIOFFSET 1 #define LOWOFFSET 0 #define int32 long ! #endif /* MSW */ ! ! #if defined(__FreeBSD__) || defined(__APPLE__) #include <machine/endian.h> #endif
+ #ifdef __linux__ #include <endian.h> + #endif
! #if defined(__unix__) || defined(__APPLE__) ! #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) #error No byte order defined #endif
! #if BYTE_ORDER == LITTLE_ENDIAN #define HIOFFSET 1 #define LOWOFFSET 0 *************** *** 75,99 **** #define LOWOFFSET 1 /* word offset to find LSB */ #endif /* __BYTE_ORDER */ - #include <sys/types.h> #define int32 int32_t
! #else ! #ifdef __APPLE__ ! #ifdef __BIG_ENDIAN__ ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #else ! #define HIOFFSET 1 /* word offset to find MSB */ ! #define LOWOFFSET 0 /* word offset to find LSB */ ! #endif ! #define int32 int /* a data type that has 32 bits */ ! ! #endif /* __APPLE__ */ ! #endif /* __linux__ */ ! #endif /* MSW */ ! #endif /* SGI */ ! ! union tabfudge { double tf_d; --- 74,82 ---- #define LOWOFFSET 1 /* word offset to find LSB */ #endif /* __BYTE_ORDER */ #include <sys/types.h> #define int32 int32_t + #endif /* __unix__ or __APPLE__*/
! union tabfudge_d { double tf_d; *************** *** 101,104 **** --- 84,93 ---- };
+ union tabfudge_f + { + float tf_f; + long tf_l; + }; + #if defined __i386__ || defined __x86_64__ #define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
Index: n_CLNLMS~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iem_adaptfilt/src/n_CLNLMS~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** n_CLNLMS~.c 11 Jan 2007 17:40:10 -0000 1.1 --- n_CLNLMS~.c 8 Nov 2007 13:56:44 -0000 1.2 *************** *** 69,73 **** static t_float *n_CLNLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! t_int n_points; t_garray *a; t_float *vec; --- 69,73 ---- static t_float *n_CLNLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! int n_points; t_garray *a; t_float *vec; *************** *** 400,404 **** t_n_CLNLMS_tilde *x = (t_n_CLNLMS_tilde *)pd_new(n_CLNLMS_tilde_class); char buffer[400]; ! t_int i, n_order=39, n_io=1; t_symbol *w_name; t_float beta=0.1f; --- 400,405 ---- t_n_CLNLMS_tilde *x = (t_n_CLNLMS_tilde *)pd_new(n_CLNLMS_tilde_class); char buffer[400]; ! int i; ! t_int n_order=39, n_io=1; t_symbol *w_name; t_float beta=0.1f;
Index: NLMSCC~.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iem_adaptfilt/src/NLMSCC~.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NLMSCC~.c 11 Jan 2007 17:40:10 -0000 1.1 --- NLMSCC~.c 8 Nov 2007 13:56:44 -0000 1.2 *************** *** 22,26 **** /* ----------------------- NLMSCC~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ ! /* -- with Coefficient Constraint /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ --- 22,26 ---- /* ----------------------- NLMSCC~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ ! /* -- with Coefficient Constraint -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ *************** *** 62,66 **** static t_float *NLMSCC_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! t_int n_points; t_garray *a; t_float *vec; --- 62,66 ---- static t_float *NLMSCC_tilde_check_array(t_symbol *array_sym_name, t_int length) { ! int n_points; t_garray *a; t_float *vec;