SpatialOps
SpatialOps::VecVecAdd< FieldT > Struct Template Reference

Add a vector to a vector on the right. More...

#include <MatVecOps.h>

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

Public Types

typedef FieldVector< FieldT > RightT
 right operand is a matrix
 
typedef FieldVector< FieldT > LeftT
 left operand is matrix
 
typedef FieldVector< FieldT > ResultT
 result is a matrix
 

Static Public Member Functions

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

Detailed Description

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

Add a vector to a vector on the right.

Performs an operation of the form result = vec1 + vec2. 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 593 of file MatVecOps.h.

Member Function Documentation

◆ operate()

template<typename FieldT >
void SpatialOps::VecVecAdd< FieldT >::operate ( ResultT *const  result,
const LeftT vec1,
const RightT vec2 
)
static

Evaluate this operation using Nebo as the backend.

Parameters
resultResultT* const destination vector for solution
vec1const LeftT& vector on the left
vec2const RightT& vector with which to add the vector from the right

< stride length has an appreciable effect on performance

Definition at line 1458 of file MatVecOps.h.


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