44 #define MY_MAX(a,b) a > b ? a : b
46 #include "RTOp_reduct_max_value.h"
48 int RTOp_reduct_max_value(
50 , RTOp_ReductTarget in_targ_obj, RTOp_ReductTarget inout_targ_obj )
53 *((RTOp_value_type*)inout_targ_obj)
54 = MY_MAX( *((RTOp_value_type*)inout_targ_obj)
55 ,*((RTOp_value_type*)in_targ_obj)
60 static void CALL_API external_reduct_op(
void* in_targ_array,
void* inout_targ_array
61 ,
int* len, RTOp_Datatype* datatype )
65 *in_targs = (RTOp_value_type*)in_targ_array + 3,
66 *inout_targs = (RTOp_value_type*)inout_targ_array + 3;
68 for( i = 0; i < *len; ++i, inout_targs += 4, in_targs += 4 )
69 *inout_targs = MY_MAX(*inout_targs,*in_targs);
72 int RTOp_get_reduct_max_value_op(
74 , RTOp_reduct_op_func_ptr_t* reduct_op_func_ptr )
76 *reduct_op_func_ptr = external_reduct_op;