aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/float_mat
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-18 11:41:24 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-18 11:41:24 +0100
commit18540b654ac649d56bfd7261bdc99c7506aaf602 (patch)
treed8de46240c8e1cdf72c4d7e17f795a585e994547 /test/monniaux/float_mat
parentb0e23628f95845591f8ce697784beda13e3cf640 (diff)
downloadcompcert-kvx-18540b654ac649d56bfd7261bdc99c7506aaf602.tar.gz
compcert-kvx-18540b654ac649d56bfd7261bdc99c7506aaf602.zip
forgot to deallocate block
-g changes performance
Diffstat (limited to 'test/monniaux/float_mat')
-rw-r--r--test/monniaux/float_mat/Makefile2
-rw-r--r--test/monniaux/float_mat/float_mat.h2
-rw-r--r--test/monniaux/float_mat/float_mat_run.c7
3 files changed, 8 insertions, 3 deletions
diff --git a/test/monniaux/float_mat/Makefile b/test/monniaux/float_mat/Makefile
index 0b66010a..60bde6aa 100644
--- a/test/monniaux/float_mat/Makefile
+++ b/test/monniaux/float_mat/Makefile
@@ -16,6 +16,6 @@ float_mat.ccomp.k1c: float_mat.ccomp.k1c.o float_mat_run.gcc.k1c.o
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
clean:
- $(RM) -f $(PRODUCTS) float_mat.gcc.k1c.o float_mat.ccomp.k1c.o float_mat_run.gcc.k1c.o
+ $(RM) -f *.k1c *.host *.o *.s
.PHONY: clean
diff --git a/test/monniaux/float_mat/float_mat.h b/test/monniaux/float_mat/float_mat.h
index d0f48951..03a25036 100644
--- a/test/monniaux/float_mat/float_mat.h
+++ b/test/monniaux/float_mat/float_mat.h
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stdbool.h>
-typedef double REAL;
+typedef float REAL;
void REAL_mat_mul1(unsigned m, unsigned n, unsigned p,
REAL * restrict c, unsigned stride_c,
diff --git a/test/monniaux/float_mat/float_mat_run.c b/test/monniaux/float_mat/float_mat_run.c
index cb5e2110..448bb8a5 100644
--- a/test/monniaux/float_mat/float_mat_run.c
+++ b/test/monniaux/float_mat/float_mat_run.c
@@ -12,7 +12,11 @@ bool REAL_mat_equal(unsigned m,
const REAL *b, unsigned stride_b) {
for(unsigned i=0; i<m; i++) {
for(unsigned j=0; j<n; j++) {
- if (a[i*stride_a + j] != b[i*stride_b + j]) return false;
+ if (a[i*stride_a + j] != b[i*stride_b + j]) {
+ printf("at %u,%u: %g vs %g\n", i, j,
+ a[i*stride_a + j], b[i*stride_b + j]);
+ return false;
+ }
}
}
return true;
@@ -114,5 +118,6 @@ int main() {
free(c4);
free(c5);
free(c6);
+ free(c7);
return 0;
}