cmVectOps.h/c : Added use of _cmVOU_Abs() to eliminate warning regarding abs(unsigned).

This commit is contained in:
kevin 2015-10-07 12:59:46 -04:00
parent d72efa84a8
commit 61f8a82d5e
2 changed files with 6 additions and 2 deletions

View File

@ -26,6 +26,7 @@
#define cmVectOpsRICode_h #define cmVectOpsRICode_h
#include "cmVectOpsTemplateMain.h" #include "cmVectOpsTemplateMain.h"
unsigned _cmVOU_Abs( unsigned x ) { return x; }
void cmVOU_VPrint( cmRpt_t* rpt, const char* fmt, ... ) void cmVOU_VPrint( cmRpt_t* rpt, const char* fmt, ... )
{ {

View File

@ -104,8 +104,11 @@ cmReal_t cmVOI_Variance(const int* sp, unsigned sn, const cmReal_t* mean);
// dbp[1,dn] = v[1,vn] * m[vn,dn] // dbp[1,dn] = v[1,vn] * m[vn,dn]
cmComplexR_t* cmVORC_MultVVM( cmComplexR_t* dbp, unsigned dn, const cmComplexR_t* vp, unsigned vn, const cmComplexR_t* m ); cmComplexR_t* cmVORC_MultVVM( cmComplexR_t* dbp, unsigned dn, const cmComplexR_t* vp, unsigned vn, const cmComplexR_t* m );
#define cmAbs(x) _Generic((x), double:fabs, float:fabsf, int:abs, unsigned:abs, default:fabs )(x) unsigned _cmVOU_Abs(unsigned x );
#define cmIsClose(x0,x1,eps) _Generic((x0), double:cmIsCloseD, float:cmIsCloseF, int:cmIsCloseI, unsigned:cmIsCloseU, default:cmIsCloseD)(x0,x1,eps)
#define cmAbs(x) _Generic((x), double:fabs, float:fabsf, unsigned:_cmVOU_Abs, char:abs, int:abs, bool:_cmVOU_Abs )(x)
#define cmIsClose(x0,x1,eps) _Generic((x0), double:cmIsCloseD, float:cmIsCloseF, int:cmIsCloseI, unsigned:cmIsCloseU, default:cmIsCloseD)(x0,x1,eps)
#ifdef __cplusplus #ifdef __cplusplus
} }