starpu_mpi_private.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * StarPU
  3. * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #ifndef __STARPU_MPI_PRIVATE_H__
  17. #define __STARPU_MPI_PRIVATE_H__
  18. #include "starpu_mpi.h"
  19. #include <common/list.h>
  20. #include <pthread.h>
  21. LIST_TYPE(starpu_mpi_req,
  22. /* description of the data at StarPU level */
  23. starpu_data_handle data_handle;
  24. /* description of the data to be sent/received */
  25. void *ptr;
  26. MPI_Datatype datatype;
  27. /* who are we talking to ? */
  28. int srcdst;
  29. int mpi_tag;
  30. MPI_Comm comm;
  31. void (*func)(struct starpu_mpi_req_s *);
  32. MPI_Status *status;
  33. MPI_Request request;
  34. int *flag;
  35. int ret;
  36. pthread_mutex_t req_mutex;
  37. pthread_cond_t req_cond;
  38. unsigned submitted;
  39. unsigned completed;
  40. /* In the case of a Wait/Test request, we are going to post a request
  41. * to test the completion of another request */
  42. struct starpu_mpi_req_s *other_request;
  43. /* in the case of detached requests */
  44. unsigned detached;
  45. void *callback_arg;
  46. void (*callback)(void *);
  47. );
  48. #endif // __STARPU_MPI_PRIVATE_H__