Skylark (Sketching Library)
0.1
|
00001 #ifndef SKYLARK_TYPER_HPP 00002 #define SKYLARK_TYPER_HPP 00003 00004 #ifdef SKYLARK_HAVE_ELEMENTAL 00005 #include <elemental.hpp> 00006 #endif 00007 #ifdef SKYLARK_HAVE_COMBBLAS 00008 #include <CombBLAS.h> 00009 #endif 00010 00011 namespace skylark { 00012 namespace utility { 00013 00014 template<typename T> 00015 struct typer_t { 00016 typedef typename T::value_type value_type; 00017 typedef typename T::index_type index_type; 00018 }; 00019 00020 00021 #ifdef SKYLARK_HAVE_ELEMENTAL 00022 template<typename F> 00023 struct typer_t<elem::Matrix<F> > { 00024 typedef F value_type; 00025 typedef int index_type; 00026 }; 00027 00028 template<typename F, elem::Distribution CD, elem::Distribution RD> 00029 struct typer_t< elem::DistMatrix<F, CD, RD> > { 00030 typedef F value_type; 00031 typedef int index_type; 00032 }; 00033 #endif 00034 00035 #ifdef SKYLARK_HAVE_COMBBLAS 00036 template<typename IT, typename VT, typename DT> 00037 struct typer_t< SpParMat<IT, VT, DT> > { 00038 typedef VT value_type; 00039 typedef IT index_type; 00040 }; 00041 00042 template<typename IT, typename VT> 00043 struct typer_t< FullyDistVec<IT, VT> > { 00044 typedef VT value_type; 00045 typedef IT index_type; 00046 }; 00047 #endif 00048 00049 } } // namespace skylark::utility 00050 00051 #endif // SKYLARK_TYPER_HPP