I solved the problem by changing:
#define VMIN -210.0f
By:
#define VMIN (-210.0f)
The problem was at the VS compiler line:
#define coef_b_green (510.0f/(VMAX-VMIN))
The compiler do not understand double --
#define coef_b_green (510.0f/(VMAX--210.0f))
NOTE: I accepted the solution-1 but using const:
const float VMIN =-210.0f;
const float VMAX =(220.0f);
const float coef_a= (0.5f*(VMIN+VMAX));
const float coef_b= (510.0f/(VMAX-VMIN));
As long as constexpr was not accepted by my VS2013 compiler.
As result it was increased the speed of
assigncolor() function from 400 megaoperationss/second using
#define to 454 MOPS using
const float
unfortunalely if you arte using C or openCL you should use #define but setting negative values inside parentheses