RTOpPack_MPI_apply_op_decl.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // RTOp: Interfaces and Support Software for Vector Reduction Transformation
00005 //       Operations
00006 //                Copyright (2006) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //  
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00026 // 
00027 // ***********************************************************************
00028 // @HEADER
00029 
00030 #ifndef RTOPPACK_MPI_APPLY_OP_DECL_HPP
00031 #define RTOPPACK_MPI_APPLY_OP_DECL_HPP
00032 
00033 #include "RTOpPack_RTOpT.hpp"
00034 #include "RTOp_MPI_config.h"
00035 
00036 #define RTOPPACK_MPI_APPLY_OP_DUMP
00037 
00038 namespace RTOpPack {
00039 
00040 #ifdef RTOPPACK_MPI_APPLY_OP_DUMP
00041 extern bool show_mpi_apply_op_dump;
00042 #endif // RTOPPACK_MPI_APPLY_OP_DUMP
00043 
00060 template<class primitive_value_type>
00061 void MPI_type_signature(
00062   const int num_values
00063   ,const int num_indexes
00064   ,const int num_chars
00065   ,int* num_entries
00066   ,int block_lengths[]
00067   ,MPI_Aint displacements[]
00068   ,MPI_Datatype datatypes[]
00069   );
00070 
00075 template<class primitive_value_type>
00076 int reduct_obj_ext_size(
00077   int   num_values
00078   ,int  num_indexes
00079   ,int  num_chars
00080   )
00081 {
00082   return (3 + num_values) * sizeof(primitive_value_type)
00083     + num_indexes         * sizeof(index_type)
00084     + num_chars           * sizeof(char_type);
00085 }
00086 
00091 template<class Scalar>
00092 void extract_reduct_obj_ext_state(
00093   const RTOpT<Scalar>    &op
00094   ,const ReductTarget    &reduct_obj
00095   ,int                   num_values
00096   ,int                   num_indexes
00097   ,int                   num_chars
00098   ,void                  *reduct_obj_ext
00099   );
00100 
00105 template<class Scalar>
00106 void load_reduct_obj_ext_state(
00107   const RTOpT<Scalar>    &op
00108   ,const void            *reduct_obj_ext
00109   ,ReductTarget          *reduct_obj
00110   );
00111 
00119 template<class Scalar>
00120 void MPI_apply_op(
00121   MPI_Comm                            comm
00122   ,const RTOpT<Scalar>                &op
00123   ,const int                          root_rank
00124   ,const int                          num_vecs
00125   ,const ConstSubVectorView<Scalar>   sub_vecs[]
00126   ,const int                          num_targ_vecs
00127   ,const SubVectorView<Scalar>        targ_sub_vecs[]
00128   ,ReductTarget                       *reduct_obj
00129   );
00130 
00138 template<class Scalar>
00139 void MPI_apply_op(
00140   MPI_Comm                                 comm
00141   ,const RTOpT<Scalar>                     &op
00142   ,const int                               root_rank
00143   ,const int                               num_cols
00144   ,const int                               num_multi_vecs
00145   ,const ConstSubMultiVectorView<Scalar>   sub_multi_vecs[]
00146   ,const int                               num_targ_multi_vecs
00147   ,const SubMultiVectorView<Scalar>        targ_sub_multi_vecs[]
00148   ,ReductTarget*const                      reduct_objs[]
00149   );
00150 
00171 template<class Scalar>
00172 void MPI_all_reduce(
00173   MPI_Comm                            comm
00174   ,const RTOpT<Scalar>                &op
00175   ,const int                          root_rank
00176   ,const int                          num_cols
00177   ,const ReductTarget*const           i_reduct_objs[]
00178   ,ReductTarget*const                 reduct_objs[]
00179   );
00180 
00188 template<class Scalar>
00189 void  MPI_apply_op(
00190   MPI_Comm                                  comm
00191   ,const RTOpT<Scalar>                      &op
00192   ,const int                                root_rank
00193   ,const int                                num_cols
00194   ,const int                                num_vecs
00195   ,const ConstSubVectorView<Scalar>         sub_vecs[]
00196   ,const int                                num_targ_vecs
00197   ,const SubVectorView<Scalar>              sub_targ_vecs[]
00198   ,ReductTarget*const                       reduct_objs[]
00199   );
00200 
00201 } // end namespace RTOpPack
00202 
00203 #endif // RTOPPACK_MPI_APPLY_OP_DECL_HPP

Generated on Thu Sep 18 12:30:42 2008 for RTOp Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1