Commit 7bf6790a authored by Jan Eitzinger's avatar Jan Eitzinger
Browse files

Change clang openmp flags. Formatting.

parent 89b2ecdb
......@@ -3,11 +3,11 @@ GCC = gcc
LINKER = $(CC)
ifeq ($(ENABLE_OPENMP),true)
OPENMP = -fopenmp
OPENMP = -Xpreprocessor -fopenmp
LIBS = -lomp
endif
CFLAGS = -Ofast -ffreestanding -std=c99 $(OPENMP)
LFLAGS = $(OPENMP)
DEFINES = -D_GNU_SOURCE
INCLUDES =
LIBS =
......@@ -38,9 +38,9 @@ double daxpy(
S = getTimeStamp();
#pragma omp parallel for schedule(static)
for (int i=0; i<N; i++) {
a[i] = a[i] + scalar * b[i];
}
for (int i=0; i<N; i++) {
a[i] = a[i] + scalar * b[i];
}
E = getTimeStamp();
return E-S;
......
......@@ -2,7 +2,7 @@
* =======================================================================================
*
* Author: Jan Eitzinger (je), jan.eitzinger@fau.de
* Copyright (c) 2019 RRZE, University Erlangen-Nuremberg
* Copyright (c) 2020 RRZE, University Erlangen-Nuremberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
......@@ -54,10 +54,10 @@
#define LIKWID_PROFILE(tag,call) \
_Pragma ("omp parallel") \
{LIKWID_MARKER_START(#tag);} \
times[tag][k] = call; \
_Pragma ("omp parallel") \
{LIKWID_MARKER_STOP(#tag);}
{LIKWID_MARKER_START(#tag);} \
times[tag][k] = call; \
_Pragma ("omp parallel") \
{LIKWID_MARKER_STOP(#tag);}
typedef enum benchmark {
......@@ -115,7 +115,7 @@ int main (int argc, char** argv)
};
LIKWID_MARKER_INIT;
_Pragma("omp parallel")
_Pragma("omp parallel")
{
LIKWID_MARKER_REGISTER("INIT");
LIKWID_MARKER_REGISTER("SUM");
......@@ -146,7 +146,7 @@ _Pragma("omp parallel")
#ifdef _OPENMP
printf(HLINE);
_Pragma("omp parallel")
_Pragma("omp parallel")
{
int k = omp_get_num_threads();
int i = omp_get_thread_num();
......@@ -180,10 +180,8 @@ _Pragma("omp parallel")
LIKWID_PROFILE(INIT,init(b, scalar, N));
tmp = a[10];
LIKWID_PROFILE(SUM,sum(a, N));
a[10] = tmp;
LIKWID_PROFILE(COPY,copy(c, a, N));
LIKWID_PROFILE(UPDATE,update(a, scalar, N));
LIKWID_PROFILE(TRIAD,triad(a, b, c, scalar, N));
......
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