Connecting Tech Pros Worldwide Help | Site Map

MPI + Parallelization of Image Processing + First Class Functions

Member
 
Join Date: Apr 2008
Location: Philippines
Posts: 35
#1: Aug 14 '09
Hi! I'm working on my undergraduate thesis on the Parallel Image Processing. This deals with optimizing a library my professor gave me and implement MPI (Message Passing Interface) on it (it is in C/C++ by the way). I can easily hard-code functions in the language, and then using the MPI functions to parallelize it.

My problem comes in when, for instance a user would like to make his/her own functions. I would need to pass the function as first-class functions - which i don't know if it can be done with C/C++) - and then maybe modify it along the way. any ideas on how to do this?
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Aug 14 '09

re: MPI + Parallelization of Image Processing + First Class Functions


Quote:

Originally Posted by jrhitokiri View Post

Hi! I'm working on my undergraduate thesis on the Parallel Image Processing. This deals with optimizing a library my professor gave me and implement MPI (Message Passing Interface) on it (it is in C/C++ by the way). I can easily hard-code functions in the language, and then using the MPI functions to parallelize it.

My problem comes in when, for instance a user would like to make his/her own functions. I would need to pass the function as first-class functions - which i don't know if it can be done with C/C++) - and then maybe modify it along the way. any ideas on how to do this?

The user either has to do it the way you do it: write their functions in C, compile and link it, set up the MPI stuff and run it. The other end is an interpreter: the user types a function definition, MPI compiles it to an itermediate form, MPI distrubutes it over the cooperating machines and all computers interpret that code. I don't think there'll be much speed increase then and writing an interpreter is not a trivial task. Maybe you can automate the first scenario using 'make' and its compadres.

kind regards,

Jos
Reply