Commit afa472de authored by THIBAULT Samuel's avatar THIBAULT Samuel
Browse files

Add begin/end memory access hooks for runtimes

parent 6745049c
......@@ -205,7 +205,8 @@ inline static int morse_desc_islocal( const MORSE_desc_t *A, int m, int n )
* MORSE_END_ACCESS_DECLARATION
*/
#define MORSE_BEGIN_ACCESS_DECLARATION { \
unsigned __morse_need_submit = 0;
unsigned __morse_need_submit = 0; \
RUNTIME_BEGIN_ACCESS_DECLARATION
#define MORSE_ACCESS_R(A, Am, An) \
if (morse_desc_islocal(A, Am, An)) __morse_need_submit = 1; \
......@@ -222,6 +223,7 @@ inline static int morse_desc_islocal( const MORSE_desc_t *A, int m, int n )
#define MORSE_RANK_CHANGED __morse_need_submit = 1;
#define MORSE_END_ACCESS_DECLARATION \
RUNTIME_BEGIN_ACCESS_DECLARATION \
if (!__morse_need_submit) return; \
}
......
......@@ -24,10 +24,14 @@ typedef struct morse_parsec_desc_s morse_parsec_desc_t;
*/
#define RTBLKADDR( desc, type, m, n ) ( dague_dtd_tile_of( DAGUE_dtd_handle, (desc)->schedopt, m, n ) )
#define RUNTIME_BEGIN_ACCESS_DECLARATION
#define RUNTIME_ACCESS_R(A, Am, An)
#define RUNTIME_ACCESS_W(A, Am, An)
#define RUNTIME_ACCESS_RW(A, Am, An)
#define RUNTIME_END_ACCESS_DECLARATION
#endif /* _MORSE_PARSEC_H_ */
......@@ -47,10 +47,14 @@ typedef struct quark_option_s {
*/
#define RTBLKADDR( desc, type, m, n ) ( (type*)RUNTIME_desc_getaddr( desc, m, n ) )
#define RUNTIME_BEGIN_ACCESS_DECLARATION
#define RUNTIME_ACCESS_R(A, Am, An)
#define RUNTIME_ACCESS_W(A, Am, An)
#define RUNTIME_ACCESS_RW(A, Am, An)
#define RUNTIME_END_ACCESS_DECLARATION
#endif /* _MORSE_QUARK_H_ */
......@@ -86,10 +86,14 @@ typedef struct starpu_conf starpu_conf_t;
void RUNTIME_set_reduction_methods(starpu_data_handle_t handle, MORSE_enum dtyp);
#define RUNTIME_BEGIN_ACCESS_DECLARATION
#define RUNTIME_ACCESS_R(A, Am, An)
#define RUNTIME_ACCESS_W(A, Am, An)
#define RUNTIME_ACCESS_RW(A, Am, An)
#define RUNTIME_END_ACCESS_DECLARATION
#endif /* _MORSE_STARPU_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment