Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
communication.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Distributed under BSD 3-Clause license. *
3  * Copyright by The HDF Group. *
4  * Copyright by the Illinois Institute of Technology. *
5  * All rights reserved. *
6  * *
7  * This file is part of Hermes. The full Hermes copyright notice, including *
8  * terms governing use, modification, and redistribution, is contained in *
9  * the COPYING file, which can be found at the top directory. If you do not *
10  * have access to the file, you may request a copy from help@hdfgroup.org. *
11  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12 
13 #ifndef HERMES_COMMUNICATION_H_
14 #define HERMES_COMMUNICATION_H_
15 
16 #include "hermes_types.h"
17 #include "memory_management.h"
18 
27 namespace hermes {
28 
29 typedef void (*BarrierFunc)(void *);
30 typedef void (*FinalizeFunc)(void *);
41  void *state;
64 };
65 
66 size_t InitCommunication(CommunicationContext *comm, Arena *arena,
67  size_t trans_arena_size_per_node,
68  bool is_daemon = false, bool is_adapter = false);
70 inline void WorldBarrier(CommunicationContext *comm) {
71  comm->world_barrier(comm->state);
72 }
73 
75 inline void SubBarrier(CommunicationContext *comm) {
76  comm->sub_barrier(comm->state);
77 }
78 
79 void *GetAppCommunicator(CommunicationContext *comm);
80 
81 } // namespace hermes
82 
83 #endif // HERMES_COMMUNICATION_H_
Definition: adapter_utils.cc:35
void * GetAppCommunicator(CommunicationContext *comm)
Definition: communication_mpi.cc:38
void WorldBarrier(CommunicationContext *comm)
Definition: communication.h:70
size_t InitCommunication(CommunicationContext *comm, Arena *arena, size_t trans_arena_size_per_node, bool is_daemon=false, bool is_adapter=false)
Definition: communication_mpi.cc:246
void(* BarrierFunc)(void *)
Definition: communication.h:29
void(* FinalizeFunc)(void *)
Definition: communication.h:30
int32_t i32
Definition: hermes_types.h:46
ProcessKind
Definition: hermes_types.h:232
void SubBarrier(CommunicationContext *comm)
Definition: communication.h:75
Definition: memory_management.h:84
Definition: communication.h:35
BarrierFunc sub_barrier
Definition: communication.h:37
i32 hermes_size
Definition: communication.h:50
i32 world_size
Definition: communication.h:47
void * state
Definition: communication.h:41
ProcessKind proc_kind
Definition: communication.h:59
i32 app_size
Definition: communication.h:53
i32 sub_proc_id
Definition: communication.h:45
i32 world_proc_id
Definition: communication.h:43
i32 node_id
Definition: communication.h:57
BarrierFunc world_barrier
Definition: communication.h:36
bool first_on_node
Definition: communication.h:63
FinalizeFunc finalize
Definition: communication.h:38
i32 num_nodes
Definition: communication.h:55