Commit 00238625 authored by Cabaret Laurent's avatar Cabaret Laurent
Browse files

manual is now correct (A-B)^2 not (A*B)^2

parent 0940d9ce
......@@ -62,7 +62,7 @@ T_real square_of_distance_between_instance_i_and_centroid_k_manual_vect(int i, i
for (int j = 0; j < (NbDims/8)*8; j += 8) {
__m256 vect_data = _mm256_loadu_ps(&data[i*NbDims + j]);
__m256 vect_centroid = _mm256_loadu_ps(&centroid[k][j]);
vect_data = _mm256_mul_ps(vect_data, vect_centroid);
vect_data = _mm256_sub_ps(vect_data, vect_centroid);
vect_data = _mm256_mul_ps(vect_data, vect_data);
vect_dist_sq = _mm256_add_ps(vect_dist_sq, vect_data);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment