From 4af04b679a3197187937362d96bc25fb07f1659d Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Fri, 26 Apr 2019 18:08:53 +0200
Subject: [PATCH] Move rank functions as non static inline

---
 control/descriptor.c | 21 +++++++++++++++++++++
 control/descriptor.h | 25 ++-----------------------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/control/descriptor.c b/control/descriptor.c
index de4bd65c0..ad2d53f28 100644
--- a/control/descriptor.c
+++ b/control/descriptor.c
@@ -68,6 +68,27 @@ int chameleon_desc_mat_free( CHAM_desc_t *desc )
     return CHAMELEON_SUCCESS;
 }
 
+/**
+ *  Internal function to return MPI rank of element A(m,n) with m,n = block indices
+ */
+int chameleon_getrankof_2d( const CHAM_desc_t *A, int m, int n )
+{
+    int mm = m + A->i / A->mb;
+    int nn = n + A->j / A->nb;
+    return (mm % A->p) * A->q + (nn % A->q);
+}
+
+/**
+ *  Internal function to return MPI rank of element DIAG(m,0) with m,n = block indices
+ */
+int chameleon_getrankof_2d_diag( const CHAM_desc_t *A, int m, int n )
+{
+    int mm = m + A->i / A->mb;
+    assert( m == n );
+    return (mm % A->p) * A->q + (mm % A->q);
+}
+
+
 /**
  ******************************************************************************
  *
diff --git a/control/descriptor.h b/control/descriptor.h
index 2be4cafe9..6eff67711 100644
--- a/control/descriptor.h
+++ b/control/descriptor.h
@@ -44,8 +44,8 @@ inline static int   chameleon_getblkldd_ccrb(const CHAM_desc_t *A, int m);
 /**
  *  Data distributions
  */
-inline static int   chameleon_getrankof_2d(const CHAM_desc_t *desc, int m, int n);
-inline static int   chameleon_getrankof_2d_diag(const CHAM_desc_t *desc, int m, int n);
+int          chameleon_getrankof_2d(const CHAM_desc_t *desc, int m, int n);
+int          chameleon_getrankof_2d_diag(const CHAM_desc_t *desc, int m, int n);
 
 int          chameleon_desc_init     ( CHAM_desc_t *desc, void *mat,
                                        cham_flttype_t dtyp, int mb, int nb, int bsiz,
@@ -175,27 +175,6 @@ inline static int chameleon_getblkldd_cm(const CHAM_desc_t *A, int m) {
     return A->llm;
 }
 
-/**
- *  Internal function to return MPI rank of element A(m,n) with m,n = block indices
- */
-inline static int chameleon_getrankof_2d(const CHAM_desc_t *A, int m, int n)
-{
-    int mm = m + A->i / A->mb;
-    int nn = n + A->j / A->nb;
-    return (mm % A->p) * A->q + (nn % A->q);
-}
-
-/**
- *  Internal function to return MPI rank of element DIAG(m,0) with m,n = block indices
- */
-inline static int chameleon_getrankof_2d_diag(const CHAM_desc_t *A, int m, int n)
-{
-    int mm = m + A->i / A->mb;
-    assert( m == n );
-    return (mm % A->p) * A->q + (mm % A->q);
-}
-
-
 /**
  * Detect if the tile is local or not
  */
-- 
GitLab