Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a651c05f authored by THIBAULT Samuel's avatar THIBAULT Samuel
Browse files

constify descriptor in RUNTIME_desc_getaddr call

parent ce3d81e9
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ void RUNTIME_desc_init (MORSE_desc_t*); ...@@ -66,7 +66,7 @@ void RUNTIME_desc_init (MORSE_desc_t*);
void RUNTIME_desc_create (MORSE_desc_t*); void RUNTIME_desc_create (MORSE_desc_t*);
void RUNTIME_desc_destroy (MORSE_desc_t*); void RUNTIME_desc_destroy (MORSE_desc_t*);
void RUNTIME_desc_submatrix (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. */ /* 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*); int RUNTIME_desc_acquire (MORSE_desc_t*);
/* Release the data described by the descriptor to be used by the StarPU tasks again. */ /* Release the data described by the descriptor to be used by the StarPU tasks again. */
......
...@@ -269,7 +269,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc ) ...@@ -269,7 +269,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
return MORSE_SUCCESS; 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. */ 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 ); return desc->get_blkaddr( desc, m, n );
......
...@@ -84,7 +84,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc ) ...@@ -84,7 +84,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
return MORSE_SUCCESS; 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 ); return desc->get_blkaddr( desc, m, n );
} }
...@@ -293,7 +293,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc ) ...@@ -293,7 +293,7 @@ int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
return MORSE_SUCCESS; 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); starpu_data_handle_t *ptrtile = (starpu_data_handle_t*)(desc->schedopt);
ptrtile += ((int64_t)(desc->lmt) * (int64_t)n + (int64_t)m); ptrtile += ((int64_t)(desc->lmt) * (int64_t)n + (int64_t)m);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment