SpatialOps
SpatialOps::DotProduct< FieldT > Struct Template Reference

Performs the dot product on two vectors. More...

#include <MatVecOps.h>

Public Types

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

Static Public Member Functions

static void launch (FieldT *const result, const LeftT &vec1, const RightT &vec2)
 immediately call operate, Nebo handles differing backends More...
 
static void operate (FieldT *const result, const LeftT &vec1, const RightT &vec2)
 perform the operations using Nebo More...
 

Detailed Description

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

Performs the dot product on two vectors.

This performs the standard dot product operation. The operations are performed on five elements from each vector at a time. This was an optimal average for us, but a different stride may be better for others.

Definition at line 73 of file MatVecOps.h.

Member Function Documentation

◆ launch()

template<typename FieldT >
static void SpatialOps::DotProduct< FieldT >::launch ( FieldT *const  result,
const LeftT vec1,
const RightT vec2 
)
inlinestatic

immediately call operate, Nebo handles differing backends

Parameters
resultFieldT* const where to put the result
vec1const LeftT& the left vector
vec2const RightT& right vector
Returns
void

Definition at line 449 of file MatVecOps.h.

References SpatialOps::DotProduct< FieldT >::operate().

Referenced by SpatialOps::MatVecOp< DotProduct< FieldT > >::eval().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operate()

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

perform the operations using Nebo

Parameters
resultFieldT* const where to store the result
vec1const LeftT& left vector
vec2const RightT& right vector
Returns
void

< stride length has an appreciable effect on performance

Definition at line 1393 of file MatVecOps.h.

Referenced by SpatialOps::DotProduct< FieldT >::launch().

Here is the caller graph for this function:

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