starpu_mpi_early_data.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009, 2010-2014, 2016 Université de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 CNRS
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #ifndef __STARPU_MPI_EARLY_DATA_H__
  18. #define __STARPU_MPI_EARLY_DATA_H__
  19. #include <starpu.h>
  20. #include <stdlib.h>
  21. #include <mpi.h>
  22. #include <common/config.h>
  23. #include <common/list.h>
  24. #include <starpu_mpi_private.h>
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. LIST_TYPE(_starpu_mpi_early_data_handle,
  29. starpu_data_handle_t handle;
  30. struct _starpu_mpi_envelope *env;
  31. struct _starpu_mpi_req *req;
  32. void *buffer;
  33. int req_ready;
  34. struct _starpu_mpi_node_tag node_tag;
  35. starpu_pthread_mutex_t req_mutex;
  36. starpu_pthread_cond_t req_cond;
  37. );
  38. void _starpu_mpi_early_data_init(void);
  39. void _starpu_mpi_early_data_check_termination(void);
  40. void _starpu_mpi_early_data_shutdown(void);
  41. struct _starpu_mpi_early_data_handle *_starpu_mpi_early_data_create(struct _starpu_mpi_envelope *envelope, int source, MPI_Comm comm) STARPU_ATTRIBUTE_MALLOC;
  42. struct _starpu_mpi_early_data_handle *_starpu_mpi_early_data_find(struct _starpu_mpi_node_tag *node_tag);
  43. void _starpu_mpi_early_data_add(struct _starpu_mpi_early_data_handle *early_data_handle);
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif /* __STARPU_MPI_EARLY_DATA_H__ */