X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/64e7c8f9110c7054fa1ea365b750c737171c66ef..bcb5cde966bef9e174da1c93cdb2158c0880a613:/src/smpi/smpi_request.hpp diff --git a/src/smpi/smpi_request.hpp b/src/smpi/smpi_request.hpp index 561dbf509e..535ebab307 100644 --- a/src/smpi/smpi_request.hpp +++ b/src/smpi/smpi_request.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010, 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,12 +6,13 @@ #ifndef SMPI_REQUEST_HPP_INCLUDED #define SMPI_REQUEST_HPP_INCLUDED -#include "private.h" +#include "smpi/smpi.h" +#include "src/smpi/smpi_f2c.hpp" namespace simgrid{ namespace smpi{ -class Request { +class Request : public F2C { private : void *buf_; /* in the case of non-contiguous memory the user address should be keep @@ -39,7 +39,7 @@ class Request { int refcount_; MPI_Op op_; public: - Request(); + Request()=default; Request(void *buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm, unsigned flags); MPI_Comm comm(); size_t size(); @@ -53,7 +53,7 @@ class Request { void start(); static void finish_wait(MPI_Request* request, MPI_Status * status); - static void unuse(MPI_Request* request); + static void unref(MPI_Request* request); static void wait(MPI_Request* req, MPI_Status * status); static MPI_Request send_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm); static MPI_Request isend_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm); @@ -88,10 +88,16 @@ class Request { static int waitall(int count, MPI_Request requests[], MPI_Status status[]); static int waitsome(int incount, MPI_Request requests[], int *indices, MPI_Status status[]); - static int match_send(void* a, void* b,smx_activity_t ignored); - static int match_recv(void* a, void* b,smx_activity_t ignored); + static int match_send(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored); + static int match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored); + + int add_f(); + static void free_f(int id); + static Request* f2c(int); + }; + } }