Tpetra Matrix/Vector Services Version of the Day
Tpetra_MultiVector.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 "Tpetra_MultiVector.hpp"
00045 
00046 #ifdef HAVE_TPETRA_EXPLICIT_INSTANTIATION
00047 
00048 #include <Kokkos_SerialNode.hpp>
00049 #if defined(HAVE_KOKKOS_TBB)
00050 #  include <Kokkos_TBBNode.hpp>
00051 #endif
00052 #if defined(HAVE_KOKKOS_THREADPOOL)
00053 #  include <Kokkos_TPINode.hpp>
00054 #endif
00055 #if defined(HAVE_KOKKOS_OPENMP)
00056 #  include <Kokkos_OpenMPNode.hpp>
00057 #endif
00058 #if defined(HAVE_KOKKOS_THRUST)
00059 #  include <Kokkos_ThrustGPUNode.hpp>
00060 #endif
00061 
00062 #include "Tpetra_MultiVector_def.hpp"
00063 
00064 namespace Tpetra {
00065 
00066   TPETRA_MULTIVECTOR_INSTANT(int,int,int,Kokkos::SerialNode)
00067 #if defined(HAVE_KOKKOS_TBB)
00068   TPETRA_MULTIVECTOR_INSTANT(int,int,int,Kokkos::TBBNode)
00069 #endif
00070 #if defined(HAVE_KOKKOS_THREADPOOL)
00071   TPETRA_MULTIVECTOR_INSTANT(int,int,int,Kokkos::TPINode)
00072 #endif
00073 #if defined(HAVE_KOKKOS_OPENMP)
00074   TPETRA_MULTIVECTOR_INSTANT(int,int,int,Kokkos::OpenMPNode)
00075 #endif
00076 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00077   TPETRA_MULTIVECTOR_INSTANT(int,int,int,Kokkos::ThrustGPUNode)
00078 #endif // int 
00079 #if defined(HAVE_TPETRA_INST_DOUBLE)
00080   TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::SerialNode)
00081 #if defined(HAVE_KOKKOS_TBB)
00082   TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::TBBNode)
00083 #endif
00084 #if defined(HAVE_KOKKOS_THREADPOOL)
00085     TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::TPINode)
00086 #endif
00087 #if defined(HAVE_KOKKOS_OPENMP)
00088     TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::OpenMPNode)
00089 #endif
00090 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00091     TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00092 #endif
00093 #endif // double
00094 #if defined(HAVE_TPETRA_INST_FLOAT)
00095   TPETRA_MULTIVECTOR_INSTANT(float,int,int,Kokkos::SerialNode)
00096 #if defined(HAVE_KOKKOS_TBB)
00097   TPETRA_MULTIVECTOR_INSTANT(float,int,int,Kokkos::TBBNode)
00098 #endif
00099 #if defined(HAVE_KOKKOS_THREADPOOL)
00100     TPETRA_MULTIVECTOR_INSTANT(float,int,int,Kokkos::TPINode)
00101 #endif
00102 #if defined(HAVE_KOKKOS_OPENMP)
00103     TPETRA_MULTIVECTOR_INSTANT(float,int,int,Kokkos::OpenMPNode)
00104 #endif
00105 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00106     TPETRA_MULTIVECTOR_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00107 #endif
00108 #endif // float
00109 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00110   TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00111 #if defined(HAVE_KOKKOS_TBB)
00112   TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00113 #endif
00114 #if defined(HAVE_KOKKOS_THREADPOOL)
00115     TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00116 #endif
00117 #if defined(HAVE_KOKKOS_OPENMP)
00118     TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,int,Kokkos::OpenMPNode)
00119 #endif
00120 // no complex on GPU support for now
00121 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00122 //    TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00123 //#endif
00124 #endif // complex double
00125 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00126   TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00127 #if defined(HAVE_KOKKOS_TBB)
00128   TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00129 #endif
00130 #if defined(HAVE_KOKKOS_THREADPOOL)
00131     TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00132 #endif
00133 #if defined(HAVE_KOKKOS_OPENMP)
00134     TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,int,Kokkos::OpenMPNode)
00135 #endif
00136 // no complex on GPU support for now
00137 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00138 //    TPETRA_MULTIVECTOR_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00139 //#endif
00140 #endif // complex float
00141 
00142 
00143 #ifdef HAVE_TPETRA_INST_INT_LONG
00144   TPETRA_MULTIVECTOR_INSTANT(int,int,long,Kokkos::SerialNode)
00145 #if defined(HAVE_KOKKOS_TBB)
00146   TPETRA_MULTIVECTOR_INSTANT(int,int,long,Kokkos::TBBNode)
00147 #endif
00148 #if defined(HAVE_KOKKOS_THREADPOOL)
00149   TPETRA_MULTIVECTOR_INSTANT(int,int,long,Kokkos::TPINode)
00150 #endif
00151 #if defined(HAVE_KOKKOS_OPENMP)
00152   TPETRA_MULTIVECTOR_INSTANT(int,int,long,Kokkos::OpenMPNode)
00153 #endif
00154 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00155   TPETRA_MULTIVECTOR_INSTANT(int,int,long,Kokkos::ThrustGPUNode)
00156 #endif // int
00157   TPETRA_MULTIVECTOR_INSTANT(long,int,long,Kokkos::SerialNode)
00158 #if defined(HAVE_KOKKOS_TBB)
00159   TPETRA_MULTIVECTOR_INSTANT(long,int,long,Kokkos::TBBNode)
00160 #endif
00161 #if defined(HAVE_KOKKOS_THREADPOOL)
00162   TPETRA_MULTIVECTOR_INSTANT(long,int,long,Kokkos::TPINode)
00163 #endif
00164 #if defined(HAVE_KOKKOS_OPENMP)
00165   TPETRA_MULTIVECTOR_INSTANT(long,int,long,Kokkos::OpenMPNode)
00166 #endif
00167 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00168   TPETRA_MULTIVECTOR_INSTANT(long,int,long,Kokkos::ThrustGPUNode)
00169 #endif // long
00170 #if defined(HAVE_TPETRA_INST_DOUBLE)
00171   TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::SerialNode)
00172 #if defined(HAVE_KOKKOS_TBB)
00173   TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::TBBNode)
00174 #endif
00175 #if defined(HAVE_KOKKOS_THREADPOOL)
00176     TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::TPINode)
00177 #endif
00178 #if defined(HAVE_KOKKOS_OPENMP)
00179     TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::OpenMPNode)
00180 #endif
00181 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00182     TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00183 #endif
00184 #endif // double
00185 #if defined(HAVE_TPETRA_INST_FLOAT)
00186   TPETRA_MULTIVECTOR_INSTANT(float,int,long,Kokkos::SerialNode)
00187 #if defined(HAVE_KOKKOS_TBB)
00188   TPETRA_MULTIVECTOR_INSTANT(float,int,long,Kokkos::TBBNode)
00189 #endif
00190 #if defined(HAVE_KOKKOS_THREADPOOL)
00191     TPETRA_MULTIVECTOR_INSTANT(float,int,long,Kokkos::TPINode)
00192 #endif
00193 #if defined(HAVE_KOKKOS_OPENMP)
00194     TPETRA_MULTIVECTOR_INSTANT(float,int,long,Kokkos::OpenMPNode)
00195 #endif
00196 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00197     TPETRA_MULTIVECTOR_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00198 #endif
00199 #endif // float
00200 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00201   TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00202 #if defined(HAVE_KOKKOS_TBB)
00203   TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00204 #endif
00205 #if defined(HAVE_KOKKOS_THREADPOOL)
00206     TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00207 #endif
00208 #if defined(HAVE_KOKKOS_OPENMP)
00209     TPETRA_MULTIVECTOR_INSTANT(std::complex<double>,int,long,Kokkos::OpenMPNode)
00210 #endif
00211 // no complex on GPU support for now
00212 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00213 //    TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00214 //#endif
00215 #endif // complex double
00216 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00217   TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00218 #if defined(HAVE_KOKKOS_TBB)
00219   TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00220 #endif
00221 #if defined(HAVE_KOKKOS_THREADPOOL)
00222     TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00223 #endif
00224 #if defined(HAVE_KOKKOS_OPENMP)
00225     TPETRA_MULTIVECTOR_INSTANT(std::complex<float>,int,long,Kokkos::OpenMPNode)
00226 #endif
00227 // no complex on GPU support for now
00228 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00229 //    TPETRA_MULTIVECTOR_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00230 //#endif
00231 #endif // complex float
00232 #endif // <int,long>
00233 
00234 } // namespace Tpetra
00235 
00236 #endif // HAVE_TPETRA_EXPLICIT_INSTANTIATION
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines