Hi,
I am developing a software on a dedicated HW (DSPs C6727) with CCS version 4.2.4.00033 and Code generation tools version 7.0.5.
I am trying to work with template parameter and got a run time error (not compilation error).
Is it possible to work with the following templates?
template <class T> inline T WUAbs(const T &xA){ return (xA > T(0))? xA: -xA;}template <> inline int WUAbs(const int &xA){ return __abs(xA);}//template <> inline int32_t WUAbs(const int32_t &xA)// 64BitConversion//{// return __labs(xA);//}template <> inline float WUAbs(const float &xA){ return (float) __fabs(xA);}template <> inline double WUAbs(const double &xA){ return __fabs(xA);}
Thanks,
Yaniv
I do not see anything obviously wrong with this code. What run time error do you get? Please be specific about what goes wrong.