Tpetra Matrix/Vector Services Version of the Day
TpetraExt_BlockExtraction.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_BlockExtraction.hpp"
00045 
00046 #ifdef HAVE_TPETRA_EXPLICIT_INSTANTIATION
00047 
00048 #include "TpetraExt_BlockExtraction_def.hpp"
00049 
00050 #include <Kokkos_SerialNode.hpp>
00051 #if defined(HAVE_KOKKOS_TBB)
00052 #  include <Kokkos_TBBNode.hpp>
00053 #endif
00054 #if defined(HAVE_KOKKOS_THREADPOOL)
00055 #  include <Kokkos_TPINode.hpp>
00056 #endif
00057 #if defined(HAVE_KOKKOS_THRUST)
00058 #  include <Kokkos_ThrustGPUNode.hpp>
00059 #endif
00060 
00061 namespace Tpetra {
00062   namespace Ext {
00063 
00064 #if defined(HAVE_TPETRA_INST_DOUBLE)
00065   TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,int,Kokkos::SerialNode)
00066 #if defined(HAVE_KOKKOS_TBB)
00067   TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,int,Kokkos::TBBNode)
00068 #endif
00069 #if defined(HAVE_KOKKOS_THREADPOOL)
00070     TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,int,Kokkos::TPINode)
00071 #endif
00072 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00073     TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00074 #endif
00075 #endif // double
00076 #if defined(HAVE_TPETRA_INST_FLOAT)
00077   TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,int,Kokkos::SerialNode)
00078 #if defined(HAVE_KOKKOS_TBB)
00079   TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,int,Kokkos::TBBNode)
00080 #endif
00081 #if defined(HAVE_KOKKOS_THREADPOOL)
00082     TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,int,Kokkos::TPINode)
00083 #endif
00084 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00085     TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00086 #endif
00087 #endif // float
00088 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00089   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00090 #if defined(HAVE_KOKKOS_TBB)
00091   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00092 #endif
00093 #if defined(HAVE_KOKKOS_THREADPOOL)
00094     TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00095 #endif
00096 // no complex on GPU support for now
00097 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00098 //    TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00099 //#endif
00100 #endif // complex double
00101 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00102   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00103 #if defined(HAVE_KOKKOS_TBB)
00104   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00105 #endif
00106 #if defined(HAVE_KOKKOS_THREADPOOL)
00107     TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00108 #endif
00109 // no complex on GPU support for now
00110 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00111 //    TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00112 //#endif
00113 #endif // complex float
00114 
00115 
00116 #ifdef HAVE_TPETRA_INST_INT_LONG
00117 #if defined(HAVE_TPETRA_INST_DOUBLE)
00118   TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,long,Kokkos::SerialNode)
00119 #if defined(HAVE_KOKKOS_TBB)
00120   TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,long,Kokkos::TBBNode)
00121 #endif
00122 #if defined(HAVE_KOKKOS_THREADPOOL)
00123     TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,long,Kokkos::TPINode)
00124 #endif
00125 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00126     TPETRAEXT_BLOCKEXTRACTION_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00127 #endif
00128 #endif // double
00129 #if defined(HAVE_TPETRA_INST_FLOAT)
00130   TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,long,Kokkos::SerialNode)
00131 #if defined(HAVE_KOKKOS_TBB)
00132   TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,long,Kokkos::TBBNode)
00133 #endif
00134 #if defined(HAVE_KOKKOS_THREADPOOL)
00135     TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,long,Kokkos::TPINode)
00136 #endif
00137 #if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00138     TPETRAEXT_BLOCKEXTRACTION_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00139 #endif
00140 #endif // float
00141 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00142   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00143 #if defined(HAVE_KOKKOS_TBB)
00144   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00145 #endif
00146 #if defined(HAVE_KOKKOS_THREADPOOL)
00147     TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00148 #endif
00149 // no complex on GPU support for now
00150 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_COMPLEX_DOUBLE)
00151 //    TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<double>,int,long,Kokkos::ThrustGPUNode)
00152 //#endif
00153 #endif // complex double
00154 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00155   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00156 #if defined(HAVE_KOKKOS_TBB)
00157   TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00158 #endif
00159 #if defined(HAVE_KOKKOS_THREADPOOL)
00160     TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00161 #endif
00162 // no complex on GPU support for now
00163 //#if defined(HAVE_KOKKOS_THRUST) && defined(HAVE_KOKKOS_CUDA_COMPLEX_FLOAT)
00164 //    TPETRAEXT_BLOCKEXTRACTION_INSTANT(std::complex<float>,int,long,Kokkos::ThrustGPUNode)
00165 //#endif
00166 #endif // complex float
00167 
00168 #endif // <int,long>
00169 
00170   } // end Tpetra::Ext::
00171 } // end Tpetra::
00172 
00173 #endif // HAVE_TPETRA_EXPLICIT_INSTANTIATION
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines