Mon, 14 May 2018 18:23:35 +0200
renames ucx_doublecmp() and ucx_floatcmp() to ucx_cmp_double() and ucx_cmp_float()
src/ucx/utils.h | file | annotate | diff | comparison | revisions | |
src/utils.c | file | annotate | diff | comparison | revisions |
1.1 --- a/src/ucx/utils.h Mon May 14 18:20:56 2018 +0200 1.2 +++ b/src/ucx/utils.h Mon May 14 18:23:35 2018 +0200 1.3 @@ -212,7 +212,7 @@ 1.4 * 1 if *f1 is greater than *f2 1.5 */ 1.6 1.7 -int ucx_floatcmp(const void *f1, const void *f2, void *data); 1.8 +int ucx_cmp_float(const void *f1, const void *f2, void *data); 1.9 1.10 /** 1.11 * Compares two real numbers of type double. 1.12 @@ -222,7 +222,7 @@ 1.13 * @return -1, if *d1 is less than *d2, 0 if both are equal, 1.14 * 1 if *d1 is greater than *d2 1.15 */ 1.16 -int ucx_doublecmp(const void *d1, const void *d2, void *data); 1.17 +int ucx_cmp_double(const void *d1, const void *d2, void *data); 1.18 1.19 /** 1.20 * Compares two pointers.
2.1 --- a/src/utils.c Mon May 14 18:20:56 2018 +0200 2.2 +++ b/src/utils.c Mon May 14 18:23:35 2018 +0200 2.3 @@ -134,7 +134,7 @@ 2.4 return a - b; 2.5 } 2.6 2.7 -int ucx_floatcmp(const void *f1, const void *f2, void *epsilon) { 2.8 +int ucx_cmp_float(const void *f1, const void *f2, void *epsilon) { 2.9 float a = *((const float*) f1); 2.10 float b = *((const float*) f2); 2.11 float e = !epsilon ? 1e-6f : *((float*)epsilon); 2.12 @@ -145,7 +145,7 @@ 2.13 } 2.14 } 2.15 2.16 -int ucx_doublecmp(const void *d1, const void *d2, void *epsilon) { 2.17 +int ucx_cmp_double(const void *d1, const void *d2, void *epsilon) { 2.18 double a = *((const double*) d1); 2.19 double b = *((const double*) d2); 2.20 double e = !epsilon ? 1e-14 : *((double*)epsilon);