SpatialOps
SpatialOps::MatScalarMult< FieldT > Struct Template Reference

Multiply a matrix by a scalar. More...

#include <MatVecOps.h>

Inheritance diagram for SpatialOps::MatScalarMult< FieldT >:
Collaboration diagram for SpatialOps::MatScalarMult< 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< MatScalarMult< 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::MatScalarMult< FieldT >

Multiply a matrix by a scalar.

Performs an operation of the form result = vec * scalar or scalar * vec. This operator uses the same stride ( 5 elements by default ) as the dot product. You may get better performance with varying stride lengths.

Definition at line 527 of file MatVecOps.h.

Member Function Documentation

◆ operate()

template<typename FieldT >
void SpatialOps::MatScalarMult< 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
scalconst LeftT& scalar on the left of *
matconst RightT& matrix with which to multiply the scalar

< stride length has an appreciable effect on performance

Definition at line 1436 of file MatVecOps.h.


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