+static void minloc_func(void* a, void* b, int* length, MPI_Datatype* datatype) {
+ if(*datatype == MPI_FLOAT_INT) {
+ APPLY_FUNC(a, b, length, float_int, MINLOC_OP);
+ } else if(*datatype == MPI_LONG_INT) {
+ APPLY_FUNC(a, b, length, long_int, MINLOC_OP);
+ } else if(*datatype == MPI_DOUBLE_INT) {
+ APPLY_FUNC(a, b, length, double_int, MINLOC_OP);
+ } else if(*datatype == MPI_SHORT_INT) {
+ APPLY_FUNC(a, b, length, short_int, MINLOC_OP);
+ } else if(*datatype == MPI_2INT) {
+ APPLY_FUNC(a, b, length, int_int, MINLOC_OP);
+ } else if(*datatype == MPI_LONG_DOUBLE_INT) {
+ APPLY_FUNC(a, b, length, long_double_int, MINLOC_OP);
+ }
+}
+
+static void maxloc_func(void* a, void* b, int* length, MPI_Datatype* datatype) {
+ if(*datatype == MPI_FLOAT_INT) {
+ APPLY_FUNC(a, b, length, float_int, MAXLOC_OP);
+ } else if(*datatype == MPI_LONG_INT) {
+ APPLY_FUNC(a, b, length, long_int, MAXLOC_OP);
+ } else if(*datatype == MPI_DOUBLE_INT) {
+ APPLY_FUNC(a, b, length, double_int, MAXLOC_OP);
+ } else if(*datatype == MPI_SHORT_INT) {
+ APPLY_FUNC(a, b, length, short_int, MAXLOC_OP);
+ } else if(*datatype == MPI_2INT) {
+ APPLY_FUNC(a, b, length, int_int, MAXLOC_OP);
+ } else if(*datatype == MPI_LONG_DOUBLE_INT) {
+ APPLY_FUNC(a, b, length, long_double_int, MAXLOC_OP);
+ }
+}
+
+