shards Version of the Day
Loading...
Searching...
No Matches
shards::InnerProduct< n, i > Struct Template Reference

Inner product of two arrays. More...

#include <Shards_SimpleArrayOps.hpp>

Public Types

enum  {
  N = n ,
  I = i
}
 

Public Member Functions

template<typename T >
 InnerProduct (T &value, const T *const x, const T *const y)
 value += sum[ k = 0..N-1 ]( x[k] * y[k] )
 

Detailed Description

template<unsigned n, unsigned i = 0>
struct shards::InnerProduct< n, i >

Inner product of two arrays.

Template Parameters
nNumber of members to iterate.

Definition at line 179 of file Shards_SimpleArrayOps.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<unsigned n, unsigned i = 0>
anonymous enum

Definition at line 180 of file Shards_SimpleArrayOps.hpp.

Constructor & Destructor Documentation

◆ InnerProduct() [1/2]

template<unsigned n, unsigned i = 0>
template<typename T >
shards::InnerProduct< n, i >::InnerProduct ( T &  value,
const T *const  x,
const T *const  y 
)
inline

value += sum[ k = 0..N-1 ]( x[k] * y[k] )

Definition at line 184 of file Shards_SimpleArrayOps.hpp.

◆ InnerProduct() [2/2]

template<unsigned n, unsigned i = 0>
shards::InnerProduct< n, i >::InnerProduct ( )
inline

Definition at line 187 of file Shards_SimpleArrayOps.hpp.


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