diff --git a/include/chameleon/runtime.h b/include/chameleon/runtime.h index 010b8b1b5eb68c9f841021a7072f8192579bb545..e64390f6c2c16d3c6c730748be710075e6e70f21 100644 --- a/include/chameleon/runtime.h +++ b/include/chameleon/runtime.h @@ -557,6 +557,18 @@ RUNTIME_data_migrate( const RUNTIME_sequence_t *sequence, void * RUNTIME_data_getaddr( const CHAM_desc_t *A, int Am, int An ); + +/** + * @brief Get the CHAM_tile_t pointer to a tile from the runtime handle pointer + * returned by RUNTIME_data_getaddr. + * + * @param[in] ptr + * The pointer to convert. + * + * @retval The associated CHAM_tile_t pointer. + */ +CHAM_tile_t *RUNTIME_handle2tile( void *ptr ); + /** * @} * diff --git a/runtime/starpu/interface/cham_tile_interface.c b/runtime/starpu/interface/cham_tile_interface.c index c8be6122ba5f698fa2387e782f042a6cd6bbc356..352d7bd288833a3ffcb0e0d04f7cf06a6f96fe2f 100644 --- a/runtime/starpu/interface/cham_tile_interface.c +++ b/runtime/starpu/interface/cham_tile_interface.c @@ -772,3 +772,9 @@ starpu_cham_tile_interface_fini() #endif } } + +CHAM_tile_t * +RUNTIME_handle2tile( void *interface ) +{ + return cti_interface_get( (starpu_cham_tile_interface_t *)interface ); +}