Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add support for huge pages in shared malloc.
[simgrid.git] / src / smpi / smpi_request.hpp
index fa33611..f9c8446 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2013-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,12 +7,12 @@
 #ifndef SMPI_REQUEST_HPP_INCLUDED
 #define SMPI_REQUEST_HPP_INCLUDED
 
-#include "private.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,17 +39,21 @@ class Request {
     int refcount_;
     MPI_Op op_;
   public:
+    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();
+    size_t real_size();
     int src();
     int dst();
     int tag();
     int flags();
+    int detached();
     void print_request(const char *message);
     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);
@@ -86,8 +90,14 @@ class Request {
 
     static int match_send(void* a, void* b,smx_activity_t ignored);
     static int match_recv(void* a, void* b,smx_activity_t ignored);
+
+    int add_f();
+    static void free_f(int id);
+    static Request* f2c(int);
+
 };
 
+
 }
 }