I am trying to walk through and understand a chi squared program that uses intrinsic for speed. In this process I have come across a line of code I can’t understand.
I have tried reviewing textbooks, Google and search of this site with no luck. I think the problem is that without knowing anything about the syntax, I can’t describes the search in terms or keyword sufficiently to get any pertinent results.
Here is the line of code I don’t understand:
float (*chi2_float)(const int, const float*, const float*) = chi2_baseline_float;
And here is the function that contains it:
float chi2_float(const int dim, const float* const x, const float* const y) {
float (*chi2_float)(const int, const float*, const float*) = chi2_baseline_float;
#ifdef __SSE__
chi2_float = chi2_intrinsic_float;
#endif
return chi2_float(dim, x, y);
}
It looks to me that it is probably declaring and defining a function and when I comment out the line and re-compile I get:
error C2659: '=' : function as left operand on line chi2_float = chi2_intrinsic_float;
I can send the .h file that contains this function if needed but it is as you would expect from the parameters.
Any help would be greatly appreciated.