TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Echange_EV_Options.h
1/****************************************************************************
2* Copyright (c) 2022, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Echange_EV_Options_included
17#define Echange_EV_Options_included
18
20{
21public:
22 // SYNC is the default: the owner of the shared value sends the value to other processors
23 // SUM: the owner of a shared value receives values from other processors
24 // that own the same value (either item_commun or in virtual space)
25 // and computes the sum. The user might want to SYNCHRONIZE afterwards
26 // MAX: same as SUM, but the owner computes the max for all processors that share the data
27 // MAXCOL1: only meaningful for arrays with line_size > 1. For each shared "line"
28 // of the multidimensionnal array, take the processor for which the first value on the line
29 // is the highest and copy the whole line to the processor that owns the item.
33
35 Items_Communs items_communs = ITEMS_COMMUNS_YES,
36 Items_Virtuels items_virtuels = ITEMS_VIRTUELS_YES);
37
38 Operation get_op() const { return op_; }
41
42 int operator==(const Echange_EV_Options& x) const
43 {
45 }
46protected:
48 // Flag: process items_communs or not ?
51};
52
53extern const Echange_EV_Options& echange_ev_opt_default;
54
55#endif
56
Items_Communs get_items_communs() const
Echange_EV_Options(Operation op=SYNC, Items_Communs items_communs=ITEMS_COMMUNS_YES, Items_Virtuels items_virtuels=ITEMS_VIRTUELS_YES)
Items_Virtuels items_virtuels_
Operation get_op() const
Items_Communs items_communs_
Items_Virtuels get_items_virtuels() const
int operator==(const Echange_EV_Options &x) const