LAMA
|
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) |
Class that contains some utility routines used at several places.
void lama::LAMAArrayUtils::assign | ( | _LAMAArray & | target, |
const _LAMAArray & | source | ||
) | [static] |
Static method for LAMAArray assignment with type conversions.
[out] | target | contains copy of source values |
[in] | source | array 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.
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().
static void lama::LAMAArrayUtils::assign | ( | LAMAArray< ValueType1 > & | target, |
const Scalar & | value, | ||
ContextPtr | context | ||
) | [static] |
void lama::LAMAArrayUtils::assign | ( | LAMAArray< ValueType > & | target, |
const Scalar & | value, | ||
ContextPtr | context | ||
) |
References lama::Scalar::getValue(), LAMA_CONTEXT_ACCESS, LAMA_INTERFACE_FN_T, and lama::_LAMAArray::size().
void lama::LAMAArrayUtils::assignImpl1 | ( | LAMAArray< ValueType > & | target, |
const _LAMAArray & | source | ||
) | [static, private] |
References assignImpl2(), lama::Scalar::DOUBLE, lama::Scalar::FLOAT, lama::_LAMAArray::getValueType(), lama::LAMAArray< T >::getValueType(), and LAMA_THROWEXCEPTION.
Referenced by assign().
void lama::LAMAArrayUtils::assignImpl2 | ( | LAMAArray< ValueType1 > & | target, |
const LAMAArray< ValueType2 > & | source | ||
) | [static, private] |
template void lama::LAMAArrayUtils::gather | ( | LAMAArray< ValueType1 > & | target, |
const LAMAArray< ValueType2 > & | source, | ||
const LAMAArray< IndexType > & | index | ||
) | [static] |
lama::LAMAArrayUtils::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |