Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Namespaces | Functions
Kokkos_Sequential_SparseKernels.hpp File Reference

Sequential implementations of (local) sparse kernels. More...

#include <KokkosLinAlg_config.h>
#include <Kokkos_ArithTraits.hpp>

Go to the source code of this file.

Namespaces

 Kokkos
 

Functions

template<class LocalOrdinal , class OffsetType , class MatrixScalar , class DomainScalar , class RangeScalar >
void Kokkos::Sequential::gaussSeidel (const LocalOrdinal numRows, const LocalOrdinal numCols, const OffsetType *const ptr, const LocalOrdinal *const ind, const MatrixScalar *const val, const DomainScalar *const B, const OffsetType b_stride, RangeScalar *const X, const OffsetType x_stride, const MatrixScalar *const D, const MatrixScalar omega, const Kokkos::ESweepDirection direction)
 Implementation of local Gauss-Seidel. More...
 
template<class LocalOrdinal , class OffsetType , class MatrixScalar , class DomainScalar , class RangeScalar >
void Kokkos::Sequential::reorderedGaussSeidel (const LocalOrdinal numRows, const LocalOrdinal numCols, const OffsetType *const ptr, const LocalOrdinal *const ind, const MatrixScalar *const val, const DomainScalar *const B, const OffsetType b_stride, RangeScalar *const X, const OffsetType x_stride, const MatrixScalar *const D, const LocalOrdinal *const rowInd, const LocalOrdinal numRowInds, const MatrixScalar omega, const Kokkos::ESweepDirection direction)
 Implementation of reordered local Gauss-Seidel. More...
 

Detailed Description

Sequential implementations of (local) sparse kernels.

This file exists mainly as a temporary porting aid. Until we can set up thread-parallel versions of these kernels, we have sequential versions here. They are not terribly well optimized. The point is to have reasonable sequential defaults, not super-fast kernels. If you want super-fast kernels, reimplement them in Kokkos and try to make them parallel.

The exception to this might be Gauss-Seidel. Gauss-Seidel is harder to parallelize without changing the semantics, unless we implement it with triangular solves and do the latter in parallel. There is a set-up cost for thread-parallel sparse triangular solves, and speed-up isn't even close to perfect, so it might pay for smaller thread counts to have an optimized sequential kernel. We have not done this here.

Definition in file Kokkos_Sequential_SparseKernels.hpp.