Tpetra Matrix/Vector Services Version of the Day
Tpetra_RowMatrixTransposer.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_RowMatrixTransposer.hpp"
00045 
00046 #ifdef HAVE_TPETRA_EXPLICIT_INSTANTIATION
00047 
00048 #include "Tpetra_RowMatrixTransposer_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_OPENMP)
00058 #  include <Kokkos_OpenMPNode.hpp>
00059 #endif
00060 #if defined(HAVE_KOKKOS_CUSPARSE)
00061 #  include <Kokkos_ThrustGPUNode.hpp>
00062 #endif
00063 
00064 namespace Tpetra {
00065 
00066 #if defined(HAVE_TPETRA_INST_DOUBLE)
00067   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::SerialNode)
00068 #if defined(HAVE_KOKKOS_TBB)
00069   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::TBBNode)
00070 #endif
00071 #if defined(HAVE_KOKKOS_THREADPOOL)
00072     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::TPINode)
00073 #endif
00074 #if defined(HAVE_KOKKOS_OPENMP)
00075     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::OpenMPNode)
00076 #endif
00077 #if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00078     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00079 #endif
00080 #endif // double
00081 #if defined(HAVE_TPETRA_INST_FLOAT)
00082   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,int,Kokkos::SerialNode)
00083 #if defined(HAVE_KOKKOS_TBB)
00084   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,int,Kokkos::TBBNode)
00085 #endif
00086 #if defined(HAVE_KOKKOS_THREADPOOL)
00087     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,int,Kokkos::TPINode)
00088 #endif
00089 #if defined(HAVE_KOKKOS_OPENMP)
00090     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,int,Kokkos::OpenMPNode)
00091 #endif
00092 #if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00093     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,int,Kokkos::ThrustGPUNode)
00094 #endif
00095 #endif // float
00096 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00097   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,int,Kokkos::SerialNode)
00098 #if defined(HAVE_KOKKOS_TBB)
00099   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,int,Kokkos::TBBNode)
00100 #endif
00101 #if defined(HAVE_KOKKOS_THREADPOOL)
00102     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,int,Kokkos::TPINode)
00103 #endif
00104 #if defined(HAVE_KOKKOS_OPENMP)
00105     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,int,Kokkos::OpenMPNode)
00106 #endif
00107 // no complex on GPU support for now
00108 //#if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00109 //    TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00110 //#endif
00111 #endif // complex double
00112 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00113   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,int,Kokkos::SerialNode)
00114 #if defined(HAVE_KOKKOS_TBB)
00115   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,int,Kokkos::TBBNode)
00116 #endif
00117 #if defined(HAVE_KOKKOS_THREADPOOL)
00118     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,int,Kokkos::TPINode)
00119 #endif
00120 #if defined(HAVE_KOKKOS_OPENMP)
00121     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,int,Kokkos::OpenMPNode)
00122 #endif
00123 // no complex on GPU support for now
00124 //#if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00125 //    TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,int,Kokkos::ThrustGPUNode)
00126 //#endif
00127 #endif // complex float
00128 
00129 #ifdef HAVE_TPETRA_INST_INT_LONG
00130 #if defined(HAVE_TPETRA_INST_DOUBLE)
00131   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::SerialNode)
00132 #if defined(HAVE_KOKKOS_TBB)
00133   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::TBBNode)
00134 #endif
00135 #if defined(HAVE_KOKKOS_THREADPOOL)
00136     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::TPINode)
00137 #endif
00138 #if defined(HAVE_KOKKOS_OPENMP)
00139     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::OpenMPNode)
00140 #endif
00141 #if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00142     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00143 #endif
00144 #endif // double
00145 #if defined(HAVE_TPETRA_INST_FLOAT)
00146   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,long,Kokkos::SerialNode)
00147 #if defined(HAVE_KOKKOS_TBB)
00148   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,long,Kokkos::TBBNode)
00149 #endif
00150 #if defined(HAVE_KOKKOS_THREADPOOL)
00151     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,long,Kokkos::TPINode)
00152 #endif
00153 #if defined(HAVE_KOKKOS_OPENMP)
00154     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,long,Kokkos::OpenMPNode)
00155 #endif
00156 #if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_FLOAT)
00157     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(float,int,long,Kokkos::ThrustGPUNode)
00158 #endif
00159 #endif // float
00160 #if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE)
00161   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,long,Kokkos::SerialNode)
00162 #if defined(HAVE_KOKKOS_TBB)
00163   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,long,Kokkos::TBBNode)
00164 #endif
00165 #if defined(HAVE_KOKKOS_THREADPOOL)
00166     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,long,Kokkos::TPINode)
00167 #endif
00168 #if defined(HAVE_KOKKOS_OPENMP)
00169     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<double>,int,long,Kokkos::OpenMPNode)
00170 #endif
00171 // no complex on GPU support for now
00172 //#if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00173 //    TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00174 //#endif
00175 #endif // complex double
00176 #if defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
00177   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,long,Kokkos::SerialNode)
00178 #if defined(HAVE_KOKKOS_TBB)
00179   TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,long,Kokkos::TBBNode)
00180 #endif
00181 #if defined(HAVE_KOKKOS_THREADPOOL)
00182     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,long,Kokkos::TPINode)
00183 #endif
00184 #if defined(HAVE_KOKKOS_OPENMP)
00185     TPETRA_ROWMATRIXTRANSPOSE_INSTANT(std::complex<float>,int,long,Kokkos::OpenMPNode)
00186 #endif
00187 // no complex on GPU support for now
00188 //#if defined(HAVE_KOKKOS_CUSPARSE) && defined(HAVE_KOKKOS_CUDA_DOUBLE)
00189 //    TPETRA_ROWMATRIXTRANSPOSE_INSTANT(double,int,long,Kokkos::ThrustGPUNode)
00190 //#endif
00191 #endif // complex float
00192 #endif // <int,long>
00193 
00194 
00195 } // namespace Tpetra
00196 
00197 #endif // HAVE_TPETRA_EXPLICIT_INSTANTIATION
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines