Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the syntax of SMPI_SAMPLE_* macros.
authordegomme <adegomme@users.noreply.github.com>
Wed, 20 Feb 2019 10:54:34 +0000 (11:54 +0100)
committerdegomme <adegomme@users.noreply.github.com>
Wed, 20 Feb 2019 10:54:50 +0000 (11:54 +0100)
commit2565e83d042a5f01c7f131c4af108028a5c4ce2b
tree6285390395a758eebbe638b139619b9b6e1936e8
parent98df1910047ee49bd36a800594ea6b90a732d9e6
Change the syntax of SMPI_SAMPLE_* macros.
To handle the end of the computing loop when sampling is still on, we need to wrap it.

This replaces this syntax
for(k = 1; k <= np; k++) { SMPI_SAMPLE_GLOBAL(0.25 * np, 0.03) {
where the macro had no idea of the loop conditions

by this
SMPI_SAMPLE_GLOBAL(k = 1, k <= np, k++, 0.25 * np, 0.03,
 {...}
)
syntax, where the body of loop is itself a parameter. This is not perfect, and may change soon. But now we can exit gracefully the sampling whenever the upper loop exits.
examples/smpi/NAS/ep.c
include/smpi/smpi.h
src/smpi/internals/smpi_bench.cpp
teshsuite/smpi/macro-sample/macro-sample.c