: $Id: wrap.mod,v 1.1 2010/12/21 19:56:41 samn Exp $ NEURON { THREADSAFE SUFFIX wrap GLOBAL INSTALLED GLOBAL verbose } PARAMETER { INSTALLED=0 verbose=0 } VERBATIM #include #include double* wrap(double* x,int n,int flen){ double* y = (double*) calloc(n,sizeof(double)); int i,j=0; for(i=flen/2+1;i vsz) { printf("wraparound ERRA: invalid filter len %d > vector len %d!\n",fsz,vsz); return 0; } y = wrap(x,vsz,fsz); for(i=0;i