mirror of https://github.com/silx-kit/pyFAI.git
close #1211
This commit is contained in:
parent
9aced9a873
commit
61fffefe30
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue