RTOpPack: Extra C/C++ Code for Vector Reduction/Transformation Operators  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RTOpToMPI.h
1 /*
2 // @HEADER
3 // ***********************************************************************
4 //
5 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
6 // Copyright (2003) Sandia Corporation
7 //
8 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 // license for use of this work by or on behalf of the U.S. Government.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
39 //
40 // ***********************************************************************
41 // @HEADER
42 */
43 
44 /* Define this macro if you want to print profiling results with clock() */
45 #define RTOP_TO_MPI_SHOW_TIMES 1
46 
47 #ifndef RTOP_TO_MPI_H
48 #define RTOP_TO_MPI_H
49 
50 #include "RTOp.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
59 
61 /* */
77  const int num_values
78  ,const int num_indexes
79  ,const int num_chars
80  ,int* num_entries
81  ,int block_lengths[]
82  ,MPI_Aint displacements[]
83  ,MPI_Datatype datatypes[]
84  );
85 
86 /* */
103  const struct RTOp_RTOp* op
104  ,RTOp_ReductTarget reduct_obj
105  ,int num_values
106  ,int num_indexes
107  ,int num_chars
108  ,void* reduct_obj_ext
109  );
110 
111 /* */
126  const struct RTOp_RTOp* op
127  ,const void* reduct_obj_ext
128  ,RTOp_ReductTarget reduct_obj
129  );
130 
131 /* */
210  MPI_Comm comm, const struct RTOp_RTOp* op, int root_rank
211  ,const int num_cols
212  ,const int num_vecs, const struct RTOp_SubVector sub_vecs[]
213  ,const int num_targ_vecs, const struct RTOp_MutableSubVector sub_targ_vecs[]
214  ,RTOp_ReductTarget reduct_objs[]
215  );
216 
219 #ifdef RTOP_TO_MPI_SHOW_TIMES
220  /* For use in profiling only */
221  extern int RTOp_MPI_apply_op_print_timings;
222 #endif
223 
224 
225 #ifdef __cplusplus
226 }
227 #endif
228 
229 #endif /* RTOP_TO_MPI_H */
int RTOp_load_reduct_obj_ext_state(const struct RTOp_RTOp *op, const void *reduct_obj_ext, RTOp_ReductTarget reduct_obj)
Definition: RTOpToMPI.c:117
void RTOp_MPI_type_signature(const int num_values, const int num_indexes, const int num_chars, int *num_entries, int block_lengths[], MPI_Aint displacements[], MPI_Datatype datatypes[])
Definition: RTOpToMPI.c:53
int RTOp_MPI_apply_op(MPI_Comm comm, const struct RTOp_RTOp *op, int root_rank, const int num_cols, const int num_vecs, const struct RTOp_SubVector sub_vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector sub_targ_vecs[], RTOp_ReductTarget reduct_objs[])
Definition: RTOpToMPI.c:144
int RTOp_extract_reduct_obj_ext_state(const struct RTOp_RTOp *op, RTOp_ReductTarget reduct_obj, int num_values, int num_indexes, int num_chars, void *reduct_obj_ext)
Definition: RTOpToMPI.c:88