LAMA
lama::LAMAArrayUtils Class Reference

Class that contains some utility routines used at several places. More...

#include <LAMAArrayUtils.hpp>

Public Member Functions

template<typename ValueType >
void assign (LAMAArray< ValueType > &target, const Scalar &value, ContextPtr context)

Static Public Member Functions

static void assign (_LAMAArray &target, const _LAMAArray &source)
 Static method for LAMAArray assignment with type conversions.
template<typename ValueType1 , typename ValueType2 >
static void gather (LAMAArray< ValueType1 > &target, const LAMAArray< ValueType2 > &source, const LAMAArray< IndexType > &index)
template<typename ValueType1 >
static void assign (LAMAArray< ValueType1 > &target, const Scalar &value, ContextPtr context)

Private Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)

Static Private Member Functions

template<typename ValueType1 , typename ValueType2 >
static void assignImpl2 (LAMAArray< ValueType1 > &target, const LAMAArray< ValueType2 > &source)
template<typename ValueType >
static void assignImpl1 (LAMAArray< ValueType > &target, const _LAMAArray &source)

Detailed Description

Class that contains some utility routines used at several places.


Member Function Documentation

void lama::LAMAArrayUtils::assign ( _LAMAArray target,
const _LAMAArray source 
) [static]

Static method for LAMAArray assignment with type conversions.

Parameters:
[out]targetcontains copy of source values
[in]sourcearray with source values
  LAMAArray<float> fvalues;
  LAMAArray<double> dvalues;
  ...
  dvalues = fvalues;   // not supported
  assign( dvalues, fvalues );  // supported

Size of target array will be the same as the source array.

Todo:
Exact specification at which context values will be copied or add context arg

References assignImpl1(), lama::Scalar::DOUBLE, lama::Scalar::FLOAT, lama::_LAMAArray::getValueType(), and LAMA_THROWEXCEPTION.

Referenced by lama::ELLStorage< T >::allocate(), lama::DenseVector< T >::assign(), lama::DenseVector< T >::buildLocalValues(), lama::DenseVector< T >::buildValues(), and lama::DenseVector< T >::setValues().

template<typename ValueType1 >
static void lama::LAMAArrayUtils::assign ( LAMAArray< ValueType1 > &  target,
const Scalar value,
ContextPtr  context 
) [static]
template<typename ValueType >
void lama::LAMAArrayUtils::assign ( LAMAArray< ValueType > &  target,
const Scalar value,
ContextPtr  context 
)
template<typename ValueType >
void lama::LAMAArrayUtils::assignImpl1 ( LAMAArray< ValueType > &  target,
const _LAMAArray source 
) [static, private]
template<typename ValueType1 , typename ValueType2 >
void lama::LAMAArrayUtils::assignImpl2 ( LAMAArray< ValueType1 > &  target,
const LAMAArray< ValueType2 > &  source 
) [static, private]
template<typename ValueType1 , typename ValueType2 >
template void lama::LAMAArrayUtils::gather ( LAMAArray< ValueType1 > &  target,
const LAMAArray< ValueType2 > &  source,
const LAMAArray< IndexType > &  index 
) [static]

The documentation for this class was generated from the following files: