Tpetra Matrix/Vector Services Version of the Day
TpetraExt_MMHelpers.cpp
00001 /*
00002 // @HEADER
00003 // ***********************************************************************
00004 // 
00005 //          Tpetra: Templated Linear Algebra Services Package
00006 //                 Copyright (2008) Sandia Corporation
00007 // 
00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009 // the U.S. Government retains certain rights in this software.
00010 // 
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00039 // 
00040 // ************************************************************************
00041 // @HEADER
00042 */
00043 
00044 #include "TpetraExt_MMHelpers.hpp"
00045 
00046 #ifdef HAVE_TPETRA_EXPLICIT_INSTANTIATION
00047 
00048 // #include "Tpetra_ExplicitInstantiationHelpers.hpp"
00049 
00050 #include "TpetraExt_MMHelpers_def.hpp"
00051 
00052 #include <Kokkos_SerialNode.hpp>
00053 #if defined(HAVE_KOKKOS_TBB)
00054 #  include <Kokkos_TBBNode.hpp>
00055 #endif
00056 #if defined(HAVE_KOKKOS_THREADPOOL)
00057 #  include <Kokkos_TPINode.hpp>
00058 #endif
00059 #if defined(HAVE_KOKKOS_THRUST)
00060 #  include <Kokkos_ThrustGPUNode.hpp>
00061 #endif
00062 
00063 namespace Tpetra {
00064 
00065 #if defined(HAVE_TPETRA_INST_DOUBLE)
00066   TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,int,Kokkos::SerialNode)
00067   TPETRA_CRSWRAPPER_INSTANT(double,int,int,Kokkos::SerialNode)
00068   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,int,Kokkos::SerialNode)
00069   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,int,Kokkos::SerialNode)
00070 #if defined(HAVE_KOKKOS_TBB)
00071   TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,int,Kokkos::TBBNode)
00072   TPETRA_CRSWRAPPER_INSTANT(double,int,int,Kokkos::TBBNode)
00073   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,int,Kokkos::TBBNode)
00074   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,int,Kokkos::TBBNode)
00075 #endif
00076 #if defined(HAVE_KOKKOS_THREADPOOL)
00077     TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,int,Kokkos::TPINode)
00078     TPETRA_CRSWRAPPER_INSTANT(double,int,int,Kokkos::TPINode)
00079     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,int,Kokkos::TPINode)
00080     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,int,Kokkos::TPINode)
00081 #endif
00082 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00083     TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00084     TPETRA_CRSWRAPPER_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00085     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00086     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00087 #endif
00088 #endif // double
00089 #if defined(HAVE_TPETRA_INST_FLOAT)
00090   TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,int,Kokkos::SerialNode)
00091   TPETRA_CRSWRAPPER_INSTANT(float,int,int,Kokkos::SerialNode)
00092   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,int,Kokkos::SerialNode)
00093   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,int,Kokkos::SerialNode)
00094 #if defined(HAVE_KOKKOS_TBB)
00095   TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,int,Kokkos::TBBNode)
00096   TPETRA_CRSWRAPPER_INSTANT(float,int,int,Kokkos::TBBNode)
00097   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,int,Kokkos::TBBNode)
00098   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,int,Kokkos::TBBNode)
00099 #endif
00100 #if defined(HAVE_KOKKOS_THREADPOOL)
00101   TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,int,Kokkos::TPINode)
00102   TPETRA_CRSWRAPPER_INSTANT(float,int,int,Kokkos::TPINode)
00103   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,int,Kokkos::TPINode)
00104   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,int,Kokkos::TPINode)
00105 #endif
00106 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00107     TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00108     TPETRA_CRSWRAPPER_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00109     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00110     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00111 #endif
00112 #endif // float
00113 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00114   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00115   TPETRA_CRSWRAPPER_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00116   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00117   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00118 #if defined(HAVE_KOKKOS_TBB)
00119   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00120   TPETRA_CRSWRAPPER_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00121   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00122   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00123 #endif
00124 #if defined(HAVE_KOKKOS_THREADPOOL)
00125     TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00126     TPETRA_CRSWRAPPER_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00127     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00128     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00129 #endif
00130 // no complex on GPU support for now
00131 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00132 //    TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00133 //    TPETRA_CRSWRAPPER_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00134 //    TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00135 //    TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00136 //#endif
00137 #endif // complex double
00138 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00139   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00140   TPETRA_CRSWRAPPER_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00141   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00142   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00143 #if defined(HAVE_KOKKOS_TBB)
00144   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00145   TPETRA_CRSWRAPPER_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00146   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00147   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00148 #endif
00149 #if defined(HAVE_KOKKOS_THREADPOOL)
00150     TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00151     TPETRA_CRSWRAPPER_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00152     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00153     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00154 #endif
00155 // no complex on GPU support for now
00156 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00157 //    TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00158 //    TPETRA_CRSWRAPPER_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00159 //    TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00160 //    TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00161 //#endif
00162 #endif // complex float
00163 
00164 
00165 #ifdef HAVE_TPETRA_INST_INT_LONG
00166 #if defined(HAVE_TPETRA_INST_DOUBLE)
00167   TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,long,Kokkos::SerialNode)
00168   TPETRA_CRSWRAPPER_INSTANT(double,int,long,Kokkos::SerialNode)
00169   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,long,Kokkos::SerialNode)
00170   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,long,Kokkos::SerialNode)
00171 #if defined(HAVE_KOKKOS_TBB)
00172   TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,long,Kokkos::TBBNode)
00173   TPETRA_CRSWRAPPER_INSTANT(double,int,long,Kokkos::TBBNode)
00174   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,long,Kokkos::TBBNode)
00175   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,long,Kokkos::TBBNode)
00176 #endif
00177 #if defined(HAVE_KOKKOS_THREADPOOL)
00178     TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,long,Kokkos::TPINode)
00179     TPETRA_CRSWRAPPER_INSTANT(double,int,long,Kokkos::TPINode)
00180     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,long,Kokkos::TPINode)
00181     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,long,Kokkos::TPINode)
00182 #endif
00183 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00184     TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00185     TPETRA_CRSWRAPPER_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00186     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00187     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00188 #endif
00189 #endif // double
00190 #if defined(HAVE_TPETRA_INST_FLOAT)
00191   TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,long,Kokkos::SerialNode)
00192   TPETRA_CRSWRAPPER_INSTANT(float,int,long,Kokkos::SerialNode)
00193   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,long,Kokkos::SerialNode)
00194   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,long,Kokkos::SerialNode)
00195 #if defined(HAVE_KOKKOS_TBB)
00196   TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,long,Kokkos::TBBNode)
00197   TPETRA_CRSWRAPPER_INSTANT(float,int,long,Kokkos::TBBNode)
00198   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,long,Kokkos::TBBNode)
00199   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,long,Kokkos::TBBNode)
00200 #endif
00201 #if defined(HAVE_KOKKOS_THREADPOOL)
00202   TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,long,Kokkos::TPINode)
00203   TPETRA_CRSWRAPPER_INSTANT(float,int,long,Kokkos::TPINode)
00204   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,long,Kokkos::TPINode)
00205   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,long,Kokkos::TPINode)
00206 #endif
00207 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00208     TPETRA_CRSMATRIXSTRUCT_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00209     TPETRA_CRSWRAPPER_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00210     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00211     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00212 #endif
00213 #endif // float
00214 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00215   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00216   TPETRA_CRSWRAPPER_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00217   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00218   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00219 #if defined(HAVE_KOKKOS_TBB)
00220   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00221   TPETRA_CRSWRAPPER_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00222   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00223   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00224 #endif
00225 #if defined(HAVE_KOKKOS_THREADPOOL)
00226     TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00227     TPETRA_CRSWRAPPER_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00228     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00229     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00230 #endif
00231 // no complex on GPU support for now
00232 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00233 //    TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00234 //    TPETRA_CRSWRAPPER_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00235 //    TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00236 //    TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00237 //#endif
00238 #endif // complex double
00239 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00240   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00241   TPETRA_CRSWRAPPER_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00242   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00243   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00244 #if defined(HAVE_KOKKOS_TBB)
00245   TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00246   TPETRA_CRSWRAPPER_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00247   TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00248   TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00249 #endif
00250 #if defined(HAVE_KOKKOS_THREADPOOL)
00251     TPETRA_CRSMATRIXSTRUCT_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00252     TPETRA_CRSWRAPPER_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00253     TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00254     TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00255 #endif
00256 // no complex on GPU support for now
00257 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00258 //    TPETRA_CRSMATRIXSTRUCT_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00259 //    TPETRA_CRSWRAPPER_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00260 //    TPETRA_CRSWRAPPER_CRSMATRIX_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00261 //    TPETRA_CRSWRAPPER_GRAPHBUILDER_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00262 //#endif
00263 #endif // complex float
00264 #endif // <int,long>
00265 
00266 
00267 } // namespace Tpetra
00268 
00269 #endif // HAVE_TPETRA_EXPLICIT_INSTANTIATION
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines