Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / smpi / include / smpi_utils.hpp
1 /* Copyright (c) 2016-2023. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SMPI_UTILS_HPP
7 #define SMPI_UTILS_HPP
8 #include <xbt/base.h>
9
10 #include "smpi_f2c.hpp"
11 #include "smpi_comm.hpp"
12
13 #include <cstddef>
14 #include <string>
15 #include <string_view>
16 #include <vector>
17
18 // Methods used to parse and store the values for timing injections in smpi
19
20 namespace simgrid::smpi::utils {
21
22 XBT_PUBLIC void add_benched_time(double time);
23 XBT_PUBLIC void account_malloc_size(size_t size, std::string_view file, int line, const void* ptr);
24 XBT_PUBLIC void account_shared_size(size_t size);
25 XBT_PUBLIC void print_time_analysis(double time);
26 XBT_PUBLIC void print_buffer_info();
27 XBT_PUBLIC void print_memory_analysis();
28 XBT_PUBLIC void print_current_handle();
29 XBT_PUBLIC void set_current_handle(F2C* handle);
30 XBT_PUBLIC void set_current_buffer(int i, const char* name, const void* handle);
31 XBT_PUBLIC size_t get_buffer_size(const void* ptr);
32 XBT_PUBLIC void account_free(const void* ptr);
33 XBT_PUBLIC int check_collectives_ordering(MPI_Comm comm, const std::string& call);
34
35 } // namespace simgrid::smpi::utils
36 #endif