From a651c05fa80b26fcbe888d9394c9b980837d23e8 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@inria.fr>
Date: Fri, 4 Nov 2016 17:51:52 +0000
Subject: [PATCH] constify descriptor in RUNTIME_desc_getaddr call

---
 include/runtime.h                           | 2 +-
 runtime/parsec/control/runtime_descriptor.c | 2 +-
 runtime/quark/control/runtime_descriptor.c  | 2 +-
 runtime/starpu/control/runtime_descriptor.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/runtime.h b/include/runtime.h
index 1d381d0eb..9db4db469 100644
--- a/include/runtime.h
+++ b/include/runtime.h
@@ -66,7 +66,7 @@ void  RUNTIME_desc_init        (MORSE_desc_t*);
 void  RUNTIME_desc_create      (MORSE_desc_t*);
 void  RUNTIME_desc_destroy     (MORSE_desc_t*);
 void  RUNTIME_desc_submatrix   (MORSE_desc_t*);
-void* RUNTIME_desc_getaddr     (MORSE_desc_t*, int, int);
+void* RUNTIME_desc_getaddr     (const MORSE_desc_t*, int, int);
 /* Acquire in main memory an up-to-date copy of the data described by the descriptor for read-write access. */
 int   RUNTIME_desc_acquire     (MORSE_desc_t*);
 /* Release the data described by the descriptor to be used by the StarPU tasks again. */
diff --git a/runtime/parsec/control/runtime_descriptor.c b/runtime/parsec/control/runtime_descriptor.c
index c9b40556e..f0790d0d6 100644
--- a/runtime/parsec/control/runtime_descriptor.c
+++ b/runtime/parsec/control/runtime_descriptor.c
@@ -269,7 +269,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
     return MORSE_SUCCESS;
 }
 
-void *RUNTIME_desc_getaddr( MORSE_desc_t *desc, int m, int n )
+void *RUNTIME_desc_getaddr( const MORSE_desc_t *desc, int m, int n )
 {
     assert(0); /* This should not be called because we also need the handle to match the address we need. */
     return desc->get_blkaddr( desc, m, n );
diff --git a/runtime/quark/control/runtime_descriptor.c b/runtime/quark/control/runtime_descriptor.c
index ca5061b62..5ce2b288b 100644
--- a/runtime/quark/control/runtime_descriptor.c
+++ b/runtime/quark/control/runtime_descriptor.c
@@ -84,7 +84,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
     return MORSE_SUCCESS;
 }
 
-void *RUNTIME_desc_getaddr( MORSE_desc_t *desc, int m, int n )
+void *RUNTIME_desc_getaddr( const MORSE_desc_t *desc, int m, int n )
 {
     return desc->get_blkaddr( desc, m, n );
 }
diff --git a/runtime/starpu/control/runtime_descriptor.c b/runtime/starpu/control/runtime_descriptor.c
index 5a82d6a63..93d5ff75e 100644
--- a/runtime/starpu/control/runtime_descriptor.c
+++ b/runtime/starpu/control/runtime_descriptor.c
@@ -293,7 +293,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
     return MORSE_SUCCESS;
 }
 
-void *RUNTIME_desc_getaddr( MORSE_desc_t *desc, int m, int n )
+void *RUNTIME_desc_getaddr( const MORSE_desc_t *desc, int m, int n )
 {
     starpu_data_handle_t *ptrtile = (starpu_data_handle_t*)(desc->schedopt);
     ptrtile += ((int64_t)(desc->lmt) * (int64_t)n + (int64_t)m);
-- 
GitLab