Skip to content

Commit 9a75101

Browse files
committed
fixed formatting with clang-format
Signed-off-by: Ethan Hirsch <[email protected]>
1 parent 4ba1e5f commit 9a75101

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DirectProgramming/C++/CompilerInfrastructure/Intrinsics/src/intrin_dot_sample.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
*
3131
*/
3232
#include <immintrin.h>
33+
#include <omp.h>
3334
#include <pmmintrin.h>
3435
#include <stdio.h>
35-
#include <omp.h>
3636

3737
#define SIZE 24 // assumes size is a multiple of 8 because
3838
// Intel(R) AVX registers will store 8, 32bit elements.
@@ -117,7 +117,7 @@ float dot_product(float *a, float *b) {
117117
float dot_product_SIMD(float *a, float *b) {
118118
int i;
119119
int sum = 0;
120-
#pragma omp simd reduction(+:sum)
120+
#pragma omp simd reduction(+ : sum)
121121
for (i = 0; i < SIZE; i++) {
122122
sum += a[i] * b[i];
123123
}
@@ -211,7 +211,7 @@ float dot_product_intrin(float *a, float *b) {
211211
b +
212212
i); // loads unaligned array b into num2 num2= b[3] b[2] b[1] b[0]
213213
num3 = _mm_mul_ps(num1, num2); // performs multiplication num3 =
214-
// a[3]*b[3] a[2]*b[2] a[1]*b[1] a[0]*b[0]
214+
// a[3]*b[3] a[2]*b[2] a[1]*b[1] a[0]*b[0]
215215
num3 = _mm_hadd_ps(num3, num3); // performs horizontal addition
216216
// num3= a[3]*b[3]+ a[2]*b[2] a[1]*b[1]+a[0]*b[0] a[3]*b[3]+ a[2]*b[2]
217217
// a[1]*b[1]+a[0]*b[0]

0 commit comments

Comments
 (0)