aboutsummaryrefslogtreecommitdiff
path: root/src/Register.h
diff options
context:
space:
mode:
authorgoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2005-12-14 22:14:41 +0000
committergoodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364>2005-12-14 22:14:41 +0000
commit7cc7be1acf8f2519657e78a8bdee81920b1dc5f5 (patch)
tree8b9ac35a5b9ec0397b2d70af1b88ad64969a94c4 /src/Register.h
parent39c19b80c226f853d899d6e06c84733e22d780bd (diff)
Changes from Dylan Stark to allow registration of topology
routines and introducing a physical to logical processor mapping. Now it is possible to register custom topology routines if you don't like the two ones we have at the moment (the traditional one and the new one from Frank Loeffler). You can also provide routines to optimise the placement of neighbouring processes on the processors by giving a custom mapping from the numbers PUGH uses for the processors to the actual MPI processor. Please treat this registration as semi-volatile for the moment and coordinate with Dylan if you fancy using it. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@475 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/Register.h')
-rw-r--r--src/Register.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Register.h b/src/Register.h
new file mode 100644
index 0000000..5240375
--- /dev/null
+++ b/src/Register.h
@@ -0,0 +1,42 @@
+ /*@@
+ @header Register.h
+ @date Wed Dec 14 17:43:42 2005
+ @author Tom Goodale
+ @desc
+ This is a template header function
+ @enddesc
+ @version $Header$
+ @@*/
+
+#ifndef _PUGH_REGISTER_H_
+#define _PUGH_REGISTER_H_ 1
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int PUGH_RegisterGenerateTopology(int (*GenerateTopology) (int dim,
+ int total_procs,
+ const int *nsize,
+ const int *nghostzones,
+ int *nprocs),
+ const char *topologyname);
+
+int PUGH_RegisterP2L(
+ void *(*CreateP2LTranslation) (int dim,
+ int *nprocs,
+ int np),
+ int (*DestroyP2LTranslation) (void *table),
+ int (*PhysicalToLogical) (void *table,
+ int proc),
+ int (*LogicalToPhysical) (void *table,
+ int num),
+ const char *p2lname);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PUGH_REGISTER_H_ */