aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/em3d/em3d.h
diff options
context:
space:
mode:
authorblazy <blazy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-20 12:37:13 +0000
committerblazy <blazy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-20 12:37:13 +0000
commitca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e (patch)
tree50a139db8e2ac51c6ff41f3790ff72aa417ed3be /test/ccured_olden/em3d/em3d.h
parent43668d9109b1f36329646fd07324d435be6f0050 (diff)
downloadcompcert-ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e.tar.gz
compcert-ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e.zip
Ajout du banc de tests de CCured (Olden benchmark suite, cf.
CCured: type-safe retrofitting of legacy code, G.Necula et al.) rapportCompcert_all.txt liste les erreurs produites par ccomp. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@121 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/ccured_olden/em3d/em3d.h')
-rw-r--r--test/ccured_olden/em3d/em3d.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/ccured_olden/em3d/em3d.h b/test/ccured_olden/em3d/em3d.h
new file mode 100644
index 00000000..ba1eac22
--- /dev/null
+++ b/test/ccured_olden/em3d/em3d.h
@@ -0,0 +1,38 @@
+/* em3d.h - Header file for the electromagnetic problem in 3 dimensions
+ *
+ * By: Martin C. Carlisle
+ * Date: Feb. 23, 1994
+ *
+ */
+
+#ifndef EM3D
+#define EM3D
+
+extern int n_nodes; /* number of nodes (E and H) */
+extern int d_nodes; /* degree of nodes */
+extern int iters; /* number of iterations */
+
+#define ALLOC malloc
+#define DIST_SPAN 6
+
+#define assert(a) if (!a) {printf("Assertion failure\n"); exit(-1);}
+
+
+typedef struct node_t {
+ double value;
+ struct node_t *next;
+ struct node_t ** to_nodes; /* array of nodes pointed to */
+ struct node_t ** from_nodes; /* array of nodes data comes from */
+ double * coeffs; /* array of coeffs on edges */
+ int from_count;
+} node_t;
+
+typedef struct graph_t {
+ node_t *e_nodes;
+ node_t *h_nodes;
+} graph_t;
+
+/* Perform 1 step for a nodelist */
+void compute_nodes(node_t *nodelist);
+#endif
+