1 #ifndef _SCIPY_PRIVATE_SIGNAL_SIGTOOLS_H_ 2 #define _SCIPY_PRIVATE_SIGNAL_SIGTOOLS_H_ 3 4 #include "Python.h" 5 6 #define BOUNDARY_MASK 12 7 #define OUTSIZE_MASK 3 8 #define FLIP_MASK 16 9 #define TYPE_MASK (32+64+128+256+512) 10 #define TYPE_SHIFT 5 11 12 #define FULL 2 13 #define SAME 1 14 #define VALID 0 15 16 #define CIRCULAR 8 17 #define REFLECT 4 18 #define PAD 0 19 20 #define MAXTYPES 21 21 22 23 /* Generally useful structures for passing data into and out of 24 subroutines. Used in the generic routines instead of the 25 Python Specific structures so that the routines can be easily 26 grabbed and used in another scripting language */ 27 28 typedef struct { 29 char *data; 30 int elsize; 31 } Generic_ptr; 32 33 typedef struct { 34 char *data; 35 npy_intp numels; 36 int elsize; 37 char *zero; /* Pointer to Representation of zero */ 38 } Generic_Vector; 39 40 typedef struct { 41 char *data; 42 int nd; 43 npy_intp *dimensions; 44 int elsize; 45 npy_intp *strides; 46 char *zero; /* Pointer to Representation of zero */ 47 } Generic_Array; 48 49 typedef void (MultAddFunction) (char *, npy_intp, char *, npy_intp, char *, 50 npy_intp *, npy_intp *, int, npy_intp, int, 51 npy_intp *, npy_intp *, npy_uintp *); 52 53 PyObject* 54 scipy_signal_sigtools_linear_filter(PyObject * NPY_UNUSED(dummy), PyObject * args); 55 56 PyObject* 57 scipy_signal_sigtools_correlateND(PyObject *NPY_UNUSED(dummy), PyObject *args); 58 59 void 60 scipy_signal_sigtools_linear_filter_module_init(void); 61 62 /* 63 static int index_out_of_bounds(int *, int *, int ); 64 static long compute_offsets (unsigned long *, long *, int *, int *, int *, int *, int); 65 static int increment(int *, int, int *); 66 static void convolveND(Generic_Array *, Generic_Array *, Generic_Array *, MultAddFunction *, int); 67 static void RawFilter(Generic_Vector, Generic_Vector, Generic_Array, Generic_Array, Generic_Array *, Generic_Array *, BasicFilterFunction *, int); 68 */ 69 70 #endif 71