SpatialOps::VecScalarMult< FieldT > Struct Template Reference

Multiply a scalar by a vector. More...

#include <MatVecOps.h>

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

Public Types

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

Static Public Member Functions

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

Detailed Description

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

Multiply a scalar by a vector.

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 505 of file MatVecOps.h.

Member Function Documentation

◆ operate()

template<typename FieldT >
void SpatialOps::VecScalarMult< FieldT >::operate ( ResultT *const  result,
const LeftT  scal,
const RightT vec 

Evaluate this operation using Nebo as the backend.

resultResultT* const destination vector for solution
scalconst LeftT& scalar on the left of *
vecconst RightT& vector with which to multiply the scalar

< stride length has an appreciable effect on performance

Definition at line 1414 of file MatVecOps.h.

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