Pull out likwid intrumentation from benchmark functions.

This commit is contained in:
Jan Eitzinger
2020-12-08 15:20:56 +01:00
parent 072bda515d
commit 279d3fca5c
11 changed files with 49 additions and 83 deletions

View File

@@ -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
@@ -26,7 +26,6 @@
*/
#include <timing.h>
#include <likwid-marker.h>
double update(
double * restrict a,
@@ -37,14 +36,9 @@ double update(
double S, E;
S = getTimeStamp();
#pragma omp parallel
{
LIKWID_MARKER_START("UPDATE");
#pragma omp for schedule(static)
for (int i=0; i<N; i++) {
a[i] = a[i] * scalar;
}
LIKWID_MARKER_STOP("UPDATE");
#pragma omp parallel for schedule(static)
for (int i=0; i<N; i++) {
a[i] = a[i] * scalar;
}
E = getTimeStamp();