Variables
argmax_along_axis
argmax_along_axis: any = make_reduction_along_axis('var curret = val, curamax = 0;','if(val>curret){curret=val;curamax=red;}','dst_data[dst_idx]=curret; amax_data[dst_idx]=curamax+1;', true)
argmin_along_axis
argmin_along_axis: any = make_reduction_along_axis('var curret = val, curamax = 0;','if(val<curret){curret=val;curamax=red;}','dst_data[dst_idx]=curret; amax_data[dst_idx]=curamax+1;', true)
max_along_axis
max_along_axis: any = make_reduction_along_axis('var curret = val;','if(val>curret){curret=val;}','dst_data[dst_idx]=curret;', false)
max_elementwise
max_elementwise: function = func_generator.make_binary_arith_func_all('Math.max(%a,%b)')
mean_along_axis
mean_along_axis: any = make_reduction_along_axis_stat('var curret = val;','curret += val;', 'dst_data[dst_idx] = curret / reduction_count;')
min_along_axis
min_along_axis: any = make_reduction_along_axis('var curret = val;','if(val<curret){curret=val;}','dst_data[dst_idx]=curret;', false)
min_elementwise
min_elementwise: function = func_generator.make_binary_arith_func_all('Math.min(%a,%b)')
prod_along_axis
prod_along_axis: any = make_reduction_along_axis_stat('var curret = val;','curret *= val;', 'dst_data[dst_idx] = curret;')
std_along_axis_w0
std_along_axis_w0: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = Math.sqrt((sqsum - normalsum * normalsum / reduction_count) / Math.max(reduction_count - 1, 1));')
std_along_axis_w1
std_along_axis_w1: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = Math.sqrt((sqsum - normalsum * normalsum / reduction_count) / reduction_count);')
sum_along_axis
sum_along_axis: any = make_reduction_along_axis_stat('var curret = val;','curret += val;', 'dst_data[dst_idx] = curret;')
variance_along_axis_w0
variance_along_axis_w0: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = (sqsum - normalsum * normalsum / reduction_count) / Math.max(reduction_count - 1, 1);')
variance_along_axis_w1
variance_along_axis_w1: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = (sqsum - normalsum * normalsum / reduction_count) / reduction_count;')