#include #include #include #include "libnumarray.h" #ifdef MS_WIN32 #pragma warning(once : 4244) #endif #define logical_and(arg1, arg2) (arg1 != 0) & (arg2 != 0) #define logical_or(arg1, arg2) (arg1 != 0) | (arg2 != 0) #define logical_xor(arg1, arg2) ((arg1 != 0) ^ (arg2 != 0)) & 1 #define ufmaximum(arg1, arg2) (((temp1=arg1) > (temp2=arg2)) ? temp1 : temp2) #define ufminimum(arg1, arg2) (((temp1=arg1) < (temp2=arg2)) ? temp1 : temp2) #define distance3d(x,y,z) sqrt(x*x + y*y + z*z) static double c_bessel(double x, double y) { double x2=x*x, y2=y*y, diff=x2-y2; return diff*diff/(x2+y2); } static UInt8 c_bar(UInt32 x ) { return (x >> 24) & 0xFF; } extern int airy ( double x, double *ai, double *aip, double *bi, double *bip ); static int bar_uxb_vxf(long niter, long ninargs, long noutargs, void **buffers, long *bsizes) { long i; UInt32 *tin0 = (UInt32 *) buffers[0]; UInt8 *tout0 = (UInt8 *) buffers[1]; BEGIN_THREADS for (i=0; i