SpatialOps
SpatialOps::MatScalDiagOffset< FieldT > Struct Template Reference

Add a scalar value to the diagonal elements of a matrix. More...

#include <MatVecOps.h>

Inheritance diagram for SpatialOps::MatScalDiagOffset< FieldT >:
Collaboration diagram for SpatialOps::MatScalDiagOffset< FieldT >:

Public Types

typedef FieldMatrix< FieldT > RightT
 right operand is a matrix
 
typedef FieldT::value_type LeftT
 left operand is scalar
 
typedef FieldMatrix< FieldT > ResultT
 result is a matrix
 

Static Public Member Functions

static void operate (ResultT *const result, const LeftT scal, const RightT &mat)
 Evaluate this operation using Nebo as the backend. More...
 
- Static Public Member Functions inherited from SpatialOps::MatOperation< MatScalDiagOffset< FieldT >, FieldMatrix< FieldT >, FieldT::value_type, FieldMatrix< FieldT > >
static void cpu_launch (FieldMatrix< FieldT > *const result, const FieldT::value_type &left, const FieldMatrix< FieldT > &right)
 Called to initiate evaluation. More...
 

Detailed Description

template<typename FieldT>
struct SpatialOps::MatScalDiagOffset< FieldT >

Add a scalar value to the diagonal elements of a matrix.

Performs an operation of the form mat = mat + c*I. This operation iterates over the diagonal elemenets of mat and adds the scalar value to each of them.

Definition at line 681 of file MatVecOps.h.

Member Function Documentation

◆ operate()

template<typename FieldT >
void SpatialOps::MatScalDiagOffset< FieldT >::operate ( ResultT *const  result,
const LeftT  scal,
const RightT mat 
)
static

Evaluate this operation using Nebo as the backend.

Parameters
resultResultT* const destination matrix for solution- should be the same as RightT mat
scalconst LeftT& scalar to offset the diagonal by
matconst RightT& matrix with which to add the scalar to the diagonal of

Definition at line 1606 of file MatVecOps.h.

References SpatialOps::PoolAutoPtr< T >::get(), and SpatialOps::Semaphore::post().

Here is the call graph for this function:

The documentation for this struct was generated from the following file: