-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* Additional copyrights may follow
*/
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
-
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
/*
* Barrier is ment to be a synchronous operation, as some BTLs can mark
else {
MPI_Request* requests;
- requests = (MPI_Request*)malloc( size * sizeof(MPI_Request) );
+ requests = new MPI_Request[size];
for (i = 1; i < size; ++i) {
requests[i] = Request::irecv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE,
COLL_TAG_BARRIER, comm
);
}
Request::waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
- free( requests );
+ delete[] requests;
}
/* All done */