Hi everyone,

I'm struggling with a particular c++ assignment. We're asked to parallelize a sequential task that uses the boost library to detect edges in a given image, but I just can't seem to get the datatypes to work properly. I am using c++ threads to paralleize.

In the x_gradient_par.h file, a function x_gradient() is declared. x_gradient() creates a variable number of threads which then perform edge detection on the different segments of the source image. The assignment uses templates heavily and I'm having a hard time passing parameters and using them in the thread function x_gradient_par.
The main error I'm getting is 'invalid use of incomplete type..'
I've attached all relevant files.

x_gradient_par.h: Parallel version of x_gradient() to be implemented.
x_gradient_seq.h: Sequential version of x_gradient() (Provided with assignment to serve as reference)
main.cpp
x_gradient.h: Header file for x_luminosity_gradient(). The function which calls x_gradient()
errors.txt: log of compilation errors.

I realize this is a lot of files. However, the core of the problem lies in x_gradient_par.h
I just want to be as thorough with my description of the problem as possible to make it clearer for you guys.

Appreciate any tips you can give me!

x_gradient.h
main.cpp
errors.txt
x_gradient_seq.h
x_gradient_par.h