All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
scalar_operations.hpp File Reference

Implementations of scalar operations. More...

`#include "viennacl/forwards.h"`
`#include "viennacl/tools/tools.hpp"`
`#include "viennacl/meta/predicate.hpp"`
`#include "viennacl/meta/enable_if.hpp"`
`#include "viennacl/traits/size.hpp"`
`#include "viennacl/traits/start.hpp"`
`#include "viennacl/traits/handle.hpp"`
`#include "viennacl/traits/stride.hpp"`
`#include "viennacl/linalg/host_based/scalar_operations.hpp"`

Go to the source code of this file.

## Namespaces

| viennacl
| Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
| viennacl::linalg
| Provides all linear algebra operations which are not covered by operator overloads.

## Functions

template<typename S1 , typename S2 , typename ScalarType1 >
viennacl::enable_if < viennacl::is_scalar< S1 > ::value &&viennacl::is_scalar < S2 >::value &&viennacl::is_any_scalar < ScalarType1 >::value >::type | viennacl::linalg::as (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha)
| Interface for the generic operation s1 = s2 @ alpha, where s1 and s2 are GPU scalars, @ denotes multiplication or division, and alpha is either a GPU or a CPU scalar. More...
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >

viennacl::enable_if
< viennacl::is_scalar< S1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_scalar< S3 >
::value
&&viennacl::is_any_scalar
< ScalarType1 >::value
&&viennacl::is_any_scalar
< ScalarType2 >::value >::type

viennacl::linalg::asbs (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)

| Interface for the generic operation s1 = s2 @ alpha + s3 @ beta, where s1, s2 and s3 are GPU scalars, @ denotes multiplication or division, and alpha, beta are either a GPU or a CPU scalar. More...
template<typename S1 , typename S2 , typename ScalarType1 , typename S3 , typename ScalarType2 >

viennacl::enable_if
< viennacl::is_scalar< S1 >
::value &&viennacl::is_scalar
< S2 >::value
&&viennacl::is_scalar< S3 >
::value
&&viennacl::is_any_scalar
< ScalarType1 >::value
&&viennacl::is_any_scalar
< ScalarType2 >::value >::type

viennacl::linalg::asbs_s (S1 &s1, S2 const &s2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, S3 const &s3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)

| Interface for the generic operation s1 += s2 @ alpha + s3 @ beta, where s1, s2 and s3 are GPU scalars, @ denotes multiplication or division, and alpha, beta are either a GPU or a CPU scalar. More...
template<typename S1 , typename S2 >
viennacl::enable_if < viennacl::is_scalar< S1 > ::value &&viennacl::is_scalar < S2 >::value >::type | viennacl::linalg::swap (S1 &s1, S2 &s2)
| Swaps the contents of two scalars. More...

## Detailed Description

Implementations of scalar operations.

Definition in file scalar_operations.hpp.