shards Version of the Day
Loading...
Searching...
No Matches

Sum into an array. More...

#include <Shards_SimpleArrayOps.hpp>

Public Types

enum  {
  N = n ,
  I = i
}
 

Public Member Functions

template<typename T >
 Sum (T *const dst, const T *const src)
 dst[0..N-1] += src[0..N-1]
 
template<typename T >
 Sum (T *const dst, const T a, const T *const src)
 dst[0..N-1] += a * src[0..N-1]
 

Detailed Description

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

Sum into an array.

Template Parameters
nNumber of members to sum.

Definition at line 85 of file Shards_SimpleArrayOps.hpp.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 86 of file Shards_SimpleArrayOps.hpp.

Constructor & Destructor Documentation

◆ Sum() [1/3]

template<unsigned n, unsigned i = 0>
template<typename T >
shards::Sum< n, i >::Sum ( T *const  dst,
const T *const  src 
)
inline

dst[0..N-1] += src[0..N-1]

Definition at line 90 of file Shards_SimpleArrayOps.hpp.

◆ Sum() [2/3]

template<unsigned n, unsigned i = 0>
template<typename T >
shards::Sum< n, i >::Sum ( T *const  dst,
const T  a,
const T *const  src 
)
inline

dst[0..N-1] += a * src[0..N-1]

Definition at line 95 of file Shards_SimpleArrayOps.hpp.

◆ Sum() [3/3]

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

Definition at line 98 of file Shards_SimpleArrayOps.hpp.


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