diff --git a/include/chameleon/chameleon_config.h.in b/include/chameleon/chameleon_config.h.in index b2ea05211ee2b607e065ab95de15f17e549cd787..51210134677fbc1b293ef0c5f4f8d542282b29f0 100644 --- a/include/chameleon/chameleon_config.h.in +++ b/include/chameleon/chameleon_config.h.in @@ -36,6 +36,10 @@ /* Communication engine */ #cmakedefine CHAMELEON_USE_MPI +#cmakedefine CHAMELEON_USE_MIGRATE +#if !defined(CHAMELEON_USE_MPI) && defined(CHAMELEON_USE_MIGRATE) +#undef CHAMELEON_USE_MIGRATE +#endif /* GPU Support */ #cmakedefine CHAMELEON_USE_CUDA diff --git a/include/chameleon/morse_runtime.h b/include/chameleon/morse_runtime.h index 76c83ce85505d1afac466de41a3d5c1f84b5ab49..5f009f30a3cb09a5ccd2151e2d11124b8a25ff1a 100644 --- a/include/chameleon/morse_runtime.h +++ b/include/chameleon/morse_runtime.h @@ -444,6 +444,39 @@ void RUNTIME_data_flush( const MORSE_sequence_t *sequence, const MORSE_desc_t *A, int Am, int An ); +/** + * @brief Migrate a single piece of data. + * + * This function migrate a piece of data from its original rank to the new_rank + * and changes its ownership. + * + * @param[in] sequence + * The sequence in which the data is used. + * + * @param[in] A + * The descriptor to which the piece of data belongs. + * + * @param[in] Am + * The row coordinate of the piece of data in the matrix + * + * @param[in] An + * The column coordinate of the piece of data in the matrix + * + * @param[in] new_rank + * The new_rank on which to migrate the data + */ +#if defined(CHAMELEON_USE_MIGRATE) +void +RUNTIME_data_migrate( const MORSE_sequence_t *sequence, + const MORSE_desc_t *A, int Am, int An, int new_rank ); +#else +static inline void +RUNTIME_data_migrate( const MORSE_sequence_t *sequence, + const MORSE_desc_t *A, int Am, int An, int new_rank ) { + (void)sequence; (void)A; (void)Am; (void)An; (void)new_rank; +} +#endif + /** * @brief Get the pointer to the data or the runtime handler associated to the * piece of data (m, n) in desc.