26 Nov 2011 13:11
interfacing libpano and numpy
Hi group! I'm doing some work on hugin's python interface, in the course of which I have experimentally introduced some code into libpano which might you might find interesting. I've described what I've done in http://groups.google.com/group/hugin-ptx/browse_thread/thread/19b059cf02bb3b6b# I think that there might be more code in libpano which would benefit from vectorization. The coding involved isn't a big deal, but the performance gains can be substantial. My proposed new routine would live in math.c: // KFJ 2011-11-23 // this function transforms many coordinates at once. // The coordinates to be transformed are passed via the pointers // x_dest and y_dest, and the result of the transformation is // stored in the memory pointed to by x_src and y_src. // all vectors have to have space for count doubles. // Memory pointed to by x_dest and y_dest will only be // read, not written to. // params points to a stack of fDesc structures, which // defines the order, type and additional parameters // of the partial transformations. int v_execute_stack_new ( double* x_dest, // x coordinates destination double* y_dest, // y coordinates destination double* x_src, // x coordinates source double* y_src, // y coordinates source int count, // number of coordinates void* params ) // pointer to vector of fDesc {(Continue reading)
RSS Feed