aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-01-16 10:48:31 +0100
committerAnton Khirnov <anton@khirnov.net>2019-01-16 10:49:37 +0100
commit3cf65cde6a94a3c6685ac1231472bf96fcea7b88 (patch)
tree1aab759975fe695eccad041bddee23a6fe34f74f
parent2f457508915cdf61d2220b9db30d4aaecd7e07b7 (diff)
mg2d: add a function for getting maximum supported fd_stencil
This is needed for the caller to know the number of boundary zones that can be filled. API bump.
-rw-r--r--libmg2d.v2
-rw-r--r--mg2d.c5
-rw-r--r--mg2d.h5
3 files changed, 11 insertions, 1 deletions
diff --git a/libmg2d.v b/libmg2d.v
index a51d313..ec37512 100644
--- a/libmg2d.v
+++ b/libmg2d.v
@@ -1,4 +1,4 @@
-LIBMG2D_3 {
+LIBMG2D_4 {
global: mg2d_*;
local: *;
};
diff --git a/mg2d.c b/mg2d.c
index 55b8ed9..6b94def 100644
--- a/mg2d.c
+++ b/mg2d.c
@@ -714,3 +714,8 @@ void mg2d_print_stats(MG2DContext *ctx, const char *prefix)
other / 1e6, other / 1e3 / priv->count_solve);
}
+
+unsigned int mg2d_max_fd_stencil(void)
+{
+ return FD_STENCIL_MAX;
+}
diff --git a/mg2d.h b/mg2d.h
index f697b76..834e717 100644
--- a/mg2d.h
+++ b/mg2d.h
@@ -302,4 +302,9 @@ void mg2d_solver_free(MG2DContext **ctx);
*/
void mg2d_print_stats(MG2DContext *ctx, const char *prefix);
+/**
+ * @return maximum supported value of fd_stencil.
+ */
+unsigned int mg2d_max_fd_stencil(void);
+
#endif /* MG2D_H */