This commit is contained in:
Jerome Kieffer 2019-05-06 11:18:21 +02:00
parent 9aced9a873
commit 61fffefe30
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ csr_integrate( const global float *weights,
//Kahan summation allows single precision arithmetics with error compensation //Kahan summation allows single precision arithmetics with error compensation
//http://en.wikipedia.org/wiki/Kahan_summation_algorithm //http://en.wikipedia.org/wiki/Kahan_summation_algorithm
// defined in kahan.cl // defined in kahan.cl
sum_data_K = kahan_sum(sum_data_K, pown(coef, coef_power) * data); sum_data_K = kahan_sum(sum_data_K, ((coef_power == 2) ? coef*coef: coef) * data);
sum_count_K = kahan_sum(sum_count_K, coef); sum_count_K = kahan_sum(sum_count_K, coef);
};//end if dummy };//end if dummy
} //end if k < bin_bounds.y } //end if k < bin_bounds.y

View File

@ -114,7 +114,7 @@ lut_integrate( const global float *weights,
//sum_count += coef; //sum_count += coef;
//Kahan summation allows single precision arithmetics with error compensation //Kahan summation allows single precision arithmetics with error compensation
//http://en.wikipedia.org/wiki/Kahan_summation_algorithm //http://en.wikipedia.org/wiki/Kahan_summation_algorithm
sum_data_K = kahan_sum(sum_data_K, pown(coef, coef_power) * data); sum_data_K = kahan_sum(sum_data_K, ((coef_power == 2) ? coef*coef: coef) * data);
sum_count_K = kahan_sum(sum_count_K, coef); sum_count_K = kahan_sum(sum_count_K, coef);
};//end if dummy };//end if dummy
};//for j };//for j