ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::scalar_vector< NumericT > Struct Template Reference

Represents a vector consisting of scalars 's' only, i.e. v[i] = s for all i. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only. More...

#include <vector_def.hpp>

Inheritance diagram for viennacl::scalar_vector< NumericT >:
viennacl::implicit_vector_base< NumericT > viennacl::zero_vector< NumericT >

Public Member Functions

 scalar_vector (vcl_size_t s, NumericT val, viennacl::context ctx=viennacl::context())
 
- Public Member Functions inherited from viennacl::implicit_vector_base< NumericT >
viennacl::context context () const
 
vcl_size_t size () const
 
cpu_value_type value () const
 
vcl_size_t index () const
 
bool has_index () const
 
cpu_value_type operator() (vcl_size_t i) const
 
cpu_value_type operator[] (vcl_size_t i) const
 

Additional Inherited Members

- Public Types inherited from viennacl::implicit_vector_base< NumericT >
typedef NumericT const & const_reference
 
typedef NumericT cpu_value_type
 
- Protected Member Functions inherited from viennacl::implicit_vector_base< NumericT >
 implicit_vector_base (vcl_size_t s, vcl_size_t i, NumericT v, viennacl::context ctx)
 
 implicit_vector_base (vcl_size_t s, NumericT v, viennacl::context ctx)
 
- Protected Attributes inherited from viennacl::implicit_vector_base< NumericT >
vcl_size_t size_
 
std::pair< bool, vcl_size_tindex_
 
NumericT value_
 
viennacl::context ctx_
 

Detailed Description

template<typename NumericT>
struct viennacl::scalar_vector< NumericT >

Represents a vector consisting of scalars 's' only, i.e. v[i] = s for all i. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only.

Examples:
examples/tutorial/libviennacl.cpp, iterative-custom.cpp, matrix-free.cpp, and multithreaded.cpp.

Definition at line 87 of file vector_def.hpp.

Constructor & Destructor Documentation

template<typename NumericT>
viennacl::scalar_vector< NumericT >::scalar_vector ( vcl_size_t  s,
NumericT  val,
viennacl::context  ctx = viennacl::context() 
)
inline

Definition at line 89 of file vector_def.hpp.


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