Commit 01f4ab27 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

Added CSR kernel type getter.

parent edb2644a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -220,6 +220,11 @@ struct CSRKernelAdaptiveView

   ConstViewType getConstView() const { return *this; };

   static TNL::String getKernelType()
   {
      return "Adaptive";
   };

   template< typename OffsetsView,
             typename Fetch,
             typename Reduction,
@@ -344,6 +349,10 @@ struct CSRKernelAdaptive
    using BlocksType = typename ViewType::BlocksType;
    using BlocksView = typename BlocksType::ViewType;

   static TNL::String getKernelType()
   {
      return ViewType::getKernelType();
   };

    static constexpr Index THREADS_ADAPTIVE = sizeof(Index) == 8 ? 128 : 256;

+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ struct CSRKernelHybrid

   ConstViewType getConstView() const;

   static TNL::String getKernelType();

   template< typename OffsetsView,
             typename Fetch,
+9 −0
Original line number Diff line number Diff line
@@ -114,6 +114,15 @@ getView() -> ViewType
    return *this;
}

template< typename Index,
          typename Device >
TNL::String
CSRKernelHybrid< Index, Device >::
getKernelType()
{
    return "Hybrid";
}

template< typename Index,
          typename Device >
auto
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ struct CSRKernelScalar

    ConstViewType getConstView() const;

    static TNL::String getKernelType();

    template< typename OffsetsView,
              typename Fetch,
              typename Reduction,
+9 −0
Original line number Diff line number Diff line
@@ -56,6 +56,15 @@ getConstView() const -> ConstViewType
    return *this;
};

template< typename Index,
          typename Device >
TNL::String
CSRKernelScalar< Index, Device >::
getKernelType()
{
    return "Scalar";
}

template< typename Index,
          typename Device >
    template< typename OffsetsView,
Loading